tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Patch: more than 1 TOD clock



> On Sep 7, 2026, at 1:34 AM, Julian Coleman <jdc%coris.org.uk@localhost> wrote:
> 
>> It looks straightforward to support multiple TOD clocks, if we read only
>> from the first and write to all of them.  I've done this in the attached
>> patch and both TOD clocks are recognised and written to:
> 
> I've altered the patch to use SIMPLEQ instead, which makes the code (I hope)
> easier to follow.  The main change is that the first TOD reference is now
> also allocated dynamically, rather than statically (as in the original).
> 
> Comments appreciated.

You really need to update the “should skip” logic for this.  It should probably be changed to something along the lines of:

- If todr handle has NULL dev, consider it to be the authoritative TODR (it is likely backed by a CPU register [vax] or a firmware call [like EFI]).

- Otherwise, If the DEVICE_IS_SYSTEM_TODR device call returns true, the consider it to be the authoritative TODR.

- The authoiritative TODR should be at the head of the list, everything else added in disovered order after.

IMO, it would be better to not dynamically allocate memory for this.  Just but the list linkage in the todr handle and bump the kernel version?

-- thorpej



Home | Main Index | Thread Index | Old Index