alistair23-linux/arch/s390
Yijing Wang b97ea289cf PCI: Assign resources before drivers claim devices (pci_scan_root_bus())
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>
2015-03-19 10:17:13 -05:00
..
appldata
boot s390/sclp: fix declaration of _sclp_print_early() 2015-01-08 10:02:51 +01:00
configs s390: update default configuration 2015-01-22 12:16:09 +01:00
crypto s390/crypto: remove 'const' to avoid compiler warnings 2015-01-08 10:02:53 +01:00
hypfs VFS: (Scripted) Convert S_ISLNK/DIR/REG(dentry->d_inode) to d_is_*(dentry) 2015-02-22 11:38:41 -05:00
include Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2015-02-21 11:18:26 -08:00
kernel Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2015-02-21 11:18:26 -08:00
kvm Fairly small update, but there are some interesting new features. 2015-02-13 09:55:09 -08:00
lib s390/spinlock: add compare-and-delay to lock wait loops 2015-01-23 15:17:04 +01:00
math-emu
mm s390/mm: align 64-bit PIE binaries to 4GB 2015-02-19 10:36:32 +01:00
net s390/bpf: Zero extend parameters before calling C function 2015-01-15 11:10:41 +01:00
oprofile
pci PCI: Assign resources before drivers claim devices (pci_scan_root_bus()) 2015-03-19 10:17:13 -05:00
defconfig s390: update default configuration 2015-01-22 12:16:09 +01:00
Kbuild
Kconfig s390/smp: increase maximum value of NR_CPUS to 512 2015-01-30 09:31:13 +01:00
Kconfig.debug
Makefile s390/ftrace: hotpatch support for function tracing 2015-01-29 09:19:25 +01:00