[PATCH 12/12] PCI: xgene-msi: Restructure handler setup/teardown

Marc Zyngier maz at kernel.org
Mon Jul 7 08:58:29 PDT 2025


On Mon, 07 Jul 2025 12:14:09 +0100,
Lorenzo Pieralisi <lpieralisi at kernel.org> wrote:
> 
> On Sat, Jun 28, 2025 at 06:30:05PM +0100, Marc Zyngier wrote:
> > Another utterly pointless aspect of the xgene-msi driver is that
> > it is built around CPU hotplug. Which is quite amusing since this
> > is one of the few arm64 platforms that, by construction, cannot
> > do CPU hotplug in a supported way (no EL3, no PSCI, no luck).
> > 
> > Drop the CPU hotplug nonsense and just setup the IRQs and handlers
> > in a less overdesigned way, grouping things more logically in the
> > process.
> > 
> > Signed-off-by: Marc Zyngier <maz at kernel.org>
> > ---
> >  drivers/pci/controller/pci-xgene-msi.c | 109 +++++++++----------------
> >  1 file changed, 37 insertions(+), 72 deletions(-)
> > 
> > diff --git a/drivers/pci/controller/pci-xgene-msi.c b/drivers/pci/controller/pci-xgene-msi.c
> > index a22a6df7808c7..9f05c2a12da94 100644
> > --- a/drivers/pci/controller/pci-xgene-msi.c
> > +++ b/drivers/pci/controller/pci-xgene-msi.c
> > @@ -216,12 +216,6 @@ static int xgene_allocate_domains(struct device_node *node,
> >  	return msi->inner_domain ? 0 : -ENOMEM;
> >  }
> >  
> > -static void xgene_free_domains(struct xgene_msi *msi)
> > -{
> > -	if (msi->inner_domain)
> > -		irq_domain_remove(msi->inner_domain);
> > -}
> > -
> >  static int xgene_msi_init_allocator(struct device *dev)
> >  {
> >  	xgene_msi_ctrl->bitmap = devm_bitmap_zalloc(dev, NR_MSI_VEC, GFP_KERNEL);
> > @@ -271,26 +265,48 @@ static void xgene_msi_isr(struct irq_desc *desc)
> >  	chained_irq_exit(chip, desc);
> >  }
> >  
> > -static enum cpuhp_state pci_xgene_online;
> > -
> >  static void xgene_msi_remove(struct platform_device *pdev)
> >  {
> > -	struct xgene_msi *msi = platform_get_drvdata(pdev);
> > -
> > -	if (pci_xgene_online)
> > -		cpuhp_remove_state(pci_xgene_online);
> > -	cpuhp_remove_state(CPUHP_PCI_XGENE_DEAD);
> 
> No question on the patch - just noticed we could remove
> CPUHP_PCI_XGENE_DEAD from cpuhp_state since it would become
> unused AFAICS.

Good point. I'll add that to the queue.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.



More information about the linux-arm-kernel mailing list