clocksource: fix resume logic
authorThomas Gleixner <tglx@linutronix.de>
Wed, 9 May 2007 09:35:15 +0000 (02:35 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 9 May 2007 19:30:56 +0000 (12:30 -0700)
commitb52f52a093bb1e841e014c2087b5bee7162da413
tree7b7135897195fc9d14473d3ab824d59a4b65e5ad
parent4037d452202e34214e8a939fa5621b2b3bbb45b7
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>
include/linux/clocksource.h
kernel/time/clocksource.c
kernel/timer.c