]> git.hungrycats.org Git - linux/commit
hrtimer: Fix incorrect tai offset calculation for non high-res timer systems
authorJohn Stultz <john.stultz@linaro.org>
Thu, 5 Feb 2015 00:45:26 +0000 (16:45 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 Feb 2015 07:00:56 +0000 (15:00 +0800)
commitfef76eabdf6f5bd033de2353f27dccbeea60c066
treea16ffd51b3cf987fc5b617c2c9d1d406ed60795b
parent1c3a363299b98f41fce0d7232ebf2b40db39d0a2
hrtimer: Fix incorrect tai offset calculation for non high-res timer systems

commit 2d926c15d629a13914ce3e5f26354f6a0ac99e70 upstream.

I noticed some CLOCK_TAI timer test failures on one of my
less-frequently used configurations. And after digging in I
found in 76f4108892d9 (Cleanup hrtimer accessors to the
timekepeing state), the hrtimer_get_softirq_time tai offset
calucation was incorrectly rewritten, as the tai offset we
return shold be from CLOCK_MONOTONIC, and not CLOCK_REALTIME.

This results in CLOCK_TAI timers expiring early on non-highres
capable machines.

This patch fixes the issue, calculating the tai time properly
from the monotonic base.

Signed-off-by: John Stultz <john.stultz@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1423097126-10236-1-git-send-email-john.stultz@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/time/hrtimer.c