Skip to contentSkip to conversation

RTC subsystem and fractions of seconds

DISCUSSION Philippe De Muyter 1 participant 1 message Jan 7, 2007

lore
Share & tools
lore
#0 lore raw
Quoted 7 lines · Hugh Dickins

Author: Matt Mackall <[email protected]>

[PATCH] RTC: Remove RTC UIP synchronization on x86

Reading the CMOS clock on x86 and some other arches currently takes up to one second because it synchronizes with the CMOS second tick-over. This delay shows up at boot time as well a resume time.

That is true if kernel's idea of an RTC's precision is 1 second. With better RTC's (e.g. m41t81) this delay can be reduced to 0.01 second, which is acceptable IMHO in the boot phase. That needs however changes in the kernel interface to RTC's :

- read_time should take a new parameter *nsec (or struct rtc_time should contain a new nsec field, so that the RTC can report its complete time information to the kernel.

- struct rtc_device (or rtc_class_ops with another name) should contain a new field giving the RTC's resolution in nsecs, if we want to avoid the loop, but do not want our 0.01 second precision be destructed by always adding 0.5 second in rtc_hctosys

Philippe