aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/hrtimer.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-03-02 10:58:30 -0500
committerThomas Gleixner <tglx@linutronix.de>2011-03-02 11:20:00 -0500
commit5cd10e7946d28cfc42442fee2e6c757e244d756e (patch)
tree3886b72694e0edb7334f9a17ac9325f8b068c6e6 /kernel/hrtimer.c
parent7fdd7f89006dd5a4c702fa0ce0c272345fa44ae0 (diff)
hrtimer: Update base[CLOCK_BOOTTIME].offset correctly
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>
Diffstat (limited to 'kernel/hrtimer.c')
-rw-r--r--kernel/hrtimer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index 4c53af18734..f679a2d0872 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -635,6 +635,8 @@ static void retrigger_next_event(void *arg)
635 raw_spin_lock(&base->lock); 635 raw_spin_lock(&base->lock);
636 base->clock_base[HRTIMER_BASE_REALTIME].offset = 636 base->clock_base[HRTIMER_BASE_REALTIME].offset =
637 timespec_to_ktime(realtime_offset); 637 timespec_to_ktime(realtime_offset);
638 base->clock_base[HRTIMER_BASE_BOOTTIME].offset =
639 timespec_to_ktime(sleep);
638 640
639 hrtimer_force_reprogram(base, 0); 641 hrtimer_force_reprogram(base, 0);
640 raw_spin_unlock(&base->lock); 642 raw_spin_unlock(&base->lock);