@@ -357,9 +357,11 @@ void bfin_coretmr_clockevent_init(void)
#endif /* CONFIG_TICKSOURCE_CORETMR */
-void read_persistent_clock(struct timespec *ts)
+void read_persistent_clock64(struct timespec64 *ts)
{
- time_t secs_since_1970 = (365 * 37 + 9) * 24 * 60 * 60; /* 1 Jan 2007 */
+ /* 1 Jan 2007 */
+ time64_t secs_since_1970 = (365 * 37 + 9) * 24 * 60 * 60;
+
ts->tv_sec = secs_since_1970;
ts->tv_nsec = 0;
}
@@ -132,9 +132,11 @@ irqreturn_t timer_interrupt(int irq, void *dummy)
return IRQ_HANDLED;
}
-void read_persistent_clock(struct timespec *ts)
+void read_persistent_clock64(struct timespec64 *ts)
{
- time_t secs_since_1970 = (365 * 37 + 9) * 24 * 60 * 60; /* 1 Jan 2007 */
+ /* 1 Jan 2007 */
+ time64_t secs_since_1970 = (365 * 37 + 9) * 24 * 60 * 60;
+
ts->tv_sec = secs_since_1970;
ts->tv_nsec = 0;
}
Since struct timespec is not y2038 safe on 32bit machines, this patch converts read_persistent_clock() to read_persistent_clock64() using struct timespec64. Signed-off-by: Baolin Wang <baolin.wang@linaro.org> --- arch/blackfin/kernel/time-ts.c | 6 ++++-- arch/blackfin/kernel/time.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) -- 1.7.9.5