Skip to content

Commit 5cd10e7

Browse files
committed
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>
1 parent 7fdd7f8 commit 5cd10e7

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎kernel/hrtimer.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,8 @@ static void retrigger_next_event(void *arg)
635635
raw_spin_lock(&base->lock);
636636
base->clock_base[HRTIMER_BASE_REALTIME].offset =
637637
timespec_to_ktime(realtime_offset);
638+
base->clock_base[HRTIMER_BASE_BOOTTIME].offset =
639+
timespec_to_ktime(sleep);
638640

639641
hrtimer_force_reprogram(base, 0);
640642
raw_spin_unlock(&base->lock);

0 commit comments

Comments
 (0)