From: Reinier Kuipers <kuipers.reinier@gmail.com>
To: linux-arm-kernel@lists.infradead.org
Subject: RTC hctosys disabled for 32-bit systems
Date: Thu, 1 Sep 2022 13:31:55 +0200 [thread overview]
Message-ID: <CAKYb531CyL8XRVRcRN30cC3xRgsd-1FzXUeS7o2LiZqALJ42qw@mail.gmail.com> (raw)
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
next reply other threads:[~2022-09-01 11:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-01 11:31 Reinier Kuipers [this message]
2022-09-01 11:55 ` RTC hctosys disabled for 32-bit systems 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKYb531CyL8XRVRcRN30cC3xRgsd-1FzXUeS7o2LiZqALJ42qw@mail.gmail.com \
--to=kuipers.reinier@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).