linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Most interrupts are edge-triggered, non-APIC system
@ 2006-06-01 21:04 Daniel Drake
  2006-06-05 18:43 ` Bjorn Helgaas
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Drake @ 2006-06-01 21:04 UTC (permalink / raw)
  To: linux-acpi; +Cc: joliveirinha

Hi,

João Oliveirinha reported a bug related to the sky2 network driver on 
the Gentoo bugzilla. Stephen Hemminger (sky2 author) kindly helped 
diagnose the issues, and he believes that one of the reasons why things 
are running sub-optimally is because the interrupt assigned to sky2 is 
edge-triggered (NAPI requires things to be level-triggered).

The system is a bit odd in that even on the latest BIOS, APIC support is 
apparently completely non-functional (or maybe just non-existent?). Even 
when the "lapic" parameter is used, ACPI appears to be used exclusively 
for interrupt routing.

This is a Toshiba M40-298 laptop.

Here is the interrupts map:

            CPU0
   0:      47094          XT-PIC  timer
   1:        541          XT-PIC  i8042
   2:          0          XT-PIC  cascade
   9:         13          XT-PIC  acpi
  10:       5548          XT-PIC  ehci_hcd:usb1, uhci_hcd:usb2, Intel ICH6
  11:         27          XT-PIC  uhci_hcd:usb3, uhci_hcd:usb4, 
uhci_hcd:usb5, yenta, sdhci:slot0, sdhci:slot1, sdhci:slot2, ohci1394, sky2
  12:        618          XT-PIC  i8042
  14:       7384          XT-PIC  libata
  15:       1275          XT-PIC  libata
NMI:          0
LOC:          0
ERR:          0
MIS:          0

And the ELCR register:
	ACPI: setting ELCR to 0200 (from 0c20)

0200 suggests that IRQ 9 is the only level-triggered interrupt. Also, 
the interrupts are heavily shared, I'm not sure if this is another 
reason for concern...

Anyway, I'm not too familiar with ACPI or interrupt routing, so: do you 
regard it as a bug that so many interrupts are level-triggered?

If so, we can get it filed at the kernel bugzilla if appropriate.

Here is some info that might be useful:

dmesg dump with ACPI debugging enabled:
http://bugs.gentoo.org/attachment.cgi?id=85619&action=view

dmesg with the lapic parameter used at boot:
https://bugs.gentoo.org/attachment.cgi?id=85540&action=view

acpidump:
https://bugs.gentoo.org/attachment.cgi?id=85685&action=view

The actual bug report:
http://bugs.gentoo.org/show_bug.cgi?id=131274

Thanks,
Daniel
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: Most interrupts are edge-triggered, non-APIC system
  2006-06-01 21:04 Most interrupts are edge-triggered, non-APIC system Daniel Drake
@ 2006-06-05 18:43 ` Bjorn Helgaas
  2006-06-05 19:56   ` Daniel Drake
  0 siblings, 1 reply; 4+ messages in thread
From: Bjorn Helgaas @ 2006-06-05 18:43 UTC (permalink / raw)
  To: Daniel Drake; +Cc: linux-acpi, joliveirinha

On Thursday 01 June 2006 15:04, Daniel Drake wrote:
> João Oliveirinha reported a bug related to the sky2 network driver on 
> the Gentoo bugzilla. Stephen Hemminger (sky2 author) kindly helped 
> diagnose the issues, and he believes that one of the reasons why things 
> are running sub-optimally is because the interrupt assigned to sky2 is 
> edge-triggered (NAPI requires things to be level-triggered).

I'm not convinced that the sky2 interrupt is edge-triggered.

The "ELCR" line:
  ACPI: setting ELCR to 0200 (from 0c20)
only shows the ELCR state early during boot when we're setting
up the ACPI SCI interrupt.

Interrupts can also be set to level-triggered mode later, when
the driver claims the device.  This in the acpi_register_gsi() ->
eisa_set_level_irq() path and prints a different message.

Attachment http://bugs.gentoo.org/attachment.cgi?id=85619&action=view
shows that sky2 should be on IRQ11, and it should be level-triggered:

  ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 11
  PCI: setting IRQ 11 as level-triggered
  ACPI: PCI Interrupt 0000:00:01.0[A] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11
  ...
  ACPI: PCI Interrupt 0000:02:00.0[A] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11
  PCI: Setting latency timer of device 0000:02:00.0 to 64
  sky2 v0.15 addr 0xbc000000 irq 11 Yukon-FE (0xb7) rev 1

(sky2 shares the interrupt with other devices, so we set IRQ 11
to be level-triggered when we enable the interrupt for one of
the other devices, so the "setting IRQ 11 as level-triggered"
message is earlier than the sky2 driver init.)

Bjorn
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: Most interrupts are edge-triggered, non-APIC system
  2006-06-05 18:43 ` Bjorn Helgaas
@ 2006-06-05 19:56   ` Daniel Drake
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Drake @ 2006-06-05 19:56 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-acpi, joliveirinha, Stephen Hemminger

Bjorn Helgaas wrote:
> On Thursday 01 June 2006 15:04, Daniel Drake wrote:
>> João Oliveirinha reported a bug related to the sky2 network driver on 
>> the Gentoo bugzilla. Stephen Hemminger (sky2 author) kindly helped 
>> diagnose the issues, and he believes that one of the reasons why things 
>> are running sub-optimally is because the interrupt assigned to sky2 is 
>> edge-triggered (NAPI requires things to be level-triggered).
> 
> I'm not convinced that the sky2 interrupt is edge-triggered.

Thanks for the explanation, that makes sense. Stephen, you might be 
interested in this: (don't worry, nothing is broken!)

> The "ELCR" line:
>   ACPI: setting ELCR to 0200 (from 0c20)
> only shows the ELCR state early during boot when we're setting
> up the ACPI SCI interrupt.
> 
> Interrupts can also be set to level-triggered mode later, when
> the driver claims the device.  This in the acpi_register_gsi() ->
> eisa_set_level_irq() path and prints a different message.
> 
> Attachment http://bugs.gentoo.org/attachment.cgi?id=85619&action=view
> shows that sky2 should be on IRQ11, and it should be level-triggered:
> 
>   ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 11
>   PCI: setting IRQ 11 as level-triggered
>   ACPI: PCI Interrupt 0000:00:01.0[A] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11
>   ...
>   ACPI: PCI Interrupt 0000:02:00.0[A] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11
>   PCI: Setting latency timer of device 0000:02:00.0 to 64
>   sky2 v0.15 addr 0xbc000000 irq 11 Yukon-FE (0xb7) rev 1
> 
> (sky2 shares the interrupt with other devices, so we set IRQ 11
> to be level-triggered when we enable the interrupt for one of
> the other devices, so the "setting IRQ 11 as level-triggered"
> message is earlier than the sky2 driver init.)

-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* RE: Most interrupts are edge-triggered, non-APIC system
@ 2006-06-06  4:38 Brown, Len
  0 siblings, 0 replies; 4+ messages in thread
From: Brown, Len @ 2006-06-06  4:38 UTC (permalink / raw)
  To: Daniel Drake, Bjorn Helgaas; +Cc: linux-acpi, joliveirinha, Stephen Hemminger

Bjorn speaks the truth.

>>   ACPI: setting ELCR to 0200 (from 0c20)

BTW. you can verify the final setting of the ELCR from user space
like so:

# inb 0x4d0
0x00
# inb 0x4d1
0x0E

In this example, it means the ELCR is 0x0E00,
so IRQs 11, 10, 9  are level triggered and the rest are edge.

cheers,
-Len 

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

end of thread, other threads:[~2006-06-06  4:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-01 21:04 Most interrupts are edge-triggered, non-APIC system Daniel Drake
2006-06-05 18:43 ` Bjorn Helgaas
2006-06-05 19:56   ` Daniel Drake
  -- strict thread matches above, loose matches on Subject: below --
2006-06-06  4:38 Brown, Len

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