From: Yinghai on
On 04/09/2010 06:43 PM, Andy Isaacson wrote:
> On Fri, Apr 09, 2010 at 06:10:49PM -0700, Yinghai wrote:
>> in addition to -v2 patch
>>
>> please apply this patch too
>>
>> also please boot with "debug" in boot command line.
>>
>> Thanks
>>
>> Yinghai
>>
>> [PATCH] x86,acpi: use request_resource instead of instead of insert_resource
>>
>> So make pci root resouce from _CRS honor the one We reserve in e820 below 1M
>>
>> Signed-off-by: Yinghai Lu <yinghai(a)kernel.org>
>>
>> ---
>> arch/x86/pci/acpi.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> Index: linux-2.6/arch/x86/pci/acpi.c
>> ===================================================================
>> --- linux-2.6.orig/arch/x86/pci/acpi.c
>> +++ linux-2.6/arch/x86/pci/acpi.c
>> @@ -168,7 +168,7 @@ setup_resource(struct acpi_resource *acp
>> return AE_OK;
>> }
>>
>> - conflict = insert_resource_conflict(root, res);
>> + conflict = request_resource_conflict(root, res);
>> if (conflict) {
>> dev_err(&info->bridge->dev,
>> "address space collision: host bridge window %pR "
>
> That works. dmesg.gz attached (I'm pretty sure I'm skating close to
> vger's size limit without gz). "debug" didn't seem to make much
> difference?

[ 0.636805] ACPI: PCI Root Bridge [PCI0] (0000:00)
[ 0.654025] pci_root PNP0A03:00: address space collision: host bridge window [io 0x0000-0x0cf7] conflicts with dma1 [io 0x0000-0x001f]
[ 0.654370] pci_root PNP0A03:00: host bridge window [io 0x0d00-0xffff]
[ 0.654586] pci_root PNP0A03:00: address space collision: host bridge window [mem 0x000a0000-0x000bffff] conflicts with reserved [mem 0x000a0000-0x000fffff]
[ 0.654933] pci_root PNP0A03:00: address space collision: host bridge window [mem 0x000c0000-0x000effff] conflicts with reserved [mem 0x000a0000-0x000fffff]
[ 0.655002] pci_root PNP0A03:00: address space collision: host bridge window [mem 0x000f0000-0x000fffff] conflicts with reserved [mem 0x000a0000-0x000fffff]
[ 0.655367] pci_root PNP0A03:00: host bridge window [mem 0xf0000000-0xfebfffff]
[ 0.655706] pci_root PNP0A03:00: host bridge window [mem 0xbff00000-0xdfffffff]
[ 0.656003] pci_root PNP0A03:00: host bridge window [mem 0xff980800-0xff980bff]
[ 0.656360] pci_root PNP0A03:00: host bridge window [mem 0xff97c000-0xff97ffff]
[ 0.657002] pci_root PNP0A03:00: host bridge window [mem 0xfed20000-0xfed9ffff]

still not optimal.

YH
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Yinghai on
On 04/09/2010 06:57 PM, Andy Isaacson wrote:
> On Fri, Apr 09, 2010 at 06:48:31PM -0700, Yinghai wrote:
>> On 04/09/2010 06:43 PM, Andy Isaacson wrote:
>>> On Fri, Apr 09, 2010 at 06:10:49PM -0700, Yinghai wrote:
>>>> in addition to -v2 patch
>>>>
>>>> please apply this patch too
>>>>
>>>> also please boot with "debug" in boot command line.
>>>>
>>>> Thanks
>>>>
>>>> Yinghai
>>>>
>>>> [PATCH] x86,acpi: use request_resource instead of instead of insert_resource
>>>>
>>>> So make pci root resouce from _CRS honor the one We reserve in e820 below 1M
>>>>
>>>> Signed-off-by: Yinghai Lu <yinghai(a)kernel.org>
>>>>
>>>> ---
>>>> arch/x86/pci/acpi.c | 2 +-
>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> Index: linux-2.6/arch/x86/pci/acpi.c
>>>> ===================================================================
>>>> --- linux-2.6.orig/arch/x86/pci/acpi.c
>>>> +++ linux-2.6/arch/x86/pci/acpi.c
>>>> @@ -168,7 +168,7 @@ setup_resource(struct acpi_resource *acp
>>>> return AE_OK;
>>>> }
>>>>
>>>> - conflict = insert_resource_conflict(root, res);
>>>> + conflict = request_resource_conflict(root, res);
>>>> if (conflict) {
>>>> dev_err(&info->bridge->dev,
>>>> "address space collision: host bridge window %pR "
>>>
>>> That works. dmesg.gz attached (I'm pretty sure I'm skating close to
>>> vger's size limit without gz). "debug" didn't seem to make much
>>> difference?
>>
>> [ 0.636805] ACPI: PCI Root Bridge [PCI0] (0000:00)
>> [ 0.654025] pci_root PNP0A03:00: address space collision: host bridge window [io 0x0000-0x0cf7] conflicts with dma1 [io 0x0000-0x001f]
>> [ 0.654370] pci_root PNP0A03:00: host bridge window [io 0x0d00-0xffff]
>> [ 0.654586] pci_root PNP0A03:00: address space collision: host bridge window [mem 0x000a0000-0x000bffff] conflicts with reserved [mem 0x000a0000-0x000fffff]
>> [ 0.654933] pci_root PNP0A03:00: address space collision: host bridge window [mem 0x000c0000-0x000effff] conflicts with reserved [mem 0x000a0000-0x000fffff]
>> [ 0.655002] pci_root PNP0A03:00: address space collision: host bridge window [mem 0x000f0000-0x000fffff] conflicts with reserved [mem 0x000a0000-0x000fffff]
>> [ 0.655367] pci_root PNP0A03:00: host bridge window [mem 0xf0000000-0xfebfffff]
>> [ 0.655706] pci_root PNP0A03:00: host bridge window [mem 0xbff00000-0xdfffffff]
>> [ 0.656003] pci_root PNP0A03:00: host bridge window [mem 0xff980800-0xff980bff]
>> [ 0.656360] pci_root PNP0A03:00: host bridge window [mem 0xff97c000-0xff97ffff]
>> [ 0.657002] pci_root PNP0A03:00: host bridge window [mem 0xfed20000-0xfed9ffff]
>>
>> still not optimal.
>
> Well, thanks for looking at it; if there are any more patches I can try,
> let me know (but I may not get to it until Monday morning, since I can't
> reliably reboot this machine remotely).
>
> Is this a BIOS error? I am currently running A04; there's an A10
> available, but I didn't want to perturb the situation during the
> debugging cycle without guidance.

thanks.

please use this one replace second patch
[PATCH] x86,pci, acpi: Inherent BUSY flag when setup_resource for root bus

So make pci root resource from _CRS honor the range We reserve in e820 below 1M

Signed-off-by: Yinghai Lu <yinghai(a)kernel.org>

---
arch/x86/pci/acpi.c | 4 ++++
1 file changed, 4 insertions(+)

Index: linux-2.6/arch/x86/pci/acpi.c
===================================================================
--- linux-2.6.orig/arch/x86/pci/acpi.c
+++ linux-2.6/arch/x86/pci/acpi.c
@@ -175,6 +175,10 @@ setup_resource(struct acpi_resource *acp
"conflicts with %s %pR\n",
res, conflict->name, conflict);
} else {
+ /* In case it falls in big reserved region */
+ if (res->parent->flags & IORESOURCE_BUSY)
+ res->flags |= IORESOURCE_BUSY;
+
pci_bus_add_resource(info->bus, res, 0);
info->res_num++;
if (addr.translation_offset)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Yinghai on
On 04/12/2010 11:54 AM, Andy Isaacson wrote:
> On Fri, Apr 09, 2010 at 07:46:04PM -0700, Yinghai wrote:
> [ 5.463672] ahci 0000:00:1f.2: PCI INT C -> GSI 20 (level, low) -> IRQ 20
> [ 5.470633] ahci 0000:00:1f.2: BAR 5: can't reserve [mem 0x000a0000-0x000a07ff]
> [ 5.478257] ahci: probe of 0000:00:1f.2 failed with error -16

please check

[PATCH] x86,pci, acpi: Inherent BUSY flag when setup_resource for root bus

So make pci root resource from _CRS honor the range We reserve in e820 below 1M
then will not assign them to unsigned pci BAR

-v2: let pci_bus_alloc_resource() honor IORESOURCE_BUSY
driver can not use those range, so skip it

Signed-off-by: Yinghai Lu <yinghai(a)kernel.org>

---
arch/x86/pci/acpi.c | 4 ++++
drivers/pci/bus.c | 4 ++++
2 files changed, 8 insertions(+)

Index: linux-2.6/arch/x86/pci/acpi.c
===================================================================
--- linux-2.6.orig/arch/x86/pci/acpi.c
+++ linux-2.6/arch/x86/pci/acpi.c
@@ -175,6 +175,10 @@ setup_resource(struct acpi_resource *acp
"conflicts with %s %pR\n",
res, conflict->name, conflict);
} else {
+ /* In case it falls in big reserved region */
+ if (res->parent->flags & IORESOURCE_BUSY)
+ res->flags |= IORESOURCE_BUSY;
+
pci_bus_add_resource(info->bus, res, 0);
info->res_num++;
if (addr.translation_offset)
Index: linux-2.6/drivers/pci/bus.c
===================================================================
--- linux-2.6.orig/drivers/pci/bus.c
+++ linux-2.6/drivers/pci/bus.c
@@ -103,6 +103,10 @@ pci_bus_alloc_resource(struct pci_bus *b
if (!r)
continue;

+ /* Driver can not reserve it later, so don't use it */
+ if (r->flags & IORESOURCE_BUSY)
+ continue;
+
/* type_mask must match */
if ((res->flags ^ r->flags) & type_mask)
continue;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/