public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* RTC Chip and IRQ8 on 2.6.9
@ 2004-11-12 16:47 linux-os
  2004-11-14  4:36 ` Randy.Dunlap
  2004-11-14 12:27 ` Florian Schmidt
  0 siblings, 2 replies; 5+ messages in thread
From: linux-os @ 2004-11-12 16:47 UTC (permalink / raw)
  To: Linux kernel


I must use the RTC and IRQ8 in a driver being ported from
2.4.20 to 2.6.9. When I attempt request_irq(8,...), it
returns -EBUSY. I have disabled everything in .config
that has "RTC" in it.

The RTC interrupt is used to precisely time the sequencing
of a precision A/D converter. It is mandatory that I use
it because the precise interval is essential for its
IIR filter that produces 20 bits of resolution from a
16 bit A/D.

            CPU0
   0:   60563767    IO-APIC-edge  timer
   1:      57096    IO-APIC-edge  i8042
   8:          1    IO-APIC-edge  rtc
   9:          0   IO-APIC-level  acpi
  12:         66    IO-APIC-edge  i8042
  14:     112322    IO-APIC-edge  ide0
  16:          0   IO-APIC-level  uhci_hcd, uhci_hcd
  18:        640   IO-APIC-level  libata, uhci_hcd, Analogic Corp DLB
  19:          0   IO-APIC-level  uhci_hcd
  20:    4894484   IO-APIC-level  eth0
  21:     110543   IO-APIC-level  aic7xxx
  23:          0   IO-APIC-level  ehci_hcd
NMI:          0 
LOC:   60565403 
ERR:          0
MIS:          0

This stuff works fine in 2.4.22 and, in fact, I'm the guy
that added the global rtc_lock so that this very driver
could run without interfering with anybody. Now, some code,
somewhere (not in a module), has allocated the interrupt
and generated exactly 1 interrupt. The kernel won't let
me use that interrupt!

How do I undo this so I can use my hardware on my machine?

Cheers,
Dick Johnson
Penguin : Linux version 2.6.9 on an i686 machine (5537.79 BogoMips).
  Notice : All mail here is now cached for review by John Ashcroft.
                  98.36% of all statistics are fiction.

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

* Re: RTC Chip and IRQ8 on 2.6.9
  2004-11-12 16:47 RTC Chip and IRQ8 on 2.6.9 linux-os
@ 2004-11-14  4:36 ` Randy.Dunlap
  2004-11-14 14:25   ` linux-os
  2004-11-14 12:27 ` Florian Schmidt
  1 sibling, 1 reply; 5+ messages in thread
From: Randy.Dunlap @ 2004-11-14  4:36 UTC (permalink / raw)
  To: linux-os; +Cc: Linux kernel

linux-os wrote:
> 
> I must use the RTC and IRQ8 in a driver being ported from
> 2.4.20 to 2.6.9. When I attempt request_irq(8,...), it
> returns -EBUSY. I have disabled everything in .config
> that has "RTC" in it.
> 
> The RTC interrupt is used to precisely time the sequencing
> of a precision A/D converter. It is mandatory that I use
> it because the precise interval is essential for its
> IIR filter that produces 20 bits of resolution from a
> 16 bit A/D.
> 
>            CPU0
>   0:   60563767    IO-APIC-edge  timer
>   1:      57096    IO-APIC-edge  i8042
>   8:          1    IO-APIC-edge  rtc
>   9:          0   IO-APIC-level  acpi
>  12:         66    IO-APIC-edge  i8042
>  14:     112322    IO-APIC-edge  ide0
>  16:          0   IO-APIC-level  uhci_hcd, uhci_hcd
>  18:        640   IO-APIC-level  libata, uhci_hcd, Analogic Corp DLB
>  19:          0   IO-APIC-level  uhci_hcd
>  20:    4894484   IO-APIC-level  eth0
>  21:     110543   IO-APIC-level  aic7xxx
>  23:          0   IO-APIC-level  ehci_hcd
> NMI:          0 LOC:   60565403 ERR:          0
> MIS:          0
> 
> This stuff works fine in 2.4.22 and, in fact, I'm the guy
> that added the global rtc_lock so that this very driver
> could run without interfering with anybody. Now, some code,
> somewhere (not in a module), has allocated the interrupt
> and generated exactly 1 interrupt. The kernel won't let
> me use that interrupt!
> 
> How do I undo this so I can use my hardware on my machine?

I happen to be running a 2.6.9-rc1 kernel right now, with
an IO APIC (P4 UP), and no RTC support built into it,
and /proc/interrupts show IRQ 8 empty/unassigned:

            CPU0
   0:  777037582    IO-APIC-edge  timer
   1:     185323    IO-APIC-edge  i8042
   7:          0    IO-APIC-edge  parport0
   9:          0   IO-APIC-level  acpi
  12:    2838473    IO-APIC-edge  i8042
  14:    1197859    IO-APIC-edge  ide0
  15:         42    IO-APIC-edge  ide1
  17:         49   IO-APIC-level  aic7xxx, ohci_hcd
  19:          0   IO-APIC-level  uhci_hcd
  21:        197   IO-APIC-level  ohci1394, ohci_hcd, ohci_hcd, 
ohci_hcd, ohci_hc
d, ohci_hcd
  22:     832350   IO-APIC-level  ehci_hcd, eth0
  23:      16387   IO-APIC-level  es1371, uhci_hcd
NMI:          0
LOC:  776994543
ERR:          0
MIS:          0


Perhaps your .config and a simple test case would help.

-- 
~Randy

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

* Re: RTC Chip and IRQ8 on 2.6.9
  2004-11-12 16:47 RTC Chip and IRQ8 on 2.6.9 linux-os
  2004-11-14  4:36 ` Randy.Dunlap
@ 2004-11-14 12:27 ` Florian Schmidt
  2004-11-14 14:28   ` linux-os
  1 sibling, 1 reply; 5+ messages in thread
From: Florian Schmidt @ 2004-11-14 12:27 UTC (permalink / raw)
  To: linux-os; +Cc: linux-os, Linux kernel

On Fri, 12 Nov 2004 11:47:10 -0500 (EST)
linux-os <linux-os@chaos.analogic.com> wrote:

> 
> I must use the RTC and IRQ8 in a driver being ported from
> 2.4.20 to 2.6.9. When I attempt request_irq(8,...), it
> returns -EBUSY. I have disabled everything in .config
> that has "RTC" in it.
> 
> The RTC interrupt is used to precisely time the sequencing
> of a precision A/D converter. It is mandatory that I use
> it because the precise interval is essential for its
> IIR filter that produces 20 bits of resolution from a
> 16 bit A/D.
> 
>    8:          1    IO-APIC-edge  rtc

maybe it's the HPET timer providing rtc emulation?

flo

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

* Re: RTC Chip and IRQ8 on 2.6.9
  2004-11-14  4:36 ` Randy.Dunlap
@ 2004-11-14 14:25   ` linux-os
  0 siblings, 0 replies; 5+ messages in thread
From: linux-os @ 2004-11-14 14:25 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: Linux kernel

On Sat, 13 Nov 2004, Randy.Dunlap wrote:

> linux-os wrote:
>> 
>> I must use the RTC and IRQ8 in a driver being ported from
>> 2.4.20 to 2.6.9. When I attempt request_irq(8,...), it
>> returns -EBUSY. I have disabled everything in .config
>> that has "RTC" in it.
>> 
>> The RTC interrupt is used to precisely time the sequencing
>> of a precision A/D converter. It is mandatory that I use
>> it because the precise interval is essential for its
>> IIR filter that produces 20 bits of resolution from a
>> 16 bit A/D.
>> 
>>            CPU0
>>   0:   60563767    IO-APIC-edge  timer
>>   1:      57096    IO-APIC-edge  i8042
>>   8:          1    IO-APIC-edge  rtc
>>   9:          0   IO-APIC-level  acpi
>>  12:         66    IO-APIC-edge  i8042
>>  14:     112322    IO-APIC-edge  ide0
>>  16:          0   IO-APIC-level  uhci_hcd, uhci_hcd
>>  18:        640   IO-APIC-level  libata, uhci_hcd, Analogic Corp DLB
>>  19:          0   IO-APIC-level  uhci_hcd
>>  20:    4894484   IO-APIC-level  eth0
>>  21:     110543   IO-APIC-level  aic7xxx
>>  23:          0   IO-APIC-level  ehci_hcd
>> NMI:          0 LOC:   60565403 ERR:          0
>> MIS:          0
>> 
>> This stuff works fine in 2.4.22 and, in fact, I'm the guy
>> that added the global rtc_lock so that this very driver
>> could run without interfering with anybody. Now, some code,
>> somewhere (not in a module), has allocated the interrupt
>> and generated exactly 1 interrupt. The kernel won't let
>> me use that interrupt!
>> 
>> How do I undo this so I can use my hardware on my machine?
>
> I happen to be running a 2.6.9-rc1 kernel right now, with
> an IO APIC (P4 UP), and no RTC support built into it,
> and /proc/interrupts show IRQ 8 empty/unassigned:
>
>           CPU0
>  0:  777037582    IO-APIC-edge  timer
>  1:     185323    IO-APIC-edge  i8042
>  7:          0    IO-APIC-edge  parport0
>  9:          0   IO-APIC-level  acpi
> 12:    2838473    IO-APIC-edge  i8042
> 14:    1197859    IO-APIC-edge  ide0
> 15:         42    IO-APIC-edge  ide1
> 17:         49   IO-APIC-level  aic7xxx, ohci_hcd
> 19:          0   IO-APIC-level  uhci_hcd
> 21:        197   IO-APIC-level  ohci1394, ohci_hcd, ohci_hcd, ohci_hcd, 
> ohci_hc
> d, ohci_hcd
> 22:     832350   IO-APIC-level  ehci_hcd, eth0
> 23:      16387   IO-APIC-level  es1371, uhci_hcd
> NMI:          0
> LOC:  776994543
> ERR:          0
> MIS:          0
>
>
> Perhaps your .config and a simple test case would help.

Yep. The .config needed to set up RTC as a module so that
I could unload it (seriously) in order to free it up.

Otherwise the built-in RTC software grabbed IRQ8 even though
it never used it.

Cheers,
Dick Johnson
Penguin : Linux version 2.6.9 on an i686 machine (5537.79 BogoMips).
  Notice : All mail here is now cached for review by John Ashcroft.
                  98.36% of all statistics are fiction.

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

* Re: RTC Chip and IRQ8 on 2.6.9
  2004-11-14 12:27 ` Florian Schmidt
@ 2004-11-14 14:28   ` linux-os
  0 siblings, 0 replies; 5+ messages in thread
From: linux-os @ 2004-11-14 14:28 UTC (permalink / raw)
  To: Florian Schmidt; +Cc: Linux kernel

On Sun, 14 Nov 2004, Florian Schmidt wrote:

> On Fri, 12 Nov 2004 11:47:10 -0500 (EST)
> linux-os <linux-os@chaos.analogic.com> wrote:
>
>>
>> I must use the RTC and IRQ8 in a driver being ported from
>> 2.4.20 to 2.6.9. When I attempt request_irq(8,...), it
>> returns -EBUSY. I have disabled everything in .config
>> that has "RTC" in it.
>>
>> The RTC interrupt is used to precisely time the sequencing
>> of a precision A/D converter. It is mandatory that I use
>> it because the precise interval is essential for its
>> IIR filter that produces 20 bits of resolution from a
>> 16 bit A/D.
>>
>>    8:          1    IO-APIC-edge  rtc
>
> maybe it's the HPET timer providing rtc emulation?
>
> flo
>
It turned out to be RTC timer software that, when built-in,
grabbed IRQ8 even though it didn't use it. I reconfigured
it as a module. Then, when I unload the module, the IRQ gets
freed up. (Fedora loads, I guess, everything...).


Cheers,
Dick Johnson
Penguin : Linux version 2.6.9 on an i686 machine (5537.79 BogoMips).
  Notice : All mail here is now cached for review by John Ashcroft.
                  98.36% of all statistics are fiction.

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

end of thread, other threads:[~2004-11-14 14:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-12 16:47 RTC Chip and IRQ8 on 2.6.9 linux-os
2004-11-14  4:36 ` Randy.Dunlap
2004-11-14 14:25   ` linux-os
2004-11-14 12:27 ` Florian Schmidt
2004-11-14 14:28   ` linux-os

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox