public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] PNPACPI: ignore the producer/consumer bit for extended IRQ descriptors
@ 2008-08-22 15:47 Bjorn Helgaas
  2008-08-25 10:15 ` Andi Kleen
  0 siblings, 1 reply; 3+ messages in thread
From: Bjorn Helgaas @ 2008-08-22 15:47 UTC (permalink / raw)
  To: Andi Kleen
  Cc: Adam M Belay, Matthieu CASTET, Li Shaohua, linux-acpi, Len Brown

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

 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 85baf16..adf1785 100644
--- a/drivers/pnp/pnpacpi/rsparser.c
+++ b/drivers/pnp/pnpacpi/rsparser.c
@@ -406,8 +406,6 @@ static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res,
 
 	case ACPI_RESOURCE_TYPE_EXTENDED_IRQ:
 		extended_irq = &res->data.extended_irq;
-		if (extended_irq->producer_consumer == ACPI_PRODUCER)
-			return AE_OK;
 
 		if (extended_irq->interrupt_count == 0)
 			pnp_add_irq_resource(dev, 0, IORESOURCE_DISABLED);

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

* Re: [patch] PNPACPI: ignore the producer/consumer bit for extended IRQ descriptors
  2008-08-22 15:47 [patch] PNPACPI: ignore the producer/consumer bit for extended IRQ descriptors Bjorn Helgaas
@ 2008-08-25 10:15 ` Andi Kleen
  2008-08-25 14:56   ` Bjorn Helgaas
  0 siblings, 1 reply; 3+ messages in thread
From: Andi Kleen @ 2008-08-25 10:15 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Andi Kleen, Adam M Belay, Matthieu CASTET, Li Shaohua, linux-acpi,
	Len Brown

On Fri, Aug 22, 2008 at 09:47:17AM -0600, Bjorn Helgaas wrote:
> 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.

Added thanks. Will put in the next 2.6.27 update.

-Andi

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

* Re: [patch] PNPACPI: ignore the producer/consumer bit for extended IRQ descriptors
  2008-08-25 10:15 ` Andi Kleen
@ 2008-08-25 14:56   ` Bjorn Helgaas
  0 siblings, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2008-08-25 14:56 UTC (permalink / raw)
  To: Andi Kleen
  Cc: Adam M Belay, Matthieu CASTET, Li Shaohua, linux-acpi, Len Brown

On Monday 25 August 2008 04:15:43 am Andi Kleen wrote:
> On Fri, Aug 22, 2008 at 09:47:17AM -0600, Bjorn Helgaas wrote:
> > 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.
> 
> Added thanks. Will put in the next 2.6.27 update.

This doesn't need to go in 2.6.27 (at least, I can't think of
anything it will fix there).  This is more in the category of
paving the way for future changes.

Bjorn

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

end of thread, other threads:[~2008-08-25 14:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-22 15:47 [patch] PNPACPI: ignore the producer/consumer bit for extended IRQ descriptors Bjorn Helgaas
2008-08-25 10:15 ` Andi Kleen
2008-08-25 14:56   ` Bjorn Helgaas

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