linux-stable/arch/s390/pci
Niklas Schnelle a50297cf82 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>
2021-04-12 12:46:42 +02:00
..
Makefile s390/pci: consolidate SR-IOV specific code 2020-09-14 11:38:34 +02:00
pci.c s390/pci: separate zbus creation from scanning 2021-04-12 12:46:42 +02:00
pci_bus.c s390/pci: separate zbus creation from scanning 2021-04-12 12:46:42 +02:00
pci_bus.h s390/pci: separate zbus creation from scanning 2021-04-12 12:46:42 +02:00
pci_clp.c s390/pci: refactor zpci_create_device() 2021-02-09 15:57:04 +01:00
pci_debug.c locking/atomic, s390/pci: Remove redundant casts 2019-06-03 12:32:57 +02:00
pci_dma.c dma-mapping: split <linux/dma-mapping.h> 2020-10-06 07:07:03 +02:00
pci_event.c s390/pci: fix DMA cleanup on hard deconfigure 2021-03-28 20:23:54 +02:00
pci_insn.c s390/pci: provide support for MIO instructions 2019-04-29 10:47:01 +02:00
pci_iov.c s390/pci: add missing pci_iov.h include 2020-09-16 14:08:47 +02:00
pci_iov.h s390/pci: consolidate SR-IOV specific code 2020-09-14 11:38:34 +02:00
pci_irq.c Scheduler updates: 2020-12-14 18:29:11 -08:00
pci_mmio.c mm: provide a saner PTE walking API for modules 2021-02-09 07:05:44 -05:00
pci_sysfs.c s390/pci: expose UID uniqueness guarantee 2021-04-05 11:30:57 +02:00