From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: X-Archive-Original-Message-ID: <199608152118.XAA29214@picard.cistron.nl> Date: Thu, 15 Aug 1996 23:18:36 +0200 (MET DST) From: Miquel van Smoorenburg Subject: More about the RTC (Real Time Clock). In-Reply-To: <43686nhjkp.fsf@comnets.rwth-aachen.de> [Cc'ing this to Paul Gortmaker, who wrote linux/drivers/char/rtc.c. Paul, this is about a problem with /dev/rtc. On the Alpha, the kernel timer interrupt stops when reading/setting the CMOS with /dev/rtc] You (Martin Ostermann) wrote: > Miquel van Smoorenburg writes: > > > I've re-written clock(1) to use /dev/rtc instead of inline assembly > > (which only works on the i386 ofcourse). Now this works fine on the > > i386, but on my Jensen it lets the machine hang. > > Actually, there is a version, which uses libc's i/o > functions. You can find a working binary on my web page. I've tried that patch (well the version that is on azstarnet, which is almost the same). Somehow it just doesn't work. Then I tried to turn on USE_DEV_PORT et voila.. it worked. For reading the clock. However _setting_ the CMOS clock stops the kernel's timer interrupt. Oh boy what fun. Everything seems to work but sleeps never end, alarms don't go off, etc. Same effect as using /dev/rtc. > BTW, I thought /dev/rtc was just a timing device, not an absolute time > base? Thus I didn't bother to use it... No it is a generic interface to the mc146818 chip. The strange thing is that if I read the time from /dev/rtc (using ioctl(fd, RTC_RD_TIME, &rtc)) the kernel timer interrupts stops. However a cat /proc/rtc, which _also_ reads the RTC, works fine! In fact, the timer interrupt is stopped so rigourously that after a warm reboot the kernel stops at the BogoMips calculation.. it never gets the interrupt. I have to turn the machine off & on.. Any CMOS clock gurus that have a hint ? BTW. As said before, on the i386 this works fine. Mike. -- Miquel van | Cistron Internet Services -- Alphen aan den Rijn. Smoorenburg, | mailto:info@cistron.nl http://www.cistron.nl/ miquels@het.net | Tel: +31-172-419445 (Voice) 430979 (Fax) 442580 (Data) -- To unsubscribe: mail -s unsubscribe axp-list-request@redhat.com < /dev/null