linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* RTC hctosys disabled for 32-bit systems
@ 2022-09-01 11:31 Reinier Kuipers
  2022-09-01 11:55 ` Arnd Bergmann
  0 siblings, 1 reply; 12+ messages in thread
From: Reinier Kuipers @ 2022-09-01 11:31 UTC (permalink / raw)
  To: linux-arm-kernel

Hello all,

I'm working to fix the y2038 issue for an existing sama5d3-based
product. This involves updating the kernel and glibc to appropriate
versions (5.10 and 2.35.1 respectively) and I got things running up to
a state where, from userspace, both date and hwclock commands have no
issue accepting dates beyond 2038. However, even with the RTC_HCTOSYS
and RTC_HCTOSYS_DEVICE options configured correctly, the RTC driver
fails to initialize the system clock at bootup.

Some digging in rtc/class.c::rtc_hctosys() indicates that
do_settimeofday64() is deliberately not executed on systems with
BITS_PER_LONG==32 and a second counter higher than INT_MAX. I assumed
that the work on 64-bits timestamps was already fully implemented for
32-bit systems as well, so my gut feel is that this
BITS_PER_LONG/INT_MAX check has become unnecessary. A test build with
these checks disabled results in correct time initialization at bootup
with, at a glance, no adverse effects. Does anybody here know whether
do_settimeofday64()  is robust on 32-bit systems or that the checks
are still required to prevent further breakage?

Kind regards,
Reinier

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2022-09-02 15:25 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-01 11:31 RTC hctosys disabled for 32-bit systems Reinier Kuipers
2022-09-01 11:55 ` Arnd Bergmann
2022-09-01 12:49   ` Alexandre Belloni
2022-09-01 13:12     ` Arnd Bergmann
2022-09-01 13:46       ` Russell King (Oracle)
2022-09-01 15:48         ` [Y2038] " Arnd Bergmann
2022-09-01 16:02           ` Russell King (Oracle)
2022-09-01 20:33             ` Arnd Bergmann
2022-09-01 21:11               ` Alexandre Belloni
2022-09-02 15:24                 ` Arnd Bergmann
2022-09-01 13:57       ` Alexandre Belloni
2022-09-01 15:29         ` Arnd Bergmann

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