linux-stable/kernel/time
Martin Schwidefsky 1be3967948 timekeeping: Move reset of cycle_last for tsc clocksource to tsc
change_clocksource resets the cycle_last value to zero then sets it to
a value read from the clocksource. The reset to zero is required only
for the TSC clocksource to make the read_tsc function work after a
resume. The reason is that the TSC read function uses cycle_last to
detect backwards going TSCs. In the resume case cycle_last contains
the TSC value from the last update before the suspend. On resume the
TSC starts counting from 0 again and would trip over the cycle_last
comparison.

This is subtle and surprising. Move the reset to a resume function in
the tsc code.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: John Stultz <johnstul@us.ibm.com>
Cc: Daniel Walker <dwalker@fifo99.com>
LKML-Reference: <20090814134808.142191175@de.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2009-08-15 10:55:45 +02:00
..
clockevents.c hrtimer: Fix migration expiry check 2009-07-10 17:32:55 +02:00
clocksource.c clocksource: Prevent NULL pointer dereference 2009-07-19 17:15:54 +02:00
jiffies.c clocksource: pass clocksource to read() callback 2009-04-21 13:41:47 -07:00
Kconfig Kconfig: eliminate "def_bool n" constructs 2008-10-16 11:21:31 -07:00
Makefile timecompare: generic infrastructure to map between two time bases 2009-02-15 22:43:32 -08:00
ntp.c timekeeping: Introduce timekeeping_leap_insert 2009-08-15 10:55:45 +02:00
tick-broadcast.c clockevents: tick_broadcast_device can become static 2009-05-02 10:31:14 +02:00
tick-common.c clockevents: prevent endless loop in tick_handle_periodic() 2009-05-02 10:22:27 +02:00
tick-internal.h NOHZ: restart tick device from irq_enter() 2008-10-17 18:13:38 +02:00
tick-oneshot.c clocksource: prevent selection of low resolution clocksourse also for nohz=on 2009-06-13 12:00:26 +02:00
tick-sched.c Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-06-20 10:51:44 -07:00
timecompare.c timecompare: generic infrastructure to map between two time bases 2009-02-15 22:43:32 -08:00
timekeeping.c timekeeping: Move reset of cycle_last for tsc clocksource to tsc 2009-08-15 10:55:45 +02:00
timer_list.c Merge branch 'timers/range-hrtimers' into v28-range-hrtimers-for-linus-v2 2008-10-22 09:48:06 +02:00
timer_stats.c timer stats: Optimize by adding quick check to avoid function calls 2009-06-24 11:15:09 +02:00