public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* RE: [patch 11/18] pnpacpi: reject ACPI_PRODUCER resources
@ 2006-06-27  6:30 Brown, Len
  2006-06-27  7:03 ` Andrew Morton
  0 siblings, 1 reply; 16+ messages in thread
From: Brown, Len @ 2006-06-27  6:30 UTC (permalink / raw)
  To: akpm; +Cc: linux-acpi, castet.matthieu, ambx1, bjorn.helgaas, uwe.bugla

NAK, per Shaohua's comments in the bug report. 

>-----Original Message-----
>From: akpm@osdl.org [mailto:akpm@osdl.org] 
>Sent: Saturday, June 24, 2006 7:37 PM
>To: Brown, Len
>Cc: linux-acpi@vger.kernel.org; akpm@osdl.org; 
>castet.matthieu@free.fr; ambx1@neo.rr.com; 
>bjorn.helgaas@hp.com; uwe.bugla@gmx.de
>Subject: [patch 11/18] pnpacpi: reject ACPI_PRODUCER resources
>
>
>From: matthieu castet <castet.matthieu@free.fr>
>
>A patch in -mm kernel correct the parsing of "address 
>resources" of pnpacpi. 
>Before we assumed it was memory only, but it could be also IO.
>
>But this change show an hidden bug : some resources could be 
>producer type
>that are not handled by pnp layer.  So we should ignore the producer
>resources.
>
>This patch fixes bug 6292 
>(http://bugzilla.kernel.org/show_bug.cgi?id=6292).
>Some devices like PNP0A03 have 0xd00-0xffff and 0x0-0xcf7 as 
>IO producer 
>resources.
>
>Before correcting "address resources" parsing, it was seen as 
>memory and was
>harmless, because nobody tried to reserve this memory range as 
>it should be
>IO.
>
>With the correction it become IO resources, and make failed 
>all others device
>that want to register IO in this range and use pnp layer (like 
>a ISA sound
>card).
>
>The solution is to ignore producer resources
>
>Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
>Signed-off-by: Uwe Bugla <uwe.bugla@gmx.de>
>Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
>Cc: Adam Belay <ambx1@neo.rr.com>
>Cc: "Brown, Len" <len.brown@intel.com>
>Signed-off-by: Andrew Morton <akpm@osdl.org>
>---
>
> drivers/pnp/pnpacpi/rsparser.c |    8 ++++++++
> 1 file changed, 8 insertions(+)
>
>diff -puN 
>drivers/pnp/pnpacpi/rsparser.c~pnpacpi-reject-acpi_producer-res
>ources drivers/pnp/pnpacpi/rsparser.c
>--- 
>a/drivers/pnp/pnpacpi/rsparser.c~pnpacpi-reject-acpi_producer-resources
>+++ a/drivers/pnp/pnpacpi/rsparser.c
>@@ -170,6 +170,9 @@ pnpacpi_parse_allocated_address_space(st
> 		return;
> 	}
> 
>+	if (p->producer_consumer == ACPI_PRODUCER)
>+		return;
>+
> 	if (p->resource_type == ACPI_MEMORY_RANGE)
> 		pnpacpi_parse_allocated_memresource(res_table,
> 				p->minimum, p->address_length);
>@@ -248,9 +251,14 @@ static acpi_status pnpacpi_allocated_res
> 		break;
> 
> 	case ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64:
>+		if (res->data.ext_address64.producer_consumer 
>== ACPI_PRODUCER)
>+			return AE_OK;
> 		break;
> 
> 	case ACPI_RESOURCE_TYPE_EXTENDED_IRQ:
>+		if (res->data.extended_irq.producer_consumer == 
>ACPI_PRODUCER)
>+			return AE_OK;
>+
> 		for (i = 0; i < 
>res->data.extended_irq.interrupt_count; i++) {
> 			pnpacpi_parse_allocated_irqresource(res_table,
> 				res->data.extended_irq.interrupts[i],
>_
>

^ permalink raw reply	[flat|nested] 16+ messages in thread
* RE: Re: [patch 11/18] pnpacpi: reject ACPI_PRODUCER resources
@ 2006-06-29 12:41 Li, Shaohua
  2006-06-30  9:04 ` Uwe Bugla
  0 siblings, 1 reply; 16+ messages in thread
From: Li, Shaohua @ 2006-06-29 12:41 UTC (permalink / raw)
  To: Uwe Bugla, bjorn.helgaas
  Cc: linux-acpi, Brown, Len, akpm, ambx1, castet.matthieu



>-----Original Message-----
>From: Uwe Bugla [mailto:uwe.bugla@gmx.de]
>Sent: Thursday, June 29, 2006 8:24 PM
>To: Li, Shaohua; bjorn.helgaas@hp.com
>Cc: linux-acpi@vger.kernel.org; Brown, Len; akpm@osdl.org; ambx1@neo.rr.com;
>castet.matthieu@free.fr
>Subject: Re: Re: [patch 11/18] pnpacpi: reject ACPI_PRODUCER resources
>
>
>-------- Original-Nachricht --------
>Datum: Thu, 29 Jun 2006 09:13:36 +0800
>Von: Shaohua Li <shaohua.li@intel.com>
>An: Bjorn Helgaas <bjorn.helgaas@hp.com>
>Betreff: Re: [patch 11/18] pnpacpi: reject ACPI_PRODUCER resources
>
>> On Wed, 2006-06-28 at 10:55 -0600, Bjorn Helgaas wrote:
>> > On Tuesday 27 June 2006 19:02, Shaohua Li wrote:
>> > > On Tue, 2006-06-27 at 14:02 +0200, castet.matthieu@free.fr wrote:
>> > > > Is only PNP0A03 is producer type in __all__ ACPI possible devices ?
>> > > > If not we will have the same problem with others devices...
>> > > >
>> > > > I don't think blacklist is the solution : pnpacpi should be able to
>> handle all
>> > > > ressources types : we should complete the implementation instead of
>> blacklist
>> > > > devices our implementation doesn't support.
>> > > >
>> > > > If there are broken ACPI bios, there should be firmware update, a
>> patched dsdt
>> > > > or a quirk, but no "quirk and no generic solution".
>> >
>> > > From my understanding, if the device is really a PNP device its
>> resource
>> > > should not be producer.
>> >
>> > I know PNP as currently implemented doesn't support resource producers.
>> > But I don't think of that as a restriction of PNP itself.  I think of
>> > it as an area where a new back end (PNPACPI) added functionality, and
>> > PNP should be enhanced to comprehend it.
>> Ok, it's fine ACPI PNP handles resource producers.
>>
>> > I think the current scheme where some devices are claimed using
>> > PNPACPI and pnp_register_driver(), and others are claimed using
>> > acpi_bus_register_driver() directly, is confusing at best.
>> >
>> > I'd rather have ALL devices handled by PNPACPI, and either extend
>> > the PNP infrastructure to comprehend the new functionality of ACPI
>> > (e.g., new resource types like PCI bus numbers, ACPI events), or
>> > maybe just provide a "to_acpi_dev()" that takes a PNP device and
>> > returns the corresponding ACPI device.
>Hi Shaohua,
>> That's a big deal. We had a lot of discussions about this like
>> introducing ACPI bus, but frankly there isn't a solid direction which
>> bus ACPI devices should belong to.
>Where is the deeper sense of this discussion as long as the AS-IS-STATE
>conforms to a multiplicity of busses like ISA, PCI, AGP, please?
>And why please didn´t you mix yourself in at an earlier point of time?
>And why don´t you offer more profound material and information on the
>conflicts you saw on your IA64 architecture?
I just took one ia64 box I ever saw as an example, but it's not unique to ia64 I think.

>I simply have big problems understanding the attitude behind your behaviour.
Me too :)

>> > > Or could we take this way, merge both patches (both patches are good
>> to
>> > > me), which should be safer. Anyway, it doesn't make sense to export
>> root
>> > > bridge to pnp layer to me.
>> >
>> > One reason I don't like the blacklist is because it just papers over
>> > the problem without leaving a clue about how to really solve it.
>> > For example, if PNP is enhanced later to comprehend resource producers,
>> > we won't know to go back and remove things from the blacklist.
>> So lets have a note there. It (no blacklist) is meaningful to have all
>> ACPI devices handled by PNP layer, but currently not.
>In how far "currently not", please? At what point of time will this make
>sense according to your opinion?
>> We don't expect a PNP driver for root bridge.
>> And we will take risk of buggy BIOS.
>What please has a buggy BIOS to do with a more cryptic or more
>sophisticated ACPI PNP concept?
I want to emphasize I have no objection to merge the producer patch now but still think root bridge should be black list.

Thanks,
Shaohua
-
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] 16+ messages in thread
* [patch 11/18] pnpacpi: reject ACPI_PRODUCER resources
@ 2006-06-24 23:36 akpm
  0 siblings, 0 replies; 16+ messages in thread
From: akpm @ 2006-06-24 23:36 UTC (permalink / raw)
  To: len.brown
  Cc: linux-acpi, akpm, castet.matthieu, ambx1, bjorn.helgaas,
	uwe.bugla


From: matthieu castet <castet.matthieu@free.fr>

A patch in -mm kernel correct the parsing of "address resources" of pnpacpi. 
Before we assumed it was memory only, but it could be also IO.

But this change show an hidden bug : some resources could be producer type
that are not handled by pnp layer.  So we should ignore the producer
resources.

This patch fixes bug 6292 (http://bugzilla.kernel.org/show_bug.cgi?id=6292).
Some devices like PNP0A03 have 0xd00-0xffff and 0x0-0xcf7 as IO producer 
resources.

Before correcting "address resources" parsing, it was seen as memory and was
harmless, because nobody tried to reserve this memory range as it should be
IO.

With the correction it become IO resources, and make failed all others device
that want to register IO in this range and use pnp layer (like a ISA sound
card).

The solution is to ignore producer resources

Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: Uwe Bugla <uwe.bugla@gmx.de>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Adam Belay <ambx1@neo.rr.com>
Cc: "Brown, Len" <len.brown@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 drivers/pnp/pnpacpi/rsparser.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff -puN drivers/pnp/pnpacpi/rsparser.c~pnpacpi-reject-acpi_producer-resources drivers/pnp/pnpacpi/rsparser.c
--- a/drivers/pnp/pnpacpi/rsparser.c~pnpacpi-reject-acpi_producer-resources
+++ a/drivers/pnp/pnpacpi/rsparser.c
@@ -170,6 +170,9 @@ pnpacpi_parse_allocated_address_space(st
 		return;
 	}
 
+	if (p->producer_consumer == ACPI_PRODUCER)
+		return;
+
 	if (p->resource_type == ACPI_MEMORY_RANGE)
 		pnpacpi_parse_allocated_memresource(res_table,
 				p->minimum, p->address_length);
@@ -248,9 +251,14 @@ static acpi_status pnpacpi_allocated_res
 		break;
 
 	case ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64:
+		if (res->data.ext_address64.producer_consumer == ACPI_PRODUCER)
+			return AE_OK;
 		break;
 
 	case ACPI_RESOURCE_TYPE_EXTENDED_IRQ:
+		if (res->data.extended_irq.producer_consumer == ACPI_PRODUCER)
+			return AE_OK;
+
 		for (i = 0; i < res->data.extended_irq.interrupt_count; i++) {
 			pnpacpi_parse_allocated_irqresource(res_table,
 				res->data.extended_irq.interrupts[i],
_

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

end of thread, other threads:[~2006-06-30 16:04 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-27  6:30 [patch 11/18] pnpacpi: reject ACPI_PRODUCER resources Brown, Len
2006-06-27  7:03 ` Andrew Morton
2006-06-27  7:37   ` Adam Belay
2006-06-27  7:29     ` Shaohua Li
2006-06-27 12:02       ` castet.matthieu
2006-06-27 14:19         ` Uwe Bugla
2006-06-27 16:03         ` Bjorn Helgaas
2006-06-28  1:02         ` Shaohua Li
2006-06-28  8:57           ` Uwe Bugla
2006-06-28 16:55           ` Bjorn Helgaas
2006-06-29  1:13             ` Shaohua Li
2006-06-29 12:24               ` Uwe Bugla
2006-06-29 18:38               ` Bjorn Helgaas
2006-06-30  1:30                 ` Shaohua Li
  -- strict thread matches above, loose matches on Subject: below --
2006-06-29 12:41 Li, Shaohua
2006-06-30  9:04 ` Uwe Bugla
2006-06-30 16:03   ` Bjorn Helgaas
2006-06-24 23:36 akpm

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