]> git.baikalelectronics.ru Git - kernel.git/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)
committerIngo Molnar <mingo@kernel.org>
Thu, 5 Feb 2015 07:39:37 +0000 (08:39 +0100)
commitc93dc4b4be710cf445a44d6397325ac24108cb7b
tree994bad6dd380a02a39e0c3aecab87f862de8bc5e
parentfe4c52f22d84e9fa0a5673d8c635bd1a65064f97
hrtimer: Fix incorrect tai offset calculation for non high-res timer systems

I noticed some CLOCK_TAI timer test failures on one of my
less-frequently used configurations. And after digging in I
found in bcb1ee33dca5 (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>
Cc: stable <stable@vger.kernel.org> # 3.17+
Link: http://lkml.kernel.org/r/1423097126-10236-1-git-send-email-john.stultz@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/time/hrtimer.c