linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* /dev/rtc on alpha
@ 2003-11-08 21:33 Bob McElrath
  2003-11-09 11:24 ` Ivan Kokshaysky
  0 siblings, 1 reply; 4+ messages in thread
From: Bob McElrath @ 2003-11-08 21:33 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 955 bytes --]

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]

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: /dev/rtc on alpha
  2003-11-08 21:33 /dev/rtc on alpha Bob McElrath
@ 2003-11-09 11:24 ` Ivan Kokshaysky
  2003-11-09 17:44   ` Bob McElrath
  0 siblings, 1 reply; 4+ messages in thread
From: Ivan Kokshaysky @ 2003-11-09 11:24 UTC (permalink / raw)
  To: Bob McElrath; +Cc: linux-kernel

On Sat, Nov 08, 2003 at 01:33:57PM -0800, Bob McElrath wrote:
> 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.

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

* Re: /dev/rtc on alpha
  2003-11-09 11:24 ` Ivan Kokshaysky
@ 2003-11-09 17:44   ` Bob McElrath
  2003-11-09 19:05     ` Geert Uytterhoeven
  0 siblings, 1 reply; 4+ messages in thread
From: Bob McElrath @ 2003-11-09 17:44 UTC (permalink / raw)
  To: Ivan Kokshaysky; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1036 bytes --]

Ivan Kokshaysky [ink@jurassic.park.msu.ru] wrote:
> On Sat, Nov 08, 2003 at 01:33:57PM -0800, Bob McElrath wrote:
> > 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]

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: /dev/rtc on alpha
  2003-11-09 17:44   ` Bob McElrath
@ 2003-11-09 19:05     ` Geert Uytterhoeven
  0 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2003-11-09 19:05 UTC (permalink / raw)
  To: Bob McElrath; +Cc: Ivan Kokshaysky, Linux Kernel Development

On Sun, 9 Nov 2003, Bob McElrath wrote:
> Ivan Kokshaysky [ink@jurassic.park.msu.ru] wrote:
> > On Sat, Nov 08, 2003 at 01:33:57PM -0800, Bob McElrath wrote:
> > > 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.

As an alternative, you can try using genrtc instead.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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


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

end of thread, other threads:[~2003-11-09 19:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-08 21:33 /dev/rtc on alpha Bob McElrath
2003-11-09 11:24 ` Ivan Kokshaysky
2003-11-09 17:44   ` Bob McElrath
2003-11-09 19:05     ` Geert Uytterhoeven

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).