summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2019-06-13 21:40:45 +0200
committerThomas Gleixner <tglx@linutronix.de>2019-06-14 11:51:44 +0200
commite3ff9c3678b4d80e22d2557b68726174578eaf52 (patch)
tree5cf1422bf9b708b1402ccd93d6a7edb34d368010 /drivers
parentMerge tag 'timers-v5.2-rc1' of https://git.linaro.org/people/daniel.lezcano/l... (diff)
downloadlinux-e3ff9c3678b4d80e22d2557b68726174578eaf52.tar.xz
linux-e3ff9c3678b4d80e22d2557b68726174578eaf52.zip
timekeeping: Repair ktime_get_coarse*() granularity
Jason reported that the coarse ktime based time getters advance only once per second and not once per tick as advertised. The code reads only the monotonic base time, which advances once per second. The nanoseconds are accumulated on every tick in xtime_nsec up to a second and the regular time getters take this nanoseconds offset into account, but the ktime_get_coarse*() implementation fails to do so. Add the accumulated xtime_nsec value to the monotonic base time to get the proper per tick advancing coarse tinme. Fixes: b9ff604cff11 ("timekeeping: Add ktime_get_coarse_with_offset") Reported-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Jason A. Donenfeld <Jason@zx2c4.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Clemens Ladisch <clemens@ladisch.de> Cc: Sultan Alsawaf <sultan@kerneltoast.com> Cc: Waiman Long <longman@redhat.com> Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1906132136280.1791@nanos.tec.linutronix.de
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions