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 x86/PCI: Clean up and mark early_root_info_init() as deprecated 2014-05-27 10:47:49 -06:00
broadcom_bus.c x86/PCI: Fix Broadcom CNB20LE unintended sign extension 2014-04-25 11:01:08 -06:00
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 x86/PCI: put busn resource in pci_root_info for native host bridge drivers 2012-06-13 15:42:24 -06:00
ce4100.c x86/ce4100: Fix PCI configuration register access for devices without interrupts 2012-10-30 10:16:47 +01:00
common.c PCI changes for the v4.1 merge window: 2015-04-13 15:45:47 -07:00
direct.c x86: constify PCI raw ops structures 2011-10-14 09:05:28 -07:00
early.c x86/PCI: remove early PCI pr_debug statements 2009-11-24 15:25:19 -08:00
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 x86, olpc: Use pci subarch init for OLPC 2010-02-25 19:26:23 -08:00
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 x86/PCI: Use pcibios_scan_root() instead of pci_scan_bus_on_node() 2014-02-03 10:38:18 -07:00
Makefile x86, platforms: Remove NUMAQ 2014-02-27 08:07:39 -08:00
mmconfig-shared.c ACPI and power management updates for v3.20-rc1 2015-02-10 15:09:41 -08:00
mmconfig_32.c ACPI: Clean up inclusions of ACPI header files 2013-12-07 01:03:14 +01:00
mmconfig_64.c X86: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
numachip.c x86: numachip: APIC driver cleanups 2014-11-04 18:17:27 +01:00
olpc.c x86: constify PCI raw ops structures 2011-10-14 09:05:28 -07:00
pcbios.c x86/PCI: Mark PCI BIOS initialization code as such 2014-09-24 06:46:27 -06:00
sta2x11-fixup.c x86: enable DMA CMA with swiotlb 2014-06-04 16:53:57 -07:00
xen.c PCI changes for the v3.20 merge window: 2015-02-10 14:31:28 -08:00