diff options
author | Niklas Schnelle <schnelle@linux.ibm.com> | 2021-02-12 16:19:31 +0300 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2021-04-12 13:46:42 +0300 |
commit | a50297cf8235b062bcdeaa8b1dad58e69d3e1b43 (patch) | |
tree | 12be5624238a016ed1c88f1ad6b3a571a7694f5d /arch/s390/pci/pci_bus.h | |
parent | 7dc697d6b2b5299ab7e09c592d727671a3859be2 (diff) | |
download | linux-a50297cf8235b062bcdeaa8b1dad58e69d3e1b43.tar.xz |
s390/pci: separate zbus creation from scanning
In the existing code the creation of the PCI bus and the scanning of
function zero all happens in zpci_scan_bus(). This in turn requires
functions to be enabled and their resources to be available before the
PCI bus is even created.
This not only means that functions are enabled long before they are
actually made available to the common PCI subsystem. In case of
functions with non-zero devfn which appeared before the function with
devfn zero they can wait arbitrarily long in this enabled but not
scanned state.
Fix this by separating the creation of the PCI bus from scanning it and
only prepare, that is enable and setup MMIO bus resources, functions
just before they are scanned. As they may be scanned multiple times
track if we already created resources in the zdev.
Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Acked-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')
-rw-r--r-- | arch/s390/pci/pci_bus.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/s390/pci/pci_bus.h b/arch/s390/pci/pci_bus.h index 2649238f6cde..981876ae3bd7 100644 --- a/arch/s390/pci/pci_bus.h +++ b/arch/s390/pci/pci_bus.h @@ -10,6 +10,8 @@ int zpci_bus_device_register(struct zpci_dev *zdev, struct pci_ops *ops); void zpci_bus_device_unregister(struct zpci_dev *zdev); +int zpci_bus_scan_bus(struct zpci_bus *zbus); + int zpci_bus_scan_device(struct zpci_dev *zdev); void zpci_bus_remove_device(struct zpci_dev *zdev, bool set_error); |