diff options
author | John Stultz <john.stultz@linaro.org> | 2012-09-11 19:58:13 -0400 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2012-09-24 12:38:08 -0400 |
commit | 576094b7f0aaf41aadab9b7d4e5bd85faa432711 (patch) | |
tree | 9cf7a86b58e5b6242625663af274b594085487fa /include/linux/timekeeper_internal.h | |
parent | 706394211648117762edfaeffd6fc04bf3b1a75d (diff) |
time: Introduce new GENERIC_TIME_VSYSCALL
Now that we moved everyone over to GENERIC_TIME_VSYSCALL_OLD,
introduce the new declaration and config option for the new
update_vsyscall method.
Cc: Tony Luck <tony.luck@intel.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Paul Turner <pjt@google.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'include/linux/timekeeper_internal.h')
-rw-r--r-- | include/linux/timekeeper_internal.h | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/include/linux/timekeeper_internal.h b/include/linux/timekeeper_internal.h index a904d76a5faa..e1d558e237ec 100644 --- a/include/linux/timekeeper_internal.h +++ b/include/linux/timekeeper_internal.h | |||
@@ -66,16 +66,38 @@ struct timekeeper { | |||
66 | seqlock_t lock; | 66 | seqlock_t lock; |
67 | }; | 67 | }; |
68 | 68 | ||
69 | static inline struct timespec tk_xtime(struct timekeeper *tk) | ||
70 | { | ||
71 | struct timespec ts; | ||
72 | |||
73 | ts.tv_sec = tk->xtime_sec; | ||
74 | ts.tv_nsec = (long)(tk->xtime_nsec >> tk->shift); | ||
75 | return ts; | ||
76 | } | ||
77 | |||
78 | |||
79 | #ifdef CONFIG_GENERIC_TIME_VSYSCALL | ||
80 | |||
81 | extern void update_vsyscall(struct timekeeper *tk); | ||
82 | extern void update_vsyscall_tz(void); | ||
69 | 83 | ||
70 | #ifdef CONFIG_GENERIC_TIME_VSYSCALL_OLD | 84 | #elif defined(CONFIG_GENERIC_TIME_VSYSCALL_OLD) |
71 | extern void | 85 | |
72 | update_vsyscall_old(struct timespec *ts, struct timespec *wtm, | 86 | extern void update_vsyscall_old(struct timespec *ts, struct timespec *wtm, |
73 | struct clocksource *c, u32 mult); | 87 | struct clocksource *c, u32 mult); |
74 | extern void update_vsyscall_tz(void); | 88 | extern void update_vsyscall_tz(void); |
89 | |||
90 | static inline void update_vsyscall(struct timekeeper *tk) | ||
91 | { | ||
92 | struct timespec xt; | ||
93 | |||
94 | xt = tk_xtime(tk); | ||
95 | update_vsyscall_old(&xt, &tk->wall_to_monotonic, tk->clock, tk->mult); | ||
96 | } | ||
97 | |||
75 | #else | 98 | #else |
76 | static inline void | 99 | |
77 | update_vsyscall_old(struct timespec *ts, struct timespec *wtm, | 100 | static inline void update_vsyscall(struct timekeeper *tk) |
78 | struct clocksource *c, u32 mult) | ||
79 | { | 101 | { |
80 | } | 102 | } |
81 | static inline void update_vsyscall_tz(void) | 103 | static inline void update_vsyscall_tz(void) |