linux_dsm_epyc7002/drivers/pci/hotplug
Yijing Wang c90570d951 PCI: Assign resources before drivers claim devices (pci_scan_bus())
Previously, pci_scan_bus() created a root PCI bus, enumerated the devices
on it, and called pci_bus_add_devices(), which made the devices available
for drivers to claim them.

Most callers assigned resources to devices after pci_scan_bus() returns,
which may be after drivers have claimed the devices.  This is incorrect;
the PCI core should not change device resources while a driver is managing
the device.

Remove pci_bus_add_devices() from pci_scan_bus() and do it after any
resource assignment in the callers.

[bhelgaas: changelog, check for failure in mcf_pci_init()]
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
CC: "David S. Miller" <davem@davemloft.net>
CC: Geert Uytterhoeven <geert@linux-m68k.org>
CC: Guan Xuetao <gxt@mprc.pku.edu.cn>
CC: Richard Henderson <rth@twiddle.net>
CC: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
CC: Matt Turner <mattst88@gmail.com>
2015-03-12 15:04:01 -05:00
..
acpi_pcihp.c Merge branches 'pci/enumeration', 'pci/virtualization' and 'pci/cleanup' into next 2014-09-25 13:52:02 -06:00
acpiphp_core.c PCI: Move EXPORT_SYMBOL so it immediately follows function/variable 2014-06-10 13:36:10 -06:00
acpiphp_glue.c PCI changes for the v3.18 merge window: 2014-10-09 15:03:49 -04:00
acpiphp_ibm.c PCI: Add space before open parenthesis 2014-09-24 07:43:03 -06:00
acpiphp.h ACPI / hotplug / PCI: Add hotplug contexts to PCI host bridges 2014-06-11 21:08:49 +02:00
cpci_hotplug_core.c PCI: Delete unnecessary NULL pointer checks 2014-12-26 16:28:08 -07:00
cpci_hotplug_pci.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
cpci_hotplug.h PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
cpcihp_generic.c PCI: Add space before open parenthesis 2014-09-24 07:43:03 -06:00
cpcihp_zt5550.c PCI: Remove assignment from "if" conditions 2014-09-24 07:50:53 -06:00
cpcihp_zt5550.h PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
cpqphp_core.c PCI: Remove unnecessary curly braces 2014-09-24 07:49:20 -06:00
cpqphp_ctrl.c PCI: Remove unnecessary curly braces 2014-09-24 07:49:20 -06:00
cpqphp_nvram.c PCI: Remove unnecessary curly braces 2014-09-24 07:49:20 -06:00
cpqphp_nvram.h PCI: Remove "extern" from function declarations 2013-04-17 10:21:17 -06:00
cpqphp_pci.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
cpqphp_sysfs.c PCI: cpqphp: Remove unnecessary null test before debugfs_remove() 2014-07-07 14:53:44 -06:00
cpqphp.h PCI: Add space before open parenthesis 2014-09-24 07:43:03 -06:00
ibmphp_core.c PCI: Assign resources before drivers claim devices (pci_scan_bus()) 2015-03-12 15:04:01 -05:00
ibmphp_ebda.c PCI: Remove unnecessary curly braces 2014-09-24 07:49:20 -06:00
ibmphp_hpc.c PCI: Remove unnecessary curly braces 2014-09-24 07:49:20 -06:00
ibmphp_pci.c PCI: Remove assignment from "if" conditions 2014-09-24 07:50:53 -06:00
ibmphp_res.c PCI: Simplify if-return sequences 2014-11-10 21:08:07 -07:00
ibmphp.h PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
Kconfig PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
Makefile PCI: Move pci_configure_slot() to drivers/pci/probe.c 2014-09-12 20:02:00 -06:00
pci_hotplug_core.c PCI: Merge multi-line quoted strings 2014-06-10 20:20:42 -06:00
pciehp_acpi.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
pciehp_core.c Revert duplicate "PCI: pciehp: Prevent NULL dereference during probe" 2014-10-27 11:42:43 -06:00
pciehp_ctrl.c PCI: pciehp: Handle surprise add even if surprise removal isn't supported 2015-01-21 10:28:07 -06:00
pciehp_hpc.c PCI changes for the v3.18 merge window: 2014-10-09 15:03:49 -04:00
pciehp_pci.c PCI: pciehp: Remove pci_configure_slot() usage 2014-09-12 20:09:47 -06:00
pciehp.h PCI: pciehp: Reduce PCIe slot_ctrl to 16 bits 2014-09-12 20:12:29 -06:00
pcihp_skeleton.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
rpadlpar_core.c PCI: rpaphp: Use pci_is_bridge() to simplify code 2014-05-27 14:57:55 -06:00
rpadlpar_sysfs.c PCI: introduce pci_slot 2008-06-10 14:37:03 -07:00
rpadlpar.h PCI: Remove "extern" from function declarations 2013-04-17 10:21:17 -06:00
rpaphp_core.c of: Migrate of_find_node_by_name() users to for_each_node_by_name() 2014-06-26 17:12:24 +01:00
rpaphp_pci.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
rpaphp_slot.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
rpaphp.h PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
s390_pci_hpc.c s390/pci: fix kmsg component 2014-07-22 09:26:21 +02:00
sgi_hotplug.c ACPI: Introduce acpi_unload_parent_table() usages in Linux kernel 2015-01-26 16:08:49 +01:00
shpchp_core.c PCI: Merge multi-line quoted strings 2014-06-10 20:20:42 -06:00
shpchp_ctrl.c PCI: Remove assignment from "if" conditions 2014-09-24 07:50:53 -06:00
shpchp_hpc.c PCI: Remove assignment from "if" conditions 2014-09-24 07:50:53 -06:00
shpchp_pci.c PCI: shpchp: Remove pci_configure_slot() usage 2014-09-12 20:09:49 -06:00
shpchp_sysfs.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
shpchp.h PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00