aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/clocksource.h10
-rw-r--r--kernel/timer.c1
2 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index 830a250ecf94..daa4940cc0f1 100644
--- a/include/linux/clocksource.h
+++ b/include/linux/clocksource.h
@@ -47,6 +47,7 @@ struct clocksource;
47 * @mult: cycle to nanosecond multiplier 47 * @mult: cycle to nanosecond multiplier
48 * @shift: cycle to nanosecond divisor (power of two) 48 * @shift: cycle to nanosecond divisor (power of two)
49 * @flags: flags describing special properties 49 * @flags: flags describing special properties
50 * @vread: vsyscall based read
50 * @cycle_interval: Used internally by timekeeping core, please ignore. 51 * @cycle_interval: Used internally by timekeeping core, please ignore.
51 * @xtime_interval: Used internally by timekeeping core, please ignore. 52 * @xtime_interval: Used internally by timekeeping core, please ignore.
52 */ 53 */
@@ -59,6 +60,7 @@ struct clocksource {
59 u32 mult; 60 u32 mult;
60 u32 shift; 61 u32 shift;
61 unsigned long flags; 62 unsigned long flags;
63 cycle_t (*vread)(void);
62 64
63 /* timekeeping specific data, ignore */ 65 /* timekeeping specific data, ignore */
64 cycle_t cycle_last, cycle_interval; 66 cycle_t cycle_last, cycle_interval;
@@ -197,4 +199,12 @@ extern int clocksource_register(struct clocksource*);
197extern struct clocksource* clocksource_get_next(void); 199extern struct clocksource* clocksource_get_next(void);
198extern void clocksource_change_rating(struct clocksource *cs, int rating); 200extern void clocksource_change_rating(struct clocksource *cs, int rating);
199 201
202#ifdef CONFIG_GENERIC_TIME_VSYSCALL
203extern void update_vsyscall(struct timespec *ts, struct clocksource *c);
204#else
205static inline void update_vsyscall(struct timespec *ts, struct clocksource *c)
206{
207}
208#endif
209
200#endif /* _LINUX_CLOCKSOURCE_H */ 210#endif /* _LINUX_CLOCKSOURCE_H */
diff --git a/kernel/timer.c b/kernel/timer.c
index c3c67f3c0190..cb1b86a9c52f 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -1174,6 +1174,7 @@ static void update_wall_time(void)
1174 1174
1175 /* check to see if there is a new clocksource to use */ 1175 /* check to see if there is a new clocksource to use */
1176 change_clocksource(); 1176 change_clocksource();
1177 update_vsyscall(&xtime, clock);
1177} 1178}
1178 1179
1179/* 1180/*