• Thomas Gleixner's avatar
    clocksource: fix resume logic · b52f52a0
    Thomas Gleixner authored
    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: default avatarThomas 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: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    b52f52a0
clocksource.c 13.1 KB