]> git.baikalelectronics.ru Git - kernel.git/commit
timekeeping: add arch_offset hook to ktime_get functions
authorHector Palacios <hector.palacios@digi.com>
Mon, 14 Nov 2011 10:15:25 +0000 (11:15 +0100)
committerJohn Stultz <john.stultz@linaro.org>
Thu, 17 Nov 2011 22:57:19 +0000 (14:57 -0800)
commitf73cf5f68bf8b1bb90e2f60b3d0d957c9c3be0ab
tree94191734e099dd46b8998d813125efaa4a8a37d6
parent46ac064cc8733013b73df122fd589a3c2a5f8f6b
timekeeping: add arch_offset hook to ktime_get functions

ktime_get and ktime_get_ts were calling timekeeping_get_ns()
but later they were not calling arch_gettimeoffset() so architectures
using this mechanism returned 0 ns when calling these functions.

This happened for example when running Busybox's ping which calls
syscall(__NR_clock_gettime, CLOCK_MONOTONIC, ts) which eventually
calls ktime_get. As a result the returned ping travel time was zero.

CC: stable@kernel.org
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
kernel/time/timekeeping.c