diff options
author | Cédric Le Goater <clg@kaod.org> | 2021-07-01 15:27:45 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-08-10 15:15:01 +0200 |
commit | c80198a21792ac59412871e4e6fad5041c9be8e4 (patch) | |
tree | 683d00c4f416a6f1a1abfe3820f4a5e5a36ef90c /arch/powerpc/sysdev/xics/xics-common.c | |
parent | powerpc/powernv/pci: Adapt is_pnv_opal_msi() to detect passthrough interrupt (diff) | |
download | linux-c80198a21792ac59412871e4e6fad5041c9be8e4.tar.xz linux-c80198a21792ac59412871e4e6fad5041c9be8e4.zip |
powerpc/xics: Fix IRQ migration
desc->irq_data points to the top level IRQ data descriptor which is
not necessarily in the XICS IRQ domain. MSIs are in another domain for
instance. Fix that by looking for a mapping on the low level XICS IRQ
domain.
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-28-clg@kaod.org
Diffstat (limited to 'arch/powerpc/sysdev/xics/xics-common.c')
-rw-r--r-- | arch/powerpc/sysdev/xics/xics-common.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/powerpc/sysdev/xics/xics-common.c b/arch/powerpc/sysdev/xics/xics-common.c index febab57f060f..4a7687caec75 100644 --- a/arch/powerpc/sysdev/xics/xics-common.c +++ b/arch/powerpc/sysdev/xics/xics-common.c @@ -183,6 +183,8 @@ void xics_migrate_irqs_away(void) unsigned int irq, virq; struct irq_desc *desc; + pr_debug("%s: CPU %u\n", __func__, cpu); + /* If we used to be the default server, move to the new "boot_cpuid" */ if (hw_cpu == xics_default_server) xics_update_irq_servers(); @@ -197,6 +199,7 @@ void xics_migrate_irqs_away(void) struct irq_chip *chip; long server; unsigned long flags; + struct irq_data *irqd; /* We can't set affinity on ISA interrupts */ if (virq < NR_IRQS_LEGACY) @@ -204,9 +207,11 @@ void xics_migrate_irqs_away(void) /* We only need to migrate enabled IRQS */ if (!desc->action) continue; - if (desc->irq_data.domain != xics_host) + /* We need a mapping in the XICS IRQ domain */ + irqd = irq_domain_get_irq_data(xics_host, virq); + if (!irqd) continue; - irq = desc->irq_data.hwirq; + irq = irqd_to_hwirq(irqd); /* We need to get IPIs still. */ if (irq == XICS_IPI || irq == XICS_IRQ_SPURIOUS) continue; |