From: Benjamin Herrenschmidt <bh40@calva.net>
To: Gabriel Paubert <paubert@iram.es>, <linuxppc-dev@lists.linuxppc.org>
Subject: Re: rtc again...
Date: Thu, 3 Aug 2000 13:14:22 +0200 [thread overview]
Message-ID: <20000803111422.1301@mailhost.mipsys.com> (raw)
In-Reply-To: <Pine.HPX.4.10.10008031133480.9070-100000@gra-ux1.iram.es>
>
>Actually given the problems with RTC being UTC or local time, the offset
>might perhaps better be setup as a kernel parameter so that th system
>start up in a known good state. It seems that it is in RAM for Macs, but
>what about other machines (I have no problems since all my machines are
>UTC and I simply refuse to use an OS which requires anything else) ?
Most "sane" RTCs are in UTC. On PReP and CHRP, this is not a problem,
they use, I think, legacy RTC hardware and so you just need to set it up
correctly in UTC.
On Macs, it's slightly different. MacOS expects the RTC to be in local
time and stores the timezone and DSL state in PRAM. I recently added
fixup code in pmac_time.c for reading that value and correctly setting
the kernel timezone at boot from it. Paul improved on my code by adding
the ability to save modified timezone back to PRAM. I think there's still
an issue with DST. There's a field for storing it in the kernel tz
structure, but I'm not sure it's fully defined or used. I beleive this
could be easily fixed by looking at what hwclock does, and eventually
fixing it.
Note that all this affects only powermacs, and the /dev/rtc driver we are
talking about here is the pmac-only one in drivers/macintosh.
>Note that I have removed the #if 0 to prevent RTC update from Bemjamin,
>the code was completely bogus to start with: you should only update the
>RTC when STA_UNSYNC is clear, not when it is set. If you are using NTP,
>you don't need anything else: set CONFIG_PPC_RTC off, NTP does RTC updates
>through adjtimex and this should simply work right out of the box with
>this patch, at least it does for me and the clock is very stable.
Did you remove the #if 0 or did you remove the code that is #if 0'ed ?
That code seem to originate from other archs and was causing a lot of
trouble when enabling the pmac_rtc_set_time() since it was writing bogus
times to the RTC during boot (at that time, I didn't yet added the code
to read the timezone from the PRAM).
Also, I didn't see why the kernel would keep updating the RTC hardware,
the sounded bogus to me and a userland matter, not a kernel matter (but
maybe I missed something). So I #if'ed it out. Removing it completely
sounds fine.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2000-08-03 11:14 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-08-02 22:48 rtc again Iain Sandoe
2000-08-03 9:00 ` Martin Costabel
2000-08-03 9:30 ` Benjamin Herrenschmidt
2000-08-03 10:54 ` Gabriel Paubert
2000-08-03 11:14 ` Benjamin Herrenschmidt [this message]
2000-08-03 11:25 ` Gabriel Paubert
2000-08-03 11:45 ` Gabriel Paubert
2000-08-03 13:25 ` Benjamin Herrenschmidt
2000-08-03 23:33 ` Takashi Oe
2000-08-04 8:55 ` Gabriel Paubert
2000-08-04 15:25 ` David Edelsohn
2000-08-04 15:50 ` Benjamin Herrenschmidt
2000-08-07 12:33 ` Gabriel Paubert
2000-08-07 11:51 ` Gabriel Paubert
2000-08-07 13:18 ` Benjamin Herrenschmidt
2000-08-07 15:14 ` David Edelsohn
2000-08-07 21:16 ` Gabriel Paubert
2000-08-08 1:39 ` Paul Mackerras
2000-08-11 11:04 ` Gabriel Paubert
2000-08-12 6:29 ` Paul Mackerras
2000-08-12 12:02 ` Ethan Benson
2000-08-12 12:51 ` Gabriel Paubert
2000-08-12 18:46 ` Gabriel Paubert
2000-09-17 16:47 ` dual G4 time issues Troy Benjegerdes
2000-08-14 12:59 ` rtc again Gabriel Paubert
[not found] ` <Pine.LNX.3.96LJ1.1b7.1000803182949.650C-100000@ofey.earthl ink.net>
2000-08-03 23:58 ` Franz Sirl
2000-08-04 0:33 ` Takashi Oe
2000-08-04 12:54 ` Benjamin Herrenschmidt
2000-08-04 13:40 ` Takashi Oe
2000-08-04 13:20 ` Geert Uytterhoeven
2000-08-08 11:20 ` Gabriel Paubert
2000-08-03 10:31 ` Franz Sirl
-- strict thread matches above, loose matches on Subject: below --
2000-08-03 9:41 Iain Sandoe
2000-08-03 9:56 Iain Sandoe
2000-08-03 10:13 ` Benjamin Herrenschmidt
2000-08-03 11:58 ` Martin Costabel
2000-08-03 11:24 Iain Sandoe
[not found] <20000804205524.383@192.168.1.10>
2000-08-05 1:10 ` Takashi Oe
2000-08-05 11:25 ` Benjamin Herrenschmidt
2000-08-05 14:44 ` Takashi Oe
2000-08-08 11:35 Iain Sandoe
2000-08-08 13:14 ` Geert Uytterhoeven
2000-08-08 14:31 Iain Sandoe
2000-08-08 17:08 ` Michael Schmitz
2000-08-08 17:41 ` Benjamin Herrenschmidt
2000-08-08 22:44 ` Gabriel Paubert
2000-08-09 8:44 ` Benjamin Herrenschmidt
2000-08-09 11:32 ` Martin Costabel
2000-08-09 13:50 ` Gabriel Paubert
2000-08-09 15:25 ` Benjamin Herrenschmidt
2000-08-09 16:54 ` Takashi Oe
2000-08-09 17:04 ` Benjamin Herrenschmidt
2000-08-09 23:12 ` Takashi Oe
2000-08-09 23:48 ` Benjamin Herrenschmidt
2000-08-09 22:13 ` Gabriel Paubert
2000-08-09 22:48 ` Benjamin Herrenschmidt
2000-08-10 3:08 ` Gabriel Paubert
2000-08-10 0:00 ` William Blew
2000-08-09 14:26 ` Takashi Oe
2000-08-09 0:55 ` Takashi Oe
2000-08-09 8:48 ` Benjamin Herrenschmidt
2000-08-09 16:37 ` Takashi Oe
2000-08-09 22:46 ` Gabriel Paubert
2000-08-09 14:24 ` Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20000803111422.1301@mailhost.mipsys.com \
--to=bh40@calva.net \
--cc=linuxppc-dev@lists.linuxppc.org \
--cc=paubert@iram.es \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.