]> git.ipfire.org Git - people/arne_f/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)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Wed, 16 Jan 2013 21:44:58 +0000 (16:44 -0500)
commit7806334afcaf4f0352a9c6f813264f5ef27d00f9
tree252f3a0e8235597aa22002645dd2eb38664e709b
parent30c42309ea65847d822101fe4fa4d0bce177769e
timekeeping: add arch_offset hook to ktime_get functions

commit d004e024058a0eaca097513ce62cbcf978913e0a upstream.

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.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
kernel/time/timekeeping.c