[PATCH 00/16] PCI: MSI parent domain conversion

Nam Cao
2025-06-26T14:51:19Z

The initial implementation of PCI/MSI interrupt domains in the hierarchical
interrupt domain model used a shortcut by providing a global PCI/MSI
domain.

This works because the PCI/MSI[X] hardware is standardized and uniform, but
it violates the basic design principle of hierarchical interrupt domains:
Each hardware block involved in the interrupt delivery chain should have a
separate interrupt domain.

For PCI/MSI[X], the interrupt controller is per PCI device and not a global
made-up entity.

Unsurprisingly, the shortcut turned out to have downsides as it does not
allow dynamic allocation of interrupt vectors after initialization and it
prevents supporting IMS on PCI. For further details, see:

https://lore.kernel.org/lkml/20221111120501.026511281@linutronix.de/

The solution is implementing per device MSI domains, this means the
entities which provide global PCI/MSI domain so far have to implement MSI
parent domain functionality instead.

This series converts the PCI controller drivers to implement MSI parent
domain.

drivers/pci/Kconfig | 1 +
drivers/pci/controller/Kconfig | 11 +
drivers/pci/controller/dwc/Kconfig | 1 +
.../pci/controller/dwc/pcie-designware-host.c | 68 ++----
drivers/pci/controller/dwc/pcie-designware.h | 1 -
drivers/pci/controller/mobiveil/Kconfig | 1 +
.../controller/mobiveil/pcie-mobiveil-host.c | 42 ++--
.../pci/controller/mobiveil/pcie-mobiveil.h | 1 -
drivers/pci/controller/pci-aardvark.c | 59 ++---
drivers/pci/controller/pci-hyperv.c | 98 ++++++--
drivers/pci/controller/pcie-altera-msi.c | 44 ++--
drivers/pci/controller/pcie-brcmstb.c | 44 ++--
drivers/pci/controller/pcie-iproc-msi.c | 45 ++--
drivers/pci/controller/pcie-mediatek-gen3.c | 67 ++---
drivers/pci/controller/pcie-mediatek.c | 46 ++--
drivers/pci/controller/pcie-rcar-host.c | 69 ++----
drivers/pci/controller/pcie-xilinx-dma-pl.c | 48 ++--
drivers/pci/controller/pcie-xilinx-nwl.c | 45 ++--
drivers/pci/controller/pcie-xilinx.c | 55 +++--
drivers/pci/controller/plda/Kconfig | 1 +
drivers/pci/controller/plda/pcie-plda-host.c | 44 ++--
drivers/pci/controller/plda/pcie-plda.h | 1 -
drivers/pci/controller/vmd.c | 229 +++++++++---------
23 files changed, 504 insertions(+), 517 deletions(-)

--
2.39.5