/dev/rtc on alpha
In a nutshell, the rtc driver on alpha does not work. This is easily verified with the small program in Documentation/rtc.txt -- all ioctl's fail. (I tried on an LX164 and a CS20) That's the /dev/rtc driver drivers/char/rtc.c. I'd like to make it work but don't understand what's going on with the rtc interrupt in arch/alpha/kernel/*. So, can some expert comment on this situation for me?
The /dev/rtc driver builds and loads fine but the define RTC_IRQ is not set in include/asm-alpha/mc146818rtc.h. Naievely setting it, the driver still builds and loads, but is unable to grab the interrupt (IRQ 8) because the code in arch/alpha/kernel grabbed it first.
Why is the alpha kernel code grabbing the rtc interrupt? Is it possible it share its use with a user program? Would reprogramming the interrupt rate by a user program do violence to some internel kernel timing?
Thanks,
Bob McElrath [Univ. of California at Davis, Department of Physics]
Quoted 3 lines · Bob McElrath
Why is the alpha kernel code grabbing the rtc interrupt? Is it possible it share its use with a user program? Would reprogramming the interrupt rate by a user program do violence to some internel kernel timing?
On most Alphas RTC is the system timer (running at 1024 Hz). So changing the interrupt rate from user space wouldn't be a good idea.
Ivan.
Quoted 7 lines · Ivan Kokshaysky [[email protected]] wrote:
Quoted 3 lines · Bob McElrath
Why is the alpha kernel code grabbing the rtc interrupt? Is it possible it share its use with a user program? Would reprogramming the interrupt rate by a user program do violence to some internel kernel timing?
On most Alphas RTC is the system timer (running at 1024 Hz). So changing the interrupt rate from user space wouldn't be a good idea.
Then I propose CONFIG_RTC be set to "n" in the arch/alpha files, and the /dev/rtc driver be disabled on alpha. There seems to be confusion on this point in the config files. CONFIG_RTC is for the /dev/rtc driver.
Since the timer can only be set to powers of 2, it should be possible to simulate getting the interrupt by calling the rtc.c interrupt handler every 2^n interrupts...that way the user could program the timer for any interval less than 1024 Hz.
Cheers,
Bob McElrath [Univ. of California at Davis, Department of Physics]
Quoted 6 lines · Bob McElrath
Quoted 5 lines · Ivan Kokshaysky [[email protected]] wrote:
Quoted 3 lines · Bob McElrath
Why is the alpha kernel code grabbing the rtc interrupt? Is it possible it share its use with a user program? Would reprogramming the interrupt rate by a user program do violence to some internel kernel timing?
Quoted 6 lines
Quoted 2 lines
On most Alphas RTC is the system timer (running at 1024 Hz). So changing the interrupt rate from user space wouldn't be a good idea.
Then I propose
CONFIG_RTCbe set to "n" in thearch/alphafiles, and the/dev/rtcdriver be disabled on alpha. There seems to be confusion on this point in the config files.CONFIG_RTCis for the/dev/rtcdriver.
As an alternative, you can try using genrtc instead.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds