aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/basic
diff options
context:
space:
mode:
authorYijing Wang <wangyijing@huawei.com>2015-03-16 11:18:56 +0800
committerBjorn Helgaas <bhelgaas@google.com>2015-03-19 10:17:13 -0500
commitb97ea289cf6aff8d4cbcefe2b707bb9b00a73c73 (patch)
treeefa328fedf08e394912322783660d27c33257610 /scripts/basic
parentPCI: Assign resources before drivers claim devices (pci_scan_bus()) (diff)
downloadlinux-b97ea289cf6aff8d4cbcefe2b707bb9b00a73c73.tar.gz
linux-b97ea289cf6aff8d4cbcefe2b707bb9b00a73c73.zip
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>
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions
d 'flags' magic for header search pathsMasahiro Yamada3-33/+13 2019-05-18treewide: prefix header search paths with $(srctree)/Masahiro Yamada17-26/+25 2019-05-18media: prefix header search paths with $(srctree)/Masahiro Yamada30-49/+47 2019-05-18media: remove unneeded header search pathsMasahiro Yamada7-11/+0 2019-05-18alpha: move arch/alpha/defconfig to arch/alpha/configs/defconfigMasahiro Yamada2-0/+2 2019-05-18kbuild: terminate Kconfig when $(CC) or $(LD) is missingMasahiro Yamada2-1/+9 2019-05-18kbuild: turn auto.conf.cmd into a mandatory include fileMasahiro Yamada1-1/+1 2019-05-18.gitignore: exclude .get_maintainer.ignore and .gitattributesMasahiro Yamada1-3/+5 2019-05-18kbuild: add all Clang-specific flags unconditionallyMasahiro Yamada2-11/+11 2019-05-18kbuild: Don't try to add '-fcatch-undefined-behavior' flagNathan Chancellor1-1/+0 2019-05-18kbuild: add some extra warning flags unconditionallyMasahiro Yamada1-6/+7 2019-05-18kbuild: add -Wvla flag unconditionallyMasahiro Yamada1-1/+1 2019-05-18arch: remove dangling asm-generic wrappersMasahiro Yamada5-13/+0 2019-05-18samples: guard sub-directories with CONFIG optionsMasahiro Yamada3-6/+22 2019-05-18kbuild: re-enable int-in-bool-context warningMasahiro Yamada1-1/+0 2019-05-18MAINTAINERS: kbuild: Add pattern for scripts/*vmlinux*Krzysztof Kozlowski1-0/+1 2019-05-18sh: exclude vmlinux.scr from .gitignore patternMasahiro Yamada1-0/+1 2019-05-18sh: vsyscall: drop unnecessary cc-ldoptionNick Desaulniers1-2/+1 2019-05-18ia64: require -Wl,--hash-style=sysvNick Desaulniers1-1/+1 2019-05-18csky: remove deprecated arch/csky/boot/dts/include/dt-bindingsMasahiro Yamada1-1/+0 2019-05-17ext4: avoid panic during forced reboot due to aborted journalJan Kara1-1/+1 2019-05-17i2c: core: add device-managed version of i2c_new_dummyHeiner Kallweit3-0/+50 2019-05-17i2c: core: improve return value handling of i2c_new_device and i2c_new_dummyHeiner Kallweit1-13/+61 2019-05-17powerpc/cacheinfo: Remove double freeTobin C. Harding1-1/+0 2019-05-17powerpc/mm/hash: Fix get_region_id() for invalid addressesAneesh Kumar K.V1-0/+4 2019-05-17kvm: fix compilation on aarch64Paolo Bonzini1-1/+1 2019-05-17objtool: Allow AR to be overridden with HOSTARNathan Chancellor1-1/+2 2019-05-17fbdev/efifb: Ignore framebuffer memmap entries that lack any memory typesArd Biesheuvel1-2/+6 2019-05-16riscv: fix locking violation in page fault handlerAndreas Schwab1-1/+2 2019-05-16RISC-V: sifive_l2_cache: Add L2 cache controller driver for SiFive SoCsYash Shah3-0/+192