hrtimer: Update base[CLOCK_BOOTTIME].offset correctly
authorThomas Gleixner <tglx@linutronix.de>
Wed, 2 Mar 2011 15:58:30 +0000 (16:58 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 2 Mar 2011 16:20:00 +0000 (17:20 +0100)
We calculate the current time of each clock base by adding an offset
to clock_monotonic. The offset for the clock bases is set in
retrigger_next_event() which is called when we switch a cpu to highres
mode or when the clock was set.

Add the missing update for clock boottime.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: John Stultz <johnstul@us.ibm.com>
kernel/hrtimer.c

index 4c53af18734b824cd68f530d0fed2b62eb9156b8..f679a2d08723ef60dcd345cfc57f3dbf8ce954fd 100644 (file)
@@ -635,6 +635,8 @@ static void retrigger_next_event(void *arg)
        raw_spin_lock(&base->lock);
        base->clock_base[HRTIMER_BASE_REALTIME].offset =
                timespec_to_ktime(realtime_offset);
+       base->clock_base[HRTIMER_BASE_BOOTTIME].offset =
+               timespec_to_ktime(sleep);
 
        hrtimer_force_reprogram(base, 0);
        raw_spin_unlock(&base->lock);
This page took 0.02597 seconds and 5 git commands to generate.