timekeeping: Provide internal function __ktime_get_real_seconds
authorDengChao <chao.deng@linaro.org>
Sun, 13 Dec 2015 04:24:18 +0000 (12:24 +0800)
committerJohn Stultz <john.stultz@linaro.org>
Thu, 17 Dec 2015 00:50:55 +0000 (16:50 -0800)
commitdee3665416a8553279d10b62b5e62685cbe5daa8
treedd4a6644f7b8e70467772438d82af56f1ee06c49
parent37cf4dc3370fbca0344e23bb96446eb2c3548ba7
timekeeping: Provide internal function __ktime_get_real_seconds

In order to fix Y2038 issues in the ntp code we will need replace
get_seconds() with ktime_get_real_seconds() but as the ntp code uses
the timekeeping lock which is also used by ktime_get_real_seconds(),
we need a version without locking.
Add a new function __ktime_get_real_seconds() in timekeeping to
do this.

Reviewed-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: DengChao <chao.deng@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
kernel/time/timekeeping.c
kernel/time/timekeeping_internal.h