linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] parisc: time: Convert read_persistent_clock() to read_persistent_clock64()
@ 2018-04-19  6:51 Baolin Wang
  2018-04-20 15:23 ` Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Baolin Wang @ 2018-04-19  6:51 UTC (permalink / raw)
  To: jejb, deller
  Cc: alexandre.belloni, kstewart, gregkh, tglx, linux-parisc, arnd,
	broonie, linux-kernel, baolin.wang

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(-)

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) {
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] parisc: time: Convert read_persistent_clock() to read_persistent_clock64()
  2018-04-19  6:51 [PATCH] parisc: time: Convert read_persistent_clock() to read_persistent_clock64() Baolin Wang
@ 2018-04-20 15:23 ` Arnd Bergmann
  2018-04-20 18:13   ` Helge Deller
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2018-04-20 15:23 UTC (permalink / raw)
  To: Baolin Wang
  Cc: James E.J. Bottomley, Helge Deller, Alexandre Belloni,
	Kate Stewart, gregkh, Thomas Gleixner, Parisc List, Mark Brown,
	Linux Kernel Mailing List

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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] parisc: time: Convert read_persistent_clock() to read_persistent_clock64()
  2018-04-20 15:23 ` Arnd Bergmann
@ 2018-04-20 18:13   ` Helge Deller
  0 siblings, 0 replies; 3+ messages in thread
From: Helge Deller @ 2018-04-20 18:13 UTC (permalink / raw)
  To: Arnd Bergmann, Baolin Wang
  Cc: James E.J. Bottomley, Alexandre Belloni, Kate Stewart, gregkh,
	Thomas Gleixner, Parisc List, Mark Brown,
	Linux Kernel Mailing List

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-04-20 18:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-19  6:51 [PATCH] parisc: time: Convert read_persistent_clock() to read_persistent_clock64() Baolin Wang
2018-04-20 15:23 ` Arnd Bergmann
2018-04-20 18:13   ` Helge Deller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).