linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Re: rtc again...
@ 2000-08-03 11:24 Iain Sandoe
  0 siblings, 0 replies; 63+ messages in thread
From: Iain Sandoe @ 2000-08-03 11:24 UTC (permalink / raw)
  To: Franz Sirl; +Cc: linuxppc-dev


On  Thu, Aug 3, 2000,  Franz Sirl wrote:
> At 11:00 03.08.00, Martin Costabel wrote:
>>Iain Sandoe wrote:
>> >
>> > Hi,
>> >
>> > under 2.2.17pre15ben1
>> >
>> > rtc does not give me the right answer when built in - what am I doing
>> wrong?
>> >
>> > It won't build load as a module right now 'cos I forgot to check ppc_ksyms
>> > before doing the build :-( .... (I remembered for 2.4.0).
>> >
>> > under 2.4.0-test5 it seems to be fine as a module (haven't tried built in).
>>
>>I am using it as module both for 2.2.17-bk and for 2.4.0-test5. They
>>don't give the same time, and I think it is the one in 2.4.0 that is
>>right. I am at GMT+2:00, and the time in 2.2.17 is 2 hours early. When I
>>change /etc/sysconfig/clock from "UTC=false" to "UTC=true", both times
>>shift by 2 hours, but the discrepancy remains.
>
> Are you sure you are using the "hwclock" utility coming with util-linux?
> And not the old pmac specific "clock" utility to query the clock? What
> happens if you remove all "clock" binaries from your system?

yeah, I checked this.  (although the sbin/clock binary was still there
originally - I removed it).

No change - it's going to take a harder look - later today with luck.

Iain.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 63+ messages in thread
* Re: rtc again...
@ 2000-08-08 14:31 Iain Sandoe
  2000-08-08 17:08 ` Michael Schmitz
  0 siblings, 1 reply; 63+ messages in thread
From: Iain Sandoe @ 2000-08-08 14:31 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Gabriel Paubert, benjamin herrenschmidt, martin costabel,
	linuxppc-dev


On  Tue, Aug 8, 2000,  Geert Uytterhoeven wrote:
> On Tue, 8 Aug 2000, Iain Sandoe wrote:
>> I seems to me (in summary) [since I started this thread :-) ]:
>>
>> we can:
>>
>> (a) Fix up time in the kernel to emulate UTC
>> (b) Fix up time in the kernel to emulates Local Time
>
> Please also think about people who really run their RTC in UTC, who don't run
> MacOS anymore, or who simply don't have a PowerMac.

It was never my intention to suggest otherwise - as (I'm sure) I'm on record
as saying - I've used all of 'em and have no particular favourites or axe to
grind :-)

I *would* like a working solution for those of us whose machines include
pmac and still need MacOS for some jobs.

Iain.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 63+ messages in thread
* Re: rtc again...
@ 2000-08-08 11:35 Iain Sandoe
  2000-08-08 13:14 ` Geert Uytterhoeven
  0 siblings, 1 reply; 63+ messages in thread
From: Iain Sandoe @ 2000-08-08 11:35 UTC (permalink / raw)
  To: Gabriel Paubert, Geert Uytterhoeven
  Cc: benjamin herrenschmidt, martin costabel, linuxppc-dev


On   Tue, Aug 8, 2000, Gabriel Paubert wrote:
> On Fri, 4 Aug 2000, Geert Uytterhoeven wrote:
>
>> > 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) ?
>>
>> Why do you want to handle the offset in the kernel???
>>
>> Any decent distro (e.g. Debian) allows to configure the time system for a
>> hardware clock running in either UTC or local time, so the correction will be
>> done on boot up.
>>
>
> I think there is some misunderstanding here. I don't want to handle the
> offset in the kernel, with one possible exception: when reading the
> RTC for the first time to initialize xtime. Getting timestamps right as early
> as possible might be important in some cases, and it's not a big deal
> since the code to do this is small and thrown away anyway.
>
> Oh and I can't remember whether the clock or hwclock command ever worked
> on my machines. I think hwclock did once upon a time; life is so much
> simpler with NTP anyway (but it is run quite late in the boot process,
> actually just before the rc.local script on most of my machines and after
> mounting NFS file systems and starting daemons like syslogd/crond/inetd).

I seems to me (in summary) [since I started this thread :-) ]:

we can:

(a) Fix up time in the kernel to emulate UTC
(b) Fix up time in the kernel to emulates Local Time

Which (or will both) of these works with hwclock (since that is the
mechanism at 2.4.0 ?)  and for those of us switching to-and-ffo is also
being used at 2.2.17

I would like to make sure that timestamps are right during kernel boot -
and, at the moment, when using 2.2.17 I have to 'artificially' disable rtc
to get the correct time.

For many (paid-by-the-call) telephone network users NTP is not a suitable
option - they don't like the machine making calls without asking.

Iain.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 63+ messages in thread
[parent not found: <20000804205524.383@192.168.1.10>]
* Re: rtc again...
@ 2000-08-03  9:56 Iain Sandoe
  2000-08-03 10:13 ` Benjamin Herrenschmidt
  2000-08-03 11:58 ` Martin Costabel
  0 siblings, 2 replies; 63+ messages in thread
From: Iain Sandoe @ 2000-08-03  9:56 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, martin costabel, linuxppc-dev


and the 2.2.17pre15 dmesg contains the lines:

====
Linux version 2.2.17pre15-ben1-snd (root@athena) (gcc version 2.95.2
19991024 (release/franzo)) #2 Wed Aug 2 23:16:52 BST 2000
[...]
pmac nvram is core99: 0
System has 64 possible interrupts
GMT Delta read from XPRAM: 60 minutes, DST: on

====

which, as I said, works as long as RTC is -not- involved.
are we applying a correct twice?

Iain.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 63+ messages in thread
* Re: rtc again...
@ 2000-08-03  9:41 Iain Sandoe
  0 siblings, 0 replies; 63+ messages in thread
From: Iain Sandoe @ 2000-08-03  9:41 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, martin costabel, linuxppc-dev


>>I am using it as module both for 2.2.17-bk and for 2.4.0-test5. They
>>don't give the same time, and I think it is the one in 2.4.0 that is
>>right. I am at GMT+2:00, and the time in 2.2.17 is 2 hours early. When I
>>change /etc/sysconfig/clock from "UTC=false" to "UTC=true", both times
>>shift by 2 hours, but the discrepancy remains.
>>
>>The following patch for bitkeeper linuxppc_2_2 fixes this problem for
>>me. It brings 2.2.17pre13 in line with 2.4.0-test5 (and MacOS). I cannot
>>test the VIAPMU part, so maybe there the offset is necessary, but for
>>the VIACUDA part, it seems wrong.
>
> You patch reverts a fix I made some time ago. Basially, what probably
> happens is that your RTC is in UTC time, not in local time. The Mac RTC
> is supposed to be in local time, the offset corrects the kernel time on
> boot to account for this. Previously, without that fix, the kernel used
> to boot with a bogus UTC time until userland fixes it.

Hm.  I have exactly the same phenomenon.

I reset my RTC using NTP (on the Mac Side) last night and have daylight
saving set to "automatic".  The Mac timezone is correct (GB).  The Linux
timezone is also correct (GB).  I can't see any other random offsets around
the system.

If rtc is left out (and the module won't/isn't loaded).  2.2.17pre15 gets
the time right (UTC+0100).

If rtc is complied in (and I imagine the same will apply to a working
module) 2.217pre15 gets it one hour wrong. (UTC)

Under 2.4.0-t5 it's OK (well, it agrees with MacOS)...

Note that it has *always* been right with earlier versions of 2.2.x.

Unless, of course, Apple have changed to storing UTC in the transition to
9.0.4 (might ease the way to X?)

Iain.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 63+ messages in thread
* rtc again...
@ 2000-08-02 22:48 Iain Sandoe
  2000-08-03  9:00 ` Martin Costabel
  0 siblings, 1 reply; 63+ messages in thread
From: Iain Sandoe @ 2000-08-02 22:48 UTC (permalink / raw)
  To: linuxppc-dev


Hi,

under 2.2.17pre15ben1

rtc does not give me the right answer when built in - what am I doing wrong?

It won't build load as a module right now 'cos I forgot to check ppc_ksyms
before doing the build :-( .... (I remembered for 2.4.0).

under 2.4.0-test5 it seems to be fine as a module (haven't tried built in).

Iain.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 63+ messages in thread

end of thread, other threads:[~2000-08-14 12:59 UTC | newest]

Thread overview: 63+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-08-03 11:24 rtc again Iain Sandoe
  -- strict thread matches above, loose matches on Subject: below --
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
2000-08-08 11:35 Iain Sandoe
2000-08-08 13:14 ` Geert Uytterhoeven
     [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-03  9:56 Iain Sandoe
2000-08-03 10:13 ` Benjamin Herrenschmidt
2000-08-03 11:58 ` Martin Costabel
2000-08-03  9:41 Iain Sandoe
2000-08-02 22:48 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
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-08-14 12:59                     ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).