From: Nikita Schmidt <cetus@snowball.ucd.ie>
Subject: Re: Wrong date with RHL4.1 on PC164
Date: Wed, 7 May 1997 16:27:19 +0100 [thread overview]
Message-ID: <f6e4780c12ec464380359d955237fae0.axp-list@archive.invalid> (raw)
In-Reply-To: <MSGID_242=3A1000=2F22.156_466ce40c@Fido.DE>
Gentlemen, I think that we need a more permanent solution to our
problem.
We must switch to using /dev/rtc. It seems to be the only acceptable
way of dealing with the CMOS clock, and the list of reasons why it is so
is attached below.
/dev/rtc is now broken on Alphas (at least in 2.0.x), but there is a patch
to fix it (21-RTC-alpha2.diff somewhere at http://www.linuxhq.com).
I have modified it to provide more flexible epoch support (that ugly
2017 stuff) with epoch autodetection on Alphas (no more ARC=true!).
I'm going to submit the patch for inclusion into 2.0.31 if nobody stops
me. The patch was posted to axp-kernel-list some days ago.
If anybody wants to give it a try, it is also available by ftp from
genie.ucd.ie:/pub/alpha/kernel/ as rtc-alpha.diff. The (slightly
modified) hwclock program from util-linux-2.6 is in /pub/alpha/hwclock in
both source and binary (compiled with glibc-2) formats.
Now, why I think that /dev/rtc approach is superior.
1. Direct hardware access as practiced by /sbin/clock is getting more
messy with every new supported platform. /dev/rtc is a unified interface
(at least for ix86 and Alpha). The kernel has to be system specific
anyway, and it's always the kernel's task to hide the system dependent
stuff from userland programs.
2. /dev/rtc is the only SMP-safe way to go. I doubt that SMP-aware
alternatives for cli/sti or for atomic() hack as found in Alpha version of
/sbin/clock are going to be provided to user processes in a near future.
3. /sbin/clock is being phased out by the authors of util-linux package
in favour of /sbin/hwclock. In my opinion, it is not worth the effort
to bring the numerous Alpha specific changes (-J, -A, atomic(),
/dev/port) from clock to hwclock, as compared to fixing /dev/rtc in the
kernel. Staying with no longer supported /sbin/clock and watching the
rest of Linux community enjoy bells and whistles of hwclock is no good
either.
After all, kernel interface to hardware is much cleaner than direct
access from the userland, isn't it? That's how all other devices get
accessed by programs. (Except for video cards.)
I realise that the epoch autodetection may not really be a kernel issue,
but that's the way it best fits the current scheme.
Thanks.
Kit
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
next prev parent reply other threads:[~1997-05-07 15:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <MSGID_242=3A1000=2F22.156_466ce40c@Fido.DE>
1997-05-07 5:36 ` Wrong date with RHL4.1 on PC164 Christopher McCrory
1997-05-07 4:58 ` Michal Jaegermann
1997-05-07 15:27 ` Nikita Schmidt [this message]
1997-04-30 9:00 Stephan Schroepfer
1997-05-06 10:22 ` Christoph Franzen
-- strict thread matches above, loose matches on Subject: below --
1997-04-29 13:42 Stephan Schroepfer
1997-04-29 14:57 ` jestabro
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox