From: john stultz <johnstul@us.ibm.com>
To: ak@suse.de
Cc: john stultz <johnstul@us.ibm.com>,
linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@elte.hu
Subject: [PATCH 1/5][time][Generic] vsyscall-gtod support for GENERIC_TIME
Date: Tue, 28 Nov 2006 22:00:24 -0500 [thread overview]
Message-ID: <20061129025734.15379.47057.sendpatchset@localhost> (raw)
In-Reply-To: <20061129025728.15379.50707.sendpatchset@localhost>
Provides generic infrastructure for vsyscall-gtod.
Signed-off-by: John Stultz <johnstul@us.ibm.com>
include/linux/clocksource.h | 8 ++++++++
kernel/timer.c | 1 +
2 files changed, 9 insertions(+)
linux-2.6.19-rc6git11_timeofday-vsyscall-support_C7.patch
============================================
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index d852024..62a600d 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;
@@ -182,4 +184,10 @@ int clocksource_register(struct clocksou
void clocksource_reselect(void);
struct clocksource* clocksource_get_next(void);
+#ifdef CONFIG_GENERIC_TIME_VSYSCALL
+extern void update_vsyscall(struct timespec *ts, struct clocksource *c);
+#else
+#define update_vsyscall(now, c) do { } while(0)
+#endif
+
#endif /* _LINUX_CLOCKSOURCE_H */
diff --git a/kernel/timer.c b/kernel/timer.c
index c1c7fbc..38fd4a7 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -956,6 +956,7 @@ #endif
clock->xtime_nsec = 0;
clocksource_calculate_interval(clock, tick_nsec);
}
+ update_vsyscall(&xtime, clock);
}
/*
next prev parent reply other threads:[~2006-11-29 3:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-29 3:00 [PATCH 0/5][time][x86_64] GENERIC_TIME patchset for x86_64 john stultz
2006-11-29 3:00 ` john stultz [this message]
2006-11-29 3:00 ` [PATCH 2/5][time][x86_64] hpet_address cleanup john stultz
2006-11-29 3:00 ` [PATCH 3/5][time][x86_64] Split x86_64/kernel/time.c up john stultz
2006-11-29 3:00 ` [PATCH 4/5][time][x86_64] Convert x86_64 to use GENERIC_TIME john stultz
2006-12-11 0:39 ` rdtscp vgettimeofday Andrea Arcangeli
2006-12-11 21:17 ` dean gaudet
2006-12-11 21:32 ` Andrea Arcangeli
2006-12-11 23:15 ` dean gaudet
2006-12-11 23:38 ` Andrea Arcangeli
2006-11-29 3:00 ` [PATCH 5/5][time][x86_64] Re-enable vsyscall support for x86_64 john stultz
-- strict thread matches above, loose matches on Subject: below --
2006-12-20 1:20 [PATCH 0/5][time][x86_64] GENERIC_TIME patchset " john stultz
2006-12-20 1:20 ` [PATCH 1/5][time][generic] vsyscall-gtod support for GENERIC_TIME 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=20061129025734.15379.47057.sendpatchset@localhost \
--to=johnstul@us.ibm.com \
--cc=ak@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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