linux/drivers/pci/hotplug
Pierre Morel 05bc1be6db s390/pci: create zPCI bus
The zPCI bus is in charge to handle common zPCI resources for
zPCI devices.

Creating the zPCI bus, the PCI bus, the zPCI devices and the
PCI devices and hotplug slots
done in a specific order:
- PCI hotplug slot creation needs a PCI bus
- PCI bus needs a PCI domain
  which is reported by the pci_domain_nr() when setting up the
  host bridge
- PCI domain is set from the zPCI with devfn 0
  this is necessary to have a reproducible enumeration

Therefore we can not create devices or hotplug slots for any PCI
device associated with a zPCI device before having discovered
the function zero of the bus.

The discovery and initialization of devices can be done at several
points in the code:
- On Events, serialized in a thread context
- On initialization, in the kernel init thread context
- When powering on the hotplug slot, in a user thread context

The removal of devices and their parent bus may also be done on
events or for devices when powering down the slot.

To guarantee the existence of the bus and devices until they are
no more needed we use kref in zPCI bus and introduce a reference
count in the zPCI devices.

In this patch the zPCI bus still only accept a device with
a devfn 0.

Signed-off-by: Pierre Morel <pmorel@linux.ibm.com>
Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2020-04-28 13:49:46 +02:00
..
acpi_pcihp.c PCI: shpchp: Separate existence of SHPC and permission to use it 2018-06-26 15:38:28 -05:00
acpiphp_core.c Merge branch 'xarray' of git://git.infradead.org/users/willy/linux-dax 2018-10-28 11:35:40 -07:00
acpiphp_glue.c ACPI / hotplug / PCI: Allocate resources directly under the non-hotplug bridge 2019-11-13 17:01:59 -06:00
acpiphp_ibm.c PCI: hotplug: Embed hotplug_slot 2018-09-18 17:52:15 -05:00
acpiphp.h Merge branch 'xarray' of git://git.infradead.org/users/willy/linux-dax 2018-10-28 11:35:40 -07:00
cpci_hotplug_core.c PCI: Remove unnecessary returns 2019-08-30 14:00:34 -05:00
cpci_hotplug_pci.c PCI: hotplug: Embed hotplug_slot 2018-09-18 17:52:15 -05:00
cpci_hotplug.h PCI: hotplug: Embed hotplug_slot 2018-09-18 17:52:15 -05:00
cpcihp_generic.c PCI: Add SPDX GPL-2.0+ to replace GPL v2 or later boilerplate 2018-01-28 15:49:06 -06:00
cpcihp_zt5550.c PCI: Add SPDX GPL-2.0+ to replace GPL v2 or later boilerplate 2018-01-28 15:49:06 -06:00
cpcihp_zt5550.h PCI: Add SPDX GPL-2.0+ to replace GPL v2 or later boilerplate 2018-01-28 15:49:06 -06:00
cpqphp_core.c PCI: Remove unnecessary returns 2019-08-30 14:00:34 -05:00
cpqphp_ctrl.c PCI: Remove unnecessary returns 2019-08-30 14:00:34 -05:00
cpqphp_nvram.c PCI: Add SPDX GPL-2.0+ to replace GPL v2 or later boilerplate 2018-01-28 15:49:06 -06:00
cpqphp_nvram.h PCI: Remove unnecessary returns 2019-08-30 14:00:34 -05:00
cpqphp_pci.c Merge branch 'pci/spdx' into next 2018-02-01 11:40:07 -06:00
cpqphp_sysfs.c PCI: Add SPDX GPL-2.0+ to replace GPL v2 or later boilerplate 2018-01-28 15:49:06 -06:00
cpqphp.h PCI: hotplug: Embed hotplug_slot 2018-09-18 17:52:15 -05:00
ibmphp_core.c PCI: ibmphp: Turn semaphores into completions or mutexes 2019-01-29 17:15:36 -06:00
ibmphp_ebda.c PCI: hotplug: Embed hotplug_slot 2018-09-18 17:52:15 -05:00
ibmphp_hpc.c PCI: ibmphp: Turn semaphores into completions or mutexes 2019-01-29 17:15:36 -06:00
ibmphp_pci.c Merge branch 'pci/spdx' into next 2018-02-01 11:40:07 -06:00
ibmphp_res.c PCI: Mark expected switch fall-through 2019-08-08 15:13:34 -05:00
ibmphp.h PCI: ibmphp: Turn semaphores into completions or mutexes 2019-01-29 17:15:36 -06:00
Kconfig PCI: Fix indentation 2019-11-21 15:06:47 -06:00
Makefile PCI/hotplug: remove the sgi_hotplug driver 2019-08-16 11:33:56 -07:00
pci_hotplug_core.c PCI: hotplug: Drop hotplug_slot_info 2018-09-18 17:52:15 -05:00
pciehp_core.c PCI: pciehp: Prevent deadlock on disconnect 2019-11-12 17:17:42 -06:00
pciehp_ctrl.c PCI: pciehp: Prevent deadlock on disconnect 2019-11-12 17:17:42 -06:00
pciehp_hpc.c PCI: pciehp: Fix MSI interrupt race 2020-03-31 10:23:02 -05:00
pciehp_pci.c PCI: pciehp: Log messages with pci_dev, not pcie_device 2019-05-09 16:45:20 -05:00
pciehp.h PCI: pciehp: Disable in-band presence detect when possible 2020-02-20 22:44:30 -06:00
pnv_php.c pci/hotplug/pnv-php: Wrap warnings in macro 2020-01-23 21:31:17 +11:00
rpadlpar_core.c powerpc/eeh: Make early EEH init pseries specific 2020-03-25 12:09:39 +11:00
rpadlpar_sysfs.c pci-v4.16-changes 2018-02-06 09:59:40 -08:00
rpadlpar.h PCI: Add SPDX GPL-2.0+ to replace GPL v2 or later boilerplate 2018-01-28 15:49:06 -06:00
rpaphp_core.c powerpc/eeh: Make early EEH init pseries specific 2020-03-25 12:09:39 +11:00
rpaphp_pci.c powerpc/eeh: Make early EEH init pseries specific 2020-03-25 12:09:39 +11:00
rpaphp_slot.c PCI: rpaphp: Get/put device node reference during slot alloc/dealloc 2019-04-10 16:07:12 -05:00
rpaphp.h PCI: hotplug: Embed hotplug_slot 2018-09-18 17:52:15 -05:00
s390_pci_hpc.c s390/pci: create zPCI bus 2020-04-28 13:49:46 +02:00
shpchp_core.c PCI: hotplug: Embed hotplug_slot 2018-09-18 17:52:15 -05:00
shpchp_ctrl.c PCI: hotplug: Drop hotplug_slot_info 2018-09-18 17:52:15 -05:00
shpchp_hpc.c PCI: Add SPDX GPL-2.0+ to replace GPL v2 or later boilerplate 2018-01-28 15:49:06 -06:00
shpchp_pci.c Merge branch 'pci/spdx' into next 2018-02-01 11:40:07 -06:00
shpchp_sysfs.c PCI: Add SPDX GPL-2.0+ to replace GPL v2 or later boilerplate 2018-01-28 15:49:06 -06:00
shpchp.h PCI: hotplug: Embed hotplug_slot 2018-09-18 17:52:15 -05:00
TODO PCI: hotplug: Document TODOs 2018-09-18 17:52:15 -05:00