linux-stable/arch/x86/pci
Bjorn Helgaas 4723d0f2f9 x86/PCI: coalesce overlapping host bridge windows
Some BIOSes provide PCI host bridge windows that overlap, e.g.,

    pci_root PNP0A03:00: host bridge window [mem 0xb0000000-0xffffffff]
    pci_root PNP0A03:00: host bridge window [mem 0xafffffff-0xdfffffff]
    pci_root PNP0A03:00: host bridge window [mem 0xf0000000-0xffffffff]

If we simply insert these as children of iomem_resource, the second window
fails because it conflicts with the first, and the third is inserted as a
child of the first, i.e.,

    b0000000-ffffffff PCI Bus 0000:00
      f0000000-ffffffff PCI Bus 0000:00

When we claim PCI device resources, this can cause collisions like this
if we put them in the first window:

    pci 0000:00:01.0: address space collision: [mem 0xff300000-0xff4fffff] conflicts with PCI Bus 0000:00 [mem 0xf0000000-0xffffffff]

Host bridge windows are top-level resources by definition, so it doesn't
make sense to make the third window a child of the first.  This patch
coalesces any host bridge windows that overlap.  For the example above,
the result is this single window:

    pci_root PNP0A03:00: host bridge window [mem 0xafffffff-0xffffffff]

This fixes a 2.6.34 regression.

Reference: https://bugzilla.kernel.org/show_bug.cgi?id=17011
Reported-and-tested-by: Anisse Astier <anisse@astier.eu>
Reported-and-tested-by: Pramod Dematagoda <pmd.lotr.gandalf@gmail.com>
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-11-11 09:34:31 -08:00
..
acpi.c x86/PCI: coalesce overlapping host bridge windows 2010-11-11 09:34:31 -08:00
amd_bus.c x86: Change range end to start+size 2010-02-10 17:47:17 -08:00
broadcom_bus.c PCI: read memory ranges out of Broadcom CNB20LE host bridge 2010-05-21 14:43:46 -07:00
bus_numa.c Merge branch 'x86-bootmem-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-03-03 08:15:05 -08:00
bus_numa.h Merge branch 'x86-bootmem-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-03-03 08:15:05 -08:00
common.c x86/PCI: Clean up pci_cache_line_size 2010-10-18 10:49:30 -04:00
direct.c x86/PCI: Convert pci_config_lock to raw_spinlock 2010-05-11 12:01:09 -07:00
early.c x86/PCI: remove early PCI pr_debug statements 2009-11-24 15:25:19 -08:00
fixup.c Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2009-04-01 09:47:12 -07:00
i386.c Merge branch 'stable/xen-pcifront-0.8.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen 2010-10-28 17:11:17 -07:00
init.c x86, olpc: Use pci subarch init for OLPC 2010-02-25 19:26:23 -08:00
irq.c PCI: update Intel chipset names and defines 2010-10-17 20:03:04 -07:00
legacy.c x86/PCI: pci, fix section mismatch 2010-07-30 09:29:09 -07:00
Makefile xen/x86/PCI: Add support for the Xen PCI subsystem 2010-10-18 10:49:35 -04:00
mmconfig-shared.c x86/PCI: MMCONFIG: fix region end calculation 2010-10-17 20:03:07 -07:00
mmconfig_32.c x86/PCI: Convert pci_config_lock to raw_spinlock 2010-05-11 12:01:09 -07:00
mmconfig_64.c x86/PCI: MMCONFIG: add lookup function 2009-11-24 15:30:36 -08:00
mrst.c x86, pci, mrst: Add extra sanity check in walking the PCI extended cap chain 2010-07-16 16:52:15 -07:00
numaq_32.c x86/PCI: Convert pci_config_lock to raw_spinlock 2010-05-11 12:01:09 -07:00
olpc.c PCI: OLPC: Only enable PCI configuration type override on XO-1 2010-10-15 13:09:51 -07:00
pcbios.c x86/PCI: Convert pci_config_lock to raw_spinlock 2010-05-11 12:01:09 -07:00
visws.c x86: Move pci init function to x86_init 2010-02-19 16:12:29 -08:00
xen.c xen: add a missing #include to arch/x86/pci/xen.c 2010-10-22 21:26:02 +01:00