summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries/msi.c
diff options
context:
space:
mode:
authorCédric Le Goater <clg@kaod.org>2021-07-01 15:27:28 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2021-08-10 23:14:58 +1000
commit174db9e7f775ce06fc6949c9abbe758b3eb8171c (patch)
tree932b0b5520c37fcbc2526b13a435bffb982dcf7e /arch/powerpc/platforms/pseries/msi.c
parent9a014f456881e947bf8cdd8c984a207097e6c096 (diff)
downloadlinux-174db9e7f775ce06fc6949c9abbe758b3eb8171c.tar.gz
linux-174db9e7f775ce06fc6949c9abbe758b3eb8171c.tar.bz2
linux-174db9e7f775ce06fc6949c9abbe758b3eb8171c.zip
powerpc/pseries/pci: Add support of MSI domains to PHB hotplug
Simply allocate or release the MSI domains when a PHB is inserted in or removed from the machine. Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20210701132750.1475580-11-clg@kaod.org
Diffstat (limited to 'arch/powerpc/platforms/pseries/msi.c')
-rw-r--r--arch/powerpc/platforms/pseries/msi.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c
index f9635b01b2bf..e2127a3f7ebd 100644
--- a/arch/powerpc/platforms/pseries/msi.c
+++ b/arch/powerpc/platforms/pseries/msi.c
@@ -733,6 +733,16 @@ int pseries_msi_allocate_domains(struct pci_controller *phb)
return __pseries_msi_allocate_domains(phb, count);
}
+void pseries_msi_free_domains(struct pci_controller *phb)
+{
+ if (phb->msi_domain)
+ irq_domain_remove(phb->msi_domain);
+ if (phb->dev_domain)
+ irq_domain_remove(phb->dev_domain);
+ if (phb->fwnode)
+ irq_domain_free_fwnode(phb->fwnode);
+}
+
static void rtas_msi_pci_irq_fixup(struct pci_dev *pdev)
{
/* No LSI -> leave MSIs (if any) configured */