linux-stable/arch/s390/pci
Niklas Schnelle 14c87ba812 s390/pci: separate zbus registration from scanning
Now that the zbus can be created without being scanned we can go one
step further and make registering a device to a zbus independent from
scanning it. This way the zbus handling becomes much more natural
in that functions can be registered on the zbus to be scanned later more
closely resembling the handling of both real PCI hardware and other
virtual PCI busses like Hyper-V's virtual PCI bus (see for example
drivers/pci/controller/pci-hyperv.c:create_root_hv_pci_bus()).

Having zbus registration separate from scanning allows us to return
fully initialized but still disabled zdevs from zpci_create_device()
which can then be configured just as we would configure a zdev from
standby (minus the SCLP Configure already done by the platform).  There
is still the exception that a PCI function with non-zero devfn can be
plugged before its PCI bus, which depends on the function with zero
devfn, is created. In this case the zdev returend from
zpci_create_device() is still missing its bus, hotplug slot, and
resources which need to be created later but at least it doesn't wait in
the enabled state and can otherwise be treated as initialized.

With this we also separate the initial PCI scan using CLP List PCI
Functions into two phases. In the CLP loop's callback we only register
each function with a virtual zbus creating the latter as needed. Then,
after we have built this virtual PCI topology based on our list of
zbusses, we can make use of the common code functionality to scan each
complete zbus as a separate child bus.

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 registration from scanning 2021-04-12 12:46:42 +02:00
pci_bus.c s390/pci: separate zbus registration from scanning 2021-04-12 12:46:42 +02:00
pci_bus.h s390/pci: separate zbus registration 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: separate zbus registration from scanning 2021-04-12 12:46:42 +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