• Niklas Schnelle's avatar
    s390/pci: use mutex not spinlock for zbus list · 03502761
    Niklas Schnelle authored
    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: default avatarMatthew Rosato <mjrosato@linux.ibm.com>
    Reviewed-by: default avatarPierre Morel <pmorel@linux.ibm.com>
    Signed-off-by: default avatarNiklas Schnelle <schnelle@linux.ibm.com>
    Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
    03502761
pci_bus.c 10 KB