mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2026-01-11 06:12:59 +00:00
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>
|
||
|---|---|---|
| .. | ||
| vdso | ||
| asm-offsets.c | ||
| backtrace.c | ||
| compat_signal.c | ||
| compat.c | ||
| early_printk.c | ||
| entry.S | ||
| ftrace.c | ||
| hardwall.c | ||
| head_32.S | ||
| head_64.S | ||
| hvglue_trace.c | ||
| hvglue.S | ||
| intvec_32.S | ||
| intvec_64.S | ||
| irq.c | ||
| kgdb.c | ||
| kprobes.c | ||
| machine_kexec.c | ||
| Makefile | ||
| mcount_64.S | ||
| messaging.c | ||
| module.c | ||
| pci_gx.c | ||
| pci-dma.c | ||
| pci.c | ||
| perf_event.c | ||
| pmc.c | ||
| proc.c | ||
| process.c | ||
| ptrace.c | ||
| reboot.c | ||
| regs_32.S | ||
| regs_64.S | ||
| relocate_kernel_32.S | ||
| relocate_kernel_64.S | ||
| setup.c | ||
| signal.c | ||
| single_step.c | ||
| smp.c | ||
| smpboot.c | ||
| stack.c | ||
| sys.c | ||
| sysfs.c | ||
| tile-desc_32.c | ||
| tile-desc_64.c | ||
| time.c | ||
| tlb.c | ||
| traps.c | ||
| unaligned.c | ||
| usb.c | ||
| vdso.c | ||
| vmlinux.lds.S | ||