set_rtc_time() cleanup / normalization

Benjamin Herrenschmidt benh at
Wed May 14 18:32:33 EST 2003

> 2) set_rtc_time() implementation for concrete RTC device *maybe* slow or
> just cannot
>     be called from the interrupt context.
>     Why just don't fix actual RTC code in each case ?
>     It may be useful to provide some *generic* facility for such cases.

It may just not be fixable cleanly. If you RTC is on a bus which requires
some semaphoring for access (i2c does on pmac, though so far, the RTC isn't
on i2c on these, I admit), or which is just so slow that you really do NOT
want to block the machine in an interrupt that long ?

Actually, the later is the most nasty. Also, since set_rtc_time() is used for
both interrupt call and non-interrupt call, it cannot make assumptions about
beeing able to schedule or not, thus causing the same latency problem when
called via /dev/rtc, possibly a good DOS attack tool, but more simply, it
just suck that way...


** Sent via the linuxppc-dev mail list. See

More information about the Linuxppc-dev mailing list