* IP22 RTC bug on 64bit 2.6 kernels ?
@ 2006-07-08 22:02 Julien BLACHE
2006-07-08 22:21 ` Julien BLACHE
0 siblings, 1 reply; 2+ messages in thread
From: Julien BLACHE @ 2006-07-08 22:02 UTC (permalink / raw)
To: debian-mips; +Cc: linux-mips
Hi,
For some time now, my IP22 was booting in a "back to the future" mode,
somewhere between 1983 and 1987 (usually, 1985). Interestingly enough,
only the year comes out wrong, everything else is perfectly OK.
This is not the RTC chip at fault, as everything else stored in the
NVRAM is OK too. I was prepared to order a new RTC chip, until...
Until I remembered that it all started with the new 64bit 2.6 kernels
built by Martin Michlmayr in Debian. Indeed, rebooting into a 32bit
2.4.27 the problem goes away.
Using the 2.6 kernel (2.6.17), hwclock -w/hwclock -r will not give the
same year twice in a row, which is quite fun and unexpected. I
couldn't find a logic of some kind in the values read from the RTC;
the year went as far as 1972 and as close as 2007 :)
So, it looks like there is a bug in this area with (at least) 64bit
2.6 kernels. Is there any known bug ? Anything I can do to help track
the problem down ?
Thanks,
JB.
--
Julien BLACHE - Debian & GNU/Linux Developer - <jblache@debian.org>
Public key available on <http://www.jblache.org> - KeyID: F5D6 5169
GPG Fingerprint : 935A 79F1 C8B3 3521 FD62 7CC7 CD61 4FD7 F5D6 5169
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: IP22 RTC bug on 64bit 2.6 kernels ?
2006-07-08 22:02 IP22 RTC bug on 64bit 2.6 kernels ? Julien BLACHE
@ 2006-07-08 22:21 ` Julien BLACHE
0 siblings, 0 replies; 2+ messages in thread
From: Julien BLACHE @ 2006-07-08 22:21 UTC (permalink / raw)
To: debian-mips; +Cc: linux-mips
[-- Attachment #1: Type: text/plain, Size: 426 bytes --]
Julien BLACHE <jblache@debian.org> wrote:
Hi,
> So, it looks like there is a bug in this area with (at least) 64bit
> 2.6 kernels. Is there any known bug ? Anything I can do to help track
> the problem down ?
Ok, it's brown paper bag time for someone :-)
This patch fixes a typo in arch/mips/sgi-ip22/ip22-time.c, leading to
the incorrect year being set into the RTC chip.
Signed-off-by: Julien BLACHE <jb@jblache.org>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Typo fix in arch/mips/sgi-ip22/ip22-time.c --]
[-- Type: text/x-patch, Size: 524 bytes --]
--- arch/mips/sgi-ip22/ip22-time.c.orig 2006-07-08 22:17:02.000000000 +0000
+++ arch/mips/sgi-ip22/ip22-time.c 2006-07-08 22:17:29.000000000 +0000
@@ -76,7 +76,7 @@
save_control = hpc3c0->rtcregs[RTC_CMD] & 0xff;
hpc3c0->rtcregs[RTC_CMD] = save_control | RTC_TE;
- hpc3c0->rtcregs[RTC_YEAR] = BIN2BCD(tm.tm_sec);
+ hpc3c0->rtcregs[RTC_YEAR] = BIN2BCD(tm.tm_year);
hpc3c0->rtcregs[RTC_MONTH] = BIN2BCD(tm.tm_mon);
hpc3c0->rtcregs[RTC_DATE] = BIN2BCD(tm.tm_mday);
hpc3c0->rtcregs[RTC_HOURS] = BIN2BCD(tm.tm_hour);
[-- Attachment #3: Type: text/plain, Size: 232 bytes --]
Thanks,
JB.
--
Julien BLACHE - Debian & GNU/Linux Developer - <jblache@debian.org>
Public key available on <http://www.jblache.org> - KeyID: F5D6 5169
GPG Fingerprint : 935A 79F1 C8B3 3521 FD62 7CC7 CD61 4FD7 F5D6 5169
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-07-08 22:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-08 22:02 IP22 RTC bug on 64bit 2.6 kernels ? Julien BLACHE
2006-07-08 22:21 ` Julien BLACHE
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox