From: john stultz <johnstul@us.ibm.com>
To: ak@suse.de
Cc: john stultz <johnstul@us.ibm.com>, linux-kernel@vger.kernel.org
Subject: [RFC][PATCH 1/6] x86_64: Enable arch-generic vsyscall support.
Date: Tue, 8 Aug 2006 22:17:14 -0400 [thread overview]
Message-ID: <20060809021714.23103.24280.sendpatchset@cog.beaverton.ibm.com> (raw)
In-Reply-To: <20060809021707.23103.5607.sendpatchset@cog.beaverton.ibm.com>
Provides generic infrastructure for vsyscall-gtod.
Signed-off-by: John Stultz <johnstul@us.ibm.com>
include/linux/clocksource.h | 2 ++
kernel/timer.c | 7 +++++++
2 files changed, 9 insertions(+)
linux-2.6.18-rc4_timeofday-vsyscall-support_C5.patch
============================================
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index d852024..f554273 100644
--- a/include/linux/clocksource.h
+++ b/include/linux/clocksource.h
@@ -46,6 +46,7 @@ typedef u64 cycle_t;
* @shift: cycle to nanosecond divisor (power of two)
* @update_callback: called when safe to alter clocksource values
* @is_continuous: defines if clocksource is free-running.
+ * @vread: vsyscall based read
* @cycle_interval: Used internally by timekeeping core, please ignore.
* @xtime_interval: Used internally by timekeeping core, please ignore.
*/
@@ -59,6 +60,7 @@ struct clocksource {
u32 shift;
int (*update_callback)(void);
int is_continuous;
+ cycle_t (*vread)(void);
/* timekeeping specific data, ignore */
cycle_t cycle_last, cycle_interval;
diff --git a/kernel/timer.c b/kernel/timer.c
index b650f04..08b4a02 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -1023,6 +1023,12 @@ static int __init timekeeping_init_devic
device_initcall(timekeeping_init_device);
+#ifdef CONFIG_GENERIC_TIME_VSYSCALL
+extern void update_vsyscall(struct timespec* ts, struct clocksource* c);
+#else
+#define update_vsyscall(now, c)
+#endif
+
/*
* If the error is already larger, we look ahead even further
* to compensate for late or lost adjustments.
@@ -1165,6 +1171,7 @@ static void update_wall_time(void)
clock->xtime_nsec = 0;
clocksource_calculate_interval(clock, tick_nsec);
}
+ update_vsyscall(&xtime, clock);
}
/*
next prev parent reply other threads:[~2006-08-09 2:17 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-09 2:17 [RFC][PATCH 0/6] x86_64: Generic timekeeping for x86_64 john stultz
2006-08-09 2:17 ` john stultz [this message]
2006-08-09 2:29 ` [RFC][PATCH 1/6] x86_64: Enable arch-generic vsyscall support Andi Kleen
2006-08-09 2:56 ` john stultz
2006-08-09 2:59 ` Andi Kleen
2006-08-09 2:17 ` [RFC][PATCH 2/6] x86_64: hpet_address cleanup john stultz
2006-08-09 2:31 ` Andi Kleen
2006-08-09 3:08 ` john stultz
2006-08-09 2:17 ` [RFC][PATCH 3/6] x86_64: Remove apic_runs_main_timer john stultz
2006-08-09 2:31 ` Andi Kleen
2006-08-09 2:17 ` [RFC][PATCH 4/6] x86_64: Enable CONFIG_GENERIC_TIME john stultz
2006-08-09 2:17 ` [RFC][PATCH 5/6] x86_64: Clocksources for x86-64 john stultz
2006-08-09 2:41 ` Andi Kleen
2006-08-09 3:41 ` john stultz
2006-08-09 2:17 ` [RFC][PATCH 6/6] x86_64: GENERIC_TIME based vsyscall code john stultz
2006-08-09 2:45 ` Andi Kleen
2006-08-09 2:41 ` [RFC][PATCH 0/6] x86_64: Generic timekeeping for x86_64 Andi Kleen
2006-08-09 2:48 ` john stultz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060809021714.23103.24280.sendpatchset@cog.beaverton.ibm.com \
--to=johnstul@us.ibm.com \
--cc=ak@suse.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome