diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2007-05-09 05:35:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-09 15:30:56 -0400 |
commit | b52f52a093bb1e841e014c2087b5bee7162da413 (patch) | |
tree | 7b7135897195fc9d14473d3ab824d59a4b65e5ad /kernel/timer.c | |
parent | 4037d452202e34214e8a939fa5621b2b3bbb45b7 (diff) |
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>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/timer.c')
-rw-r--r-- | kernel/timer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/timer.c b/kernel/timer.c index de85f8491c1..59a28b1752f 100644 --- a/kernel/timer.c +++ b/kernel/timer.c | |||
@@ -1499,6 +1499,8 @@ unregister_time_interpolator(struct time_interpolator *ti) | |||
1499 | prev = &curr->next; | 1499 | prev = &curr->next; |
1500 | } | 1500 | } |
1501 | 1501 | ||
1502 | clocksource_resume(); | ||
1503 | |||
1502 | write_seqlock_irqsave(&xtime_lock, flags); | 1504 | write_seqlock_irqsave(&xtime_lock, flags); |
1503 | if (ti == time_interpolator) { | 1505 | if (ti == time_interpolator) { |
1504 | /* we lost the best time-interpolator: */ | 1506 | /* we lost the best time-interpolator: */ |