提交 acc9a9dc 编写于 作者: J john stultz 提交者: Linus Torvalds

[PATCH] generic: vsyscall-gtod support for GENERIC_TIME

Provides generic infrastructure for vsyscall-gtod.

[akpm@osdl.org: cleanup]
Signed-off-by: NJohn Stultz <johnstul@us.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Andi Kleen <ak@muc.de>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 88ad0bf6
...@@ -47,6 +47,7 @@ struct clocksource; ...@@ -47,6 +47,7 @@ struct clocksource;
* @mult: cycle to nanosecond multiplier * @mult: cycle to nanosecond multiplier
* @shift: cycle to nanosecond divisor (power of two) * @shift: cycle to nanosecond divisor (power of two)
* @flags: flags describing special properties * @flags: flags describing special properties
* @vread: vsyscall based read
* @cycle_interval: Used internally by timekeeping core, please ignore. * @cycle_interval: Used internally by timekeeping core, please ignore.
* @xtime_interval: Used internally by timekeeping core, please ignore. * @xtime_interval: Used internally by timekeeping core, please ignore.
*/ */
...@@ -59,6 +60,7 @@ struct clocksource { ...@@ -59,6 +60,7 @@ struct clocksource {
u32 mult; u32 mult;
u32 shift; u32 shift;
unsigned long flags; unsigned long flags;
cycle_t (*vread)(void);
/* timekeeping specific data, ignore */ /* timekeeping specific data, ignore */
cycle_t cycle_last, cycle_interval; cycle_t cycle_last, cycle_interval;
...@@ -197,4 +199,12 @@ extern int clocksource_register(struct clocksource*); ...@@ -197,4 +199,12 @@ extern int clocksource_register(struct clocksource*);
extern struct clocksource* clocksource_get_next(void); extern struct clocksource* clocksource_get_next(void);
extern void clocksource_change_rating(struct clocksource *cs, int rating); extern void clocksource_change_rating(struct clocksource *cs, int rating);
#ifdef CONFIG_GENERIC_TIME_VSYSCALL
extern void update_vsyscall(struct timespec *ts, struct clocksource *c);
#else
static inline void update_vsyscall(struct timespec *ts, struct clocksource *c)
{
}
#endif
#endif /* _LINUX_CLOCKSOURCE_H */ #endif /* _LINUX_CLOCKSOURCE_H */
...@@ -1174,6 +1174,7 @@ static void update_wall_time(void) ...@@ -1174,6 +1174,7 @@ static void update_wall_time(void)
/* check to see if there is a new clocksource to use */ /* check to see if there is a new clocksource to use */
change_clocksource(); change_clocksource();
update_vsyscall(&xtime, clock);
} }
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册