@@ -256,9 +256,9 @@ static inline void get_monotonic_boottime64(struct timespec64 *ts)
*ts = ktime_to_timespec64(ktime_get_boottime());
}
-static inline void timekeeping_clocktai(struct timespec *ts)
+static inline void timekeeping_clocktai(struct timespec64 *ts)
{
- *ts = ktime_to_timespec(ktime_get_clocktai());
+ *ts = ktime_to_timespec64(ktime_get_clocktai());
}
/*
@@ -296,7 +296,7 @@ static int posix_get_boottime(const clockid_t which_clock, struct timespec *tp)
return 0;
}
-static int posix_get_tai(clockid_t which_clock, struct timespec *tp)
+static int posix_get_tai(clockid_t which_clock, struct timespec64 *tp)
{
timekeeping_clocktai(tp);
return 0;
@@ -350,7 +350,7 @@ static __init int init_posix_timers(void)
};
struct k_clock clock_tai = {
.clock_getres = posix_get_hrtimer_res,
- .clock_get = posix_get_tai,
+ .clock_get64 = posix_get_tai,
.nsleep = common_nsleep,
.nsleep_restart = hrtimer_nanosleep_restart,
.timer_create = common_timer_create,
The timekeeping_clocktai() function is not year 2038 safe on 32bit systems, change its implementation with using struct timespec64. Signed-off-by: Baolin Wang <baolin.wang@linaro.org> --- include/linux/timekeeping.h | 4 ++-- kernel/time/posix-timers.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)