alistair23-linux/arch/x86/pci
Rafael J. Wysocki dc4fdaf0e4 PCI / ACPI: Do not set ACPI companions for host bridges with parents
Commit 97badf873a (device property: Make it possible to use
secondary firmware nodes) uncovered a bug in the x86 (and ia64) PCI
host bridge initialization code that assumes bridge->bus->sysdata
to always point to a struct pci_sysdata object which need not be
the case (in particular, the Xen PCI frontend driver sets it to point
to a different data type).  If it is not the case, an incorrect
pointer (or a piece of data that is not a pointer at all) will be
passed to ACPI_COMPANION_SET() and that may cause interesting
breakage to happen going forward.

To work around this problem use the observation that the ACPI
host bridge initialization always passes NULL as parent to
pci_create_root_bus(), so if pcibios_root_bridge_prepare() sees
a non-NULL parent of the bridge, it should not attempt to set
an ACPI companion for it, because that means that
pci_create_root_bus() has been called by someone else.

Fixes: 97badf873a (device property: Make it possible to use secondary firmware nodes)
Reported-and-tested-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
2015-05-28 01:39:53 +02:00
..
acpi.c PCI / ACPI: Do not set ACPI companions for host bridges with parents 2015-05-28 01:39:53 +02:00
amd_bus.c
broadcom_bus.c
bus_numa.c PCI: Use common resource list management code instead of private implementation 2015-02-05 15:09:25 +01:00
bus_numa.h
ce4100.c
common.c PCI changes for the v4.1 merge window: 2015-04-13 15:45:47 -07:00
direct.c
early.c
fixup.c vgaarb: Don't default exclusively to first video device with mem+io 2014-09-16 13:06:18 -06:00
i386.c x86/PCI: Clip bridge windows to fit in upstream windows 2015-01-16 10:04:42 -06:00
init.c
intel_mid_pci.c Revert "x86/PCI: Refine the way to release PCI IRQ resources" 2015-03-20 14:56:19 +01:00
irq.c Revert "x86/PCI: Refine the way to release PCI IRQ resources" 2015-03-20 14:56:19 +01:00
legacy.c
Makefile
mmconfig-shared.c ACPI and power management updates for v3.20-rc1 2015-02-10 15:09:41 -08:00
mmconfig_32.c
mmconfig_64.c
numachip.c x86: numachip: APIC driver cleanups 2014-11-04 18:17:27 +01:00
olpc.c
pcbios.c x86/PCI: Mark PCI BIOS initialization code as such 2014-09-24 06:46:27 -06:00
sta2x11-fixup.c
xen.c PCI changes for the v3.20 merge window: 2015-02-10 14:31:28 -08:00