Commit fc0d99fd authored by Baolin Wang's avatar Baolin Wang Committed by Greg Kroah-Hartman

parisc: time: Convert read_persistent_clock() to read_persistent_clock64()

[ Upstream commit f76cdd00 ]

The read_persistent_clock() uses a timespec, which is not year 2038 safe
on 32bit systems. On parisc architecture, we have implemented generic
RTC drivers that can be used to compensate the system suspend time, but
the RTC time can not represent the nanosecond resolution, so this patch
just converts to read_persistent_clock64() with timespec64.
Signed-off-by: default avatarBaolin Wang <baolin.wang@linaro.org>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6bf379f2
...@@ -205,7 +205,7 @@ static int __init rtc_init(void) ...@@ -205,7 +205,7 @@ static int __init rtc_init(void)
device_initcall(rtc_init); device_initcall(rtc_init);
#endif #endif
void read_persistent_clock(struct timespec *ts) void read_persistent_clock64(struct timespec64 *ts)
{ {
static struct pdc_tod tod_data; static struct pdc_tod tod_data;
if (pdc_tod_read(&tod_data) == 0) { if (pdc_tod_read(&tod_data) == 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment