Message ID | 4914b33abd8969906d2db0ae5c3da4f205f0bfe9.1524120572.git.baolin.wang@linaro.org (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Helge Deller |
Headers | show |
On Thu, Apr 19, 2018 at 8:51 AM, Baolin Wang <baolin.wang@linaro.org> wrote: > 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: Baolin Wang <baolin.wang@linaro.org> I have created the exact same patch a while ago but never submitted that. If the parisc maintainers want to apply yours with my Ack, that would be appreciated. Acked-by: Arnd Bergmann <arnd@arndb.de> -- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 20.04.2018 17:23, Arnd Bergmann wrote: > On Thu, Apr 19, 2018 at 8:51 AM, Baolin Wang <baolin.wang@linaro.org> wrote: >> 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: Baolin Wang <baolin.wang@linaro.org> > > I have created the exact same patch a while ago but never submitted that. > > If the parisc maintainers want to apply yours with my Ack, that > would be appreciated. > > Acked-by: Arnd Bergmann <arnd@arndb.de> Thanks, I'll take it through the parisc git tree. Helge -- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c index c383040..a1e772f 100644 --- a/arch/parisc/kernel/time.c +++ b/arch/parisc/kernel/time.c @@ -205,7 +205,7 @@ static int __init rtc_init(void) device_initcall(rtc_init); #endif -void read_persistent_clock(struct timespec *ts) +void read_persistent_clock64(struct timespec64 *ts) { static struct pdc_tod tod_data; if (pdc_tod_read(&tod_data) == 0) {
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: Baolin Wang <baolin.wang@linaro.org> --- arch/parisc/kernel/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)