Re: [PATCH] rtc: class: Make the time32 hctosys limit configurable
From: Arnd Bergmann
Date: Tue Oct 06 2026 - 08:35:34 EST
On Mon, Oct 5, 2026, at 15:49, Alexandre Belloni wrote:
> On 24/09/2026 17:07:30+0200, Arnd Bergmann wrote:
>> On Tue, Sep 22, 2026, at 23:37, Alexandre Belloni wrote:
>>
>> Not sure what exactly you are suggesting here. Do you mean we should
>> try again to address this in systemd in order to no longer need
>> the RTC_HCTOSYS hack?
>>
>
> Well I guess we'll get the same answer that this is too late in the boot
> process.
Right
> My proposed solution is to have a way to tell the kernel what size of
> time_t userspace actually supports as there is no way to automatically
> detect it. That's why I was thinking a kernel cmdline parameter would
> fit. This would allow us to be 100% correct.
>
> Else, I'm fine with your last proposal.
Ok, thanks!
A command line argument would work for me as well, if we can make it
have a working default for the COMPAT_32BIT_TIME=n case.
We could of course combine a compile-time and boot-time flag, but
there should not be any need for that.
> I guess this would leave us with
> two unhandled cases:
> - 64bit systems with 32 bit userspace that you said we don't want to
> support
Right, as far as I'm concerned this has always done what I want,
so no need to change it.
> - 32bit systems with 64bit time_t userspace that would not work
> properly with the default configuration.
At this point it's just part of the platform defconfig, and
users can pick the setting.
Arnd