Re: updating the RTC automagically

Guest section DW (dwguest@win.tue.nl)
Fri, 19 Nov 1999 11:39:06 +0100


On Fri, Nov 19, 1999 at 08:10:25AM +0200, Ulrich Windl wrote:

> > (ii) This would add a very large amount of bloat without any
> > increase in functionality.
>
> I think it would be a great chance to fix hardware dependent things
> where it is the best place. What can hwclock do that the kernel
> can't, or: How can hwclock set the kernel, if the kernel can't. Would
> you implement code for any of the platforms using #ifdef or what?

You can read the code, say in util-linux-2.10*.

This time-setting stuff is a bit of a mess - not all chips follow
the original mc146818rtc in all details.
The result is that, even though kernel (/dev/rtc) and "hwclock --directisa"
do more or less the same things, "hwclock --directisa" succeeds in some
cases, where the kernel fails (e.g., hangs). I think I do not know of cases
where the two possible approaches of hwclock, namely via /dev/rtc and via
direct port access, both fail.

> I don't want to put the DST decision logic into the kernel,
> just the timezone offset.
>
> The latter is needed by DOSish filesystems anyway.

But the timezone offset is already maintained in the kernel.
(The way it is done is broken, but that is a different matter.)
And hwclock tells the kernel about the present timezone.

Andries

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/