linux_dsm_epyc7002/arch/unicore32/kernel
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
..
asm-offsets.c unicore32 core architecture: generic elf and ksyms stuff 2011-03-17 09:19:05 +08:00
clock.c arch/unicore32/kernel/clock.c: add readl() and writel() for 'PM_' macros 2014-06-20 08:22:37 +08:00
debug-macro.S unicore32 additional architecture files: low-level lib: ocd debug 2011-03-17 09:19:12 +08:00
debug.S unicore32 additional architecture files: low-level lib: ocd debug 2011-03-17 09:19:12 +08:00
dma.c Disintegrate asm/system.h for Unicore32 [based on ver #3, changed by gxt] 2012-03-28 18:30:03 +01:00
early_printk.c arch/unicore32/kernel/early_printk.c:setup_early_printk: missing initialization 2014-01-27 21:02:39 -08:00
elf.c unicore32 core architecture: generic elf and ksyms stuff 2011-03-17 09:19:05 +08:00
entry.S unicore32: switch to generic sigaltstack 2013-02-03 18:16:23 -05:00
fpu-ucf64.c unicore32 additional architecture files: float point handling 2011-03-17 09:19:11 +08:00
gpio.c unicore32 io: redefine __REG(x) and re-use readl/writel funcs 2011-03-17 09:19:19 +08:00
head.S Disintegrate asm/system.h for Unicore32 [based on ver #3, changed by gxt] 2012-03-28 18:30:03 +01:00
hibernate_asm.S unicore32 additional architecture files: pm related files 2011-03-17 09:19:11 +08:00
hibernate.c nosave: consolidate __nosave_{begin,end} in <asm/sections.h> 2014-10-09 22:26:04 -04:00
irq.c Disintegrate asm/system.h for Unicore32 [based on ver #3, changed by gxt] 2012-03-28 18:30:03 +01:00
ksyms.c arch: unicore32: ksyms: export additional find_first_*() to avoid compiling failure 2014-06-20 08:22:40 +08:00
ksyms.h arch: unicore32: kernel: ksyms: remove 'bswapsi2' and 'muldi3' to avoid compiling failure 2014-06-20 08:22:39 +08:00
Makefile cpufreq: unicore2: move cpufreq driver to drivers/cpufreq 2013-04-10 13:19:26 +02:00
module.c mm: vmalloc: pass additional vm_flags to __vmalloc_node_range() 2015-02-13 21:21:42 -08:00
pci.c PCI: Assign resources before drivers claim devices (pci_scan_bus()) 2015-03-12 15:04:01 -05:00
pm.c unicore32 additional architecture files: pm related files 2011-03-17 09:19:11 +08:00
process.c arch: unicore32: ksyms: export 'pm_power_off' to avoid compiling failure. 2014-06-20 08:22:40 +08:00
ptrace.c unicore32 additional architecture files: ptrace handling 2011-03-17 09:19:12 +08:00
puv3-core.c platform: Remove most references to platform_bus device 2014-07-23 19:09:03 -07:00
puv3-nb0916.c platform: Remove most references to platform_bus device 2014-07-23 19:09:03 -07:00
setup.c arch/unicore32/kernel/setup.c: add generic 'screen_info' to avoid compiling failure 2014-06-20 08:22:39 +08:00
setup.h reboot: unicore32: prepare reboot_mode for moving to generic kernel code 2013-07-09 10:33:29 -07:00
signal.c all arches, signal: move restart_block to struct task_struct 2015-02-12 18:54:12 -08:00
sleep.S unicore32: modify io_p2v and io_v2p macros, and adjust PKUNITY_mmio_BASEs 2011-03-17 09:19:21 +08:00
stacktrace.c unicore32 core architecture: process/thread related codes 2011-03-17 09:19:07 +08:00
sys.c unicore32: just use mmap_pgoff()... 2013-05-09 14:10:07 -04:00
time.c unicore32: Remove IRQF_DISABLED 2012-01-10 10:29:41 +08:00
traps.c dump_stack: consolidate dump_stack() implementations and unify their behaviors 2013-04-30 17:04:02 -07:00
vmlinux.lds.S unicore32: change PERCPU to PERCPU_SECTION 2011-06-09 16:27:46 +08:00