diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2007-05-09 02:35:15 -0700 |
---|---|---|
committer | Chris Wright <chrisw@sous-sol.org> | 2007-05-23 14:32:48 -0700 |
commit | f34ddce1302d548244c499b2905ab2fe999610c6 (patch) | |
tree | 086a1a9fe51f94bf17798bf7bdb1773d2a5205c8 /include | |
parent | 8e4a8227450fb3327c244642fca616daa6ca7879 (diff) |
[PATCH] clocksource: fix resume logic
We need to make sure that the clocksources are resumed, when timekeeping is
resumed. The current resume logic does not guarantee this.
Add a resume function pointer to the clocksource struct, so clocksource
drivers which need to reinitialize the clocksource can provide a resume
function.
Add a resume function, which calls the maybe available clocksource resume
functions and resets the watchdog function, so a stable TSC can be used
accross suspend/resume.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: john stultz <johnstul@us.ibm.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/clocksource.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index daa4940cc0f1..bf92c2631562 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h @@ -48,6 +48,7 @@ struct clocksource; * @shift: cycle to nanosecond divisor (power of two) * @flags: flags describing special properties * @vread: vsyscall based read + * @resume: resume function for the clocksource, if necessary * @cycle_interval: Used internally by timekeeping core, please ignore. * @xtime_interval: Used internally by timekeeping core, please ignore. */ @@ -61,6 +62,7 @@ struct clocksource { u32 shift; unsigned long flags; cycle_t (*vread)(void); + void (*resume)(void); /* timekeeping specific data, ignore */ cycle_t cycle_last, cycle_interval; @@ -198,6 +200,7 @@ static inline void clocksource_calculate_interval(struct clocksource *c, extern int clocksource_register(struct clocksource*); extern struct clocksource* clocksource_get_next(void); extern void clocksource_change_rating(struct clocksource *cs, int rating); +extern void clocksource_resume(void); #ifdef CONFIG_GENERIC_TIME_VSYSCALL extern void update_vsyscall(struct timespec *ts, struct clocksource *c); |