summaryrefslogtreecommitdiff
path: root/arch/s390/pci/pci_bus.h
diff options
context:
space:
mode:
authorNiklas Schnelle <schnelle@linux.ibm.com>2021-02-12 12:16:46 +0300
committerHeiko Carstens <hca@linux.ibm.com>2021-04-12 13:46:42 +0300
commit0350276168942a9fb7540c03995229e3502976a2 (patch)
tree1ab6d861e4030555addf6113a09eb99001ed4cfc /arch/s390/pci/pci_bus.h
parenta50297cf8235b062bcdeaa8b1dad58e69d3e1b43 (diff)
downloadlinux-0350276168942a9fb7540c03995229e3502976a2.tar.xz
s390/pci: use mutex not spinlock for zbus list
In a later change we will first collect all PCI functions from the CLP List PCI functions call, then register them to/creating the relevant zbus. Then only after we've created our virtual bus structure will we scan all zbusses iterating over the zbus list. Since scanning is relatively slow a spinlock is a bad fit for protecting the loop over the devices on the zbus. Furthermore doing the probing on the bus we need to use pci_lock_rescan_remove() as devices are added to the PCI subsystem and that is a mutex which can't be locked nested inside a spinlock section. Note that the contention of this lock should be very low either way as zbusses are only added/removed concurrently on hotplug events. Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com> Reviewed-by: Pierre Morel <pmorel@linux.ibm.com> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/pci/pci_bus.h')
0 files changed, 0 insertions, 0 deletions