mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-07 10:03:24 +00:00
b97ea289cf
Previously, pci_scan_root_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_root_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_root_bus() and do it after any resource assignment in the callers. Note that ARM's pci_common_init_dev() already called pci_bus_add_devices() after pci_scan_root_bus(), so we only need to remove the first call: pci_common_init_dev pcibios_init_hw pci_scan_root_bus pci_bus_add_devices # first call pci_bus_assign_resources pci_bus_add_devices # second call [bhelgaas: changelog, drop "root_bus" var in alpha common_init_pci(), return failure earlier in mn10300, add "return" in x86 pcibios_scan_root(), return early if xtensa platform_pcibios_fixup() fails] Signed-off-by: Yijing Wang <wangyijing@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> CC: Richard Henderson <rth@twiddle.net> CC: Ivan Kokshaysky <ink@jurassic.park.msu.ru> CC: Matt Turner <mattst88@gmail.com> CC: David Howells <dhowells@redhat.com> CC: Tony Luck <tony.luck@intel.com> CC: Michal Simek <monstr@monstr.eu> CC: Ralf Baechle <ralf@linux-mips.org> CC: Koichi Yasutake <yasutake.koichi@jp.panasonic.com> CC: Sebastian Ott <sebott@linux.vnet.ibm.com> CC: "David S. Miller" <davem@davemloft.net> CC: Chris Metcalf <cmetcalf@ezchip.com> CC: Chris Zankel <chris@zankel.net> CC: Max Filippov <jcmvbkbc@gmail.com> CC: Thomas Gleixner <tglx@linutronix.de> |
||
---|---|---|
.. | ||
fixup-bcm63xx.c | ||
fixup-capcella.c | ||
fixup-cobalt.c | ||
fixup-emma2rh.c | ||
fixup-fuloong2e.c | ||
fixup-ip32.c | ||
fixup-jmr3927.c | ||
fixup-lantiq.c | ||
fixup-lemote2f.c | ||
fixup-loongson3.c | ||
fixup-malta.c | ||
fixup-mpc30x.c | ||
fixup-pmcmsp.c | ||
fixup-rbtx4927.c | ||
fixup-rbtx4938.c | ||
fixup-rc32434.c | ||
fixup-sb1250.c | ||
fixup-sni.c | ||
fixup-tb0219.c | ||
fixup-tb0226.c | ||
fixup-tb0287.c | ||
Makefile | ||
msi-octeon.c | ||
msi-xlp.c | ||
ops-bcm63xx.c | ||
ops-bonito64.c | ||
ops-bridge.c | ||
ops-emma2rh.c | ||
ops-gt64xxx_pci0.c | ||
ops-lantiq.c | ||
ops-loongson2.c | ||
ops-loongson3.c | ||
ops-mace.c | ||
ops-msc.c | ||
ops-nile4.c | ||
ops-pmcmsp.c | ||
ops-rc32434.c | ||
ops-sni.c | ||
ops-tx3927.c | ||
ops-tx4927.c | ||
ops-vr41xx.c | ||
pci-alchemy.c | ||
pci-ar71xx.c | ||
pci-ar724x.c | ||
pci-ar2315.c | ||
pci-bcm47xx.c | ||
pci-bcm63xx.c | ||
pci-bcm63xx.h | ||
pci-bcm1480.c | ||
pci-bcm1480ht.c | ||
pci-emma2rh.c | ||
pci-ip27.c | ||
pci-ip32.c | ||
pci-lantiq.c | ||
pci-lantiq.h | ||
pci-lasat.c | ||
pci-malta.c | ||
pci-octeon.c | ||
pci-rc32434.c | ||
pci-rt2880.c | ||
pci-rt3883.c | ||
pci-sb1250.c | ||
pci-tx4927.c | ||
pci-tx4938.c | ||
pci-tx4939.c | ||
pci-virtio-guest.c | ||
pci-vr41xx.c | ||
pci-vr41xx.h | ||
pci-xlp.c | ||
pci-xlr.c | ||
pci.c | ||
pcie-octeon.c |