x86/PCI: never allocate PCI MMIO resources below BIOS_END

Previous thread: powerpc/85xx/86xx: Fix build w/ CONFIG_PCI=n by Linux Kernel Mailing List on Thursday, April 29, 2010 - 5:59 pm. (1 message)

Next thread: NFS: Ensure that nfs_wb_page() waits for Pg_writeback to clear by Linux Kernel Mailing List on Thursday, April 29, 2010 - 5:59 pm. (1 message)
From: Linux Kernel Mailing List
Date: Wednesday, April 28, 2010 - 8:59 pm

Gitweb:     http://git.kernel.org/linus/55051feb57eba600b366006757304a0af3ada2bd
Commit:     55051feb57eba600b366006757304a0af3ada2bd
Parent:     b91ce4d14a21fc04d165be30319541e0f9204f15
Author:     Bjorn Helgaas <bjorn.helgaas@hp.com>
AuthorDate: Fri Apr 23 17:05:24 2010 -0600
Committer:  Jesse Barnes <jbarnes@virtuousgeek.org>
CommitDate: Mon Apr 26 12:30:03 2010 -0700

    x86/PCI: never allocate PCI MMIO resources below BIOS_END
    
    When we move a PCI device or assign resources to a device not configured
    by the BIOS, we want to avoid the BIOS region below 1MB.  Note that if the
    BIOS places devices below 1MB, we leave them there.
    
    See https://bugzilla.kernel.org/show_bug.cgi?id=15744
    and https://bugzilla.kernel.org/show_bug.cgi?id=15841
    
    Tested-by: Andy Isaacson <adi@hexapodia.org>
    Tested-by: Andy Bailey <bailey@akamai.com>
    Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
    Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 arch/x86/pci/i386.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c
index 46fd43f..97da2ba 100644
--- a/arch/x86/pci/i386.c
+++ b/arch/x86/pci/i386.c
@@ -72,6 +72,9 @@ pcibios_align_resource(void *data, const struct resource *res,
 			return start;
 		if (start & 0x300)
 			start = (start + 0x3ff) & ~0x3ff;
+	} else if (res->flags & IORESOURCE_MEM) {
+		if (start < BIOS_END)
+			start = BIOS_END;
 	}
 	return start;
 }
--

Previous thread: powerpc/85xx/86xx: Fix build w/ CONFIG_PCI=n by Linux Kernel Mailing List on Thursday, April 29, 2010 - 5:59 pm. (1 message)

Next thread: NFS: Ensure that nfs_wb_page() waits for Pg_writeback to clear by Linux Kernel Mailing List on Thursday, April 29, 2010 - 5:59 pm. (1 message)