Re: [PATCH] x86/PCI: never allocate PCI MMIO resources below BIOS_END

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Yinghai
Date: Monday, April 26, 2010 - 2:07 pm

On 04/26/2010 01:37 PM, Jesse Barnes wrote:

With current linus's tree, there is some difference between mmio > 1M and MMIO < 1M.

Actually it does not care about E820_RESERVED for > 1M range, because it doesn't have _BUSY.

For < 1M range, 
a. MMIO is not with E820_RESERVED, the device driver will work.
b. MMIO is with E820_RESERVED, the device driver can not reserve it's mmio later. because that MMIO could have parent resource with "reserved" name and _BUSY flag

My patch -v3 will break a.
but my patch -v4 patch will make it work.

but looks -v4 is too tricky.

maybe we just need remove change like following.

diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index 7bca3c6..9849824 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -1094,7 +1094,7 @@ void __init e820_reserve_resources(void)
 		 * pci device BAR resource and insert them later in
 		 * pcibios_resource_survey()
 		 */
-		if (e820.map[i].type != E820_RESERVED || res->start < (1ULL<<20)) {
+		if (e820.map[i].type != E820_RESERVED) {
 			res->flags |= IORESOURCE_BUSY;
 			insert_resource(&iomem_resource, res);
 		}

May need Linus to ack it.

Those strange devices could be some kind of virtual debug devices. and they like to use those low mmio range.

YH
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] x86: Reserve legacy VGA MMIO area for x86_64 a ..., yinghai.lu@oracle.com, (Mon Apr 12, 12:55 pm)
[PATCH 3/3] x86,pci,acpi: Handle invalid _CRS, Yinghai, (Tue Apr 20, 10:35 pm)
Re: [PATCH 3/3] x86,pci,acpi: Handle invalid _CRS, Bjorn Helgaas, (Wed Apr 21, 8:21 am)
Re: [PATCH 3/3] x86,pci,acpi: Handle invalid _CRS, Yinghai Lu, (Wed Apr 21, 9:45 am)
Re: [PATCH 3/3] x86,pci,acpi: Handle invalid _CRS, Bjorn Helgaas, (Wed Apr 21, 9:59 am)
Re: [PATCH 3/3] x86,pci,acpi: Handle invalid _CRS, H. Peter Anvin, (Wed Apr 21, 3:33 pm)
Re: [PATCH 3/3] x86,pci,acpi: Handle invalid _CRS, Bjorn Helgaas, (Wed Apr 21, 4:04 pm)
Re: [PATCH 3/3] x86,pci,acpi: Handle invalid _CRS, H. Peter Anvin, (Wed Apr 21, 4:10 pm)
Re: [PATCH 3/3] x86,pci,acpi: Handle invalid _CRS, H. Peter Anvin, (Wed Apr 21, 5:02 pm)
Re: [PATCH] x86/PCI: never allocate PCI MMIO resources bel ..., Yinghai, (Mon Apr 26, 2:07 pm)
[PATCH -v5] reserve a0000 - 0x10000, Yinghai, (Mon Apr 26, 3:04 pm)
[PATCH -v5 2/3] x86: Remove probe_roms for 32bit, Yinghai, (Mon Apr 26, 3:04 pm)