diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2008-08-22 11:47:17 -0400 |
---|---|---|
committer | Andi Kleen <ak@linux.intel.com> | 2008-08-25 06:04:44 -0400 |
commit | de82ff783bcb2b52353a7c99b4a8524ae739da73 (patch) | |
tree | 90f3f930ba351b93df4310c7ab2dab45929c2b06 | |
parent | b635acec48bcaa9183fcbf4e3955616b0d4119b5 (diff) |
PNPACPI: ignore the producer/consumer bit for extended IRQ descriptors
The Extended Interrupt descriptor has a producer/consumer bit, but
it's not clear what that would mean, and existing BIOSes use the bit
inconsistently. This patch makes Linux PNPACPI ignore the bit.
The ACPI spec contains examples of PCI Interrupt Link devices marked
as ResourceProducers, but many BIOSes mark them as ResourceConsumers.
I also checked with a Windows contact, who said:
Windows uses only "resource consumer" when dealing with
interrupts. There's no useful way of looking at a resource
producer of interrupts.
... NT-based Windows largely infers the producer/consumer stuff
from the device type and ignores the bits in the namespace. This
was necessary because Windows 98 ignored them and early namespaces
contained random junk.
The reason I want to change this is because if PNPACPI devices exclude
ResourceProducer IRQ resources, we can't write PNP drivers for those
devices.
For example, on machines such as the the HP rx7620, rx7640, rx8620,
rx8640, and Superdome, HPET interrupts are ResourceProducers. The
HPET driver currently has to use acpi_bus_register_driver() and do its
own _CRS parsing, even though it requires absolutely no ACPI-specific
functionality.
It would be better if the HPET driver were a PNP driver and took
advantage of the _CRS parsing built into PNPACPI.
This producer/consumer check was originally added here:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=2b8de5f50e4a302b83ebcd5b0120621336d50bd6
to fix this bug:
http://bugzilla.kernel.org/show_bug.cgi?id=6292
However, the bug was related only to memory and I/O port resources,
where the distinction is sensible and important to Linux. Given that
the distinction is muddled for IRQ resources, I think it was a mistake
to add the check there.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
-rw-r--r-- | drivers/pnp/pnpacpi/rsparser.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c index d7e9f2152df0..95015cbfd33f 100644 --- a/drivers/pnp/pnpacpi/rsparser.c +++ b/drivers/pnp/pnpacpi/rsparser.c | |||
@@ -405,8 +405,6 @@ static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res, | |||
405 | 405 | ||
406 | case ACPI_RESOURCE_TYPE_EXTENDED_IRQ: | 406 | case ACPI_RESOURCE_TYPE_EXTENDED_IRQ: |
407 | extended_irq = &res->data.extended_irq; | 407 | extended_irq = &res->data.extended_irq; |
408 | if (extended_irq->producer_consumer == ACPI_PRODUCER) | ||
409 | return AE_OK; | ||
410 | 408 | ||
411 | if (extended_irq->interrupt_count == 0) | 409 | if (extended_irq->interrupt_count == 0) |
412 | pnp_add_irq_resource(dev, 0, IORESOURCE_DISABLED); | 410 | pnp_add_irq_resource(dev, 0, IORESOURCE_DISABLED); |