Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+2
+2
kernel/hrtimer.c
··· 635 635 raw_spin_lock(&base->lock); 636 636 base->clock_base[HRTIMER_BASE_REALTIME].offset = 637 637 timespec_to_ktime(realtime_offset); 638 + base->clock_base[HRTIMER_BASE_BOOTTIME].offset = 639 + timespec_to_ktime(sleep); 638 640 639 641 hrtimer_force_reprogram(base, 0); 640 642 raw_spin_unlock(&base->lock);