]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ntp/pps: replace getnstime_raw_and_real with 64-bit version
authorArnd Bergmann <arnd@arndb.de>
Mon, 28 Sep 2015 20:21:29 +0000 (22:21 +0200)
committerJohn Stultz <john.stultz@linaro.org>
Thu, 1 Oct 2015 16:59:01 +0000 (09:59 -0700)
commit071eee45b1650d53d21c636d344bdcebd4577ed2
tree3e22cf4327f43092c26e2eb11236379ec7320f2f
parent7ec88e4be461590b5a3817460c34603f76d9b3ae
ntp/pps: replace getnstime_raw_and_real with 64-bit version

There is exactly one caller of getnstime_raw_and_real in the kernel,
which is the pps_get_ts function. This changes the caller and
the implementation to work on timespec64 types rather than timespec,
to avoid the time_t overflow on 32-bit architectures.

For consistency with the other new functions (ktime_get_seconds,
ktime_get_real_*, ...), I'm renaming the function to
ktime_get_raw_and_real_ts64.

We still need to convert from the internal 64-bit type to 32 bit
types in the caller, but this conversion is now pushed out from
getnstime_raw_and_real to pps_get_ts. A follow-up patch changes
the remaining pps code to completely avoid the conversion.

Acked-by: Richard Cochran <richardcochran@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: John Stultz <john.stultz@linaro.org>
include/linux/pps_kernel.h
include/linux/timekeeping.h
kernel/time/timekeeping.c