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

Manivannan Sadhasivam mani at kernel.org
Sun Jul 6 23:20:26 PDT 2025


On Fri, Jul 04, 2025 at 06:48:06AM GMT, Nam Cao wrote:
> On Thu, Jul 03, 2025 at 12:28:01PM -0500, Bjorn Helgaas wrote:
> > On Thu, Jun 26, 2025 at 04:47:50PM +0200, Nam Cao wrote:
> > > 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(-)
> > 
> > Looks good to me, thanks!  I think Mani will probably pick this up.
> > 
> > I might have included the specific "legacy MSI domain" thing you're
> > replacing.  It looks like you're replacing pci_msi_create_irq_domain()
> > with msi_create_parent_irq_domain()?
> 
> Yes, pci_msi_create_irq_domain() is legacy. We will delete it once
> everything is converted.
> 

I'll amend the commit message to include pci_msi_create_irq_domain().

> > Minor merge conflict in pcie-mediatek-gen3.c with dcbea1c7e94e ("PCI:
> > mediatek-gen3: Use dev_fwnode() for irq_domain_create_linear()").  No
> > problem, we can easily fix that up.
> 
> Thanks!
> 
> > The "++i" in vmd.c stuck out to me since "i++" is so much more common.
> 
> I always do "++i", maybe I'm the weird one..
> 

Just for the sake of uniformity, I'll do 's/++i/i++' while applying.

And based on the discussion on patch 14/16, I'll drop it to be applied through
netdev and apply the rest of the series through PCI tree.

- Mani

-- 
மணிவண்ணன் சதாசிவம்



More information about the Linux-mediatek mailing list