Commit 97ef2750 authored by Cédric Le Goater's avatar Cédric Le Goater Committed by Michael Ellerman

powerpc/xive: Fix xmon support on the PowerNV platform

The PowerNV platform has multiple IRQ chips and the xmon command
dumping the state of the XIVE interrupt should only operate on the
XIVE IRQ chip.

Fixes: 5896163f ("powerpc/xmon: Improve output of XIVE interrupts")
Cc: stable@vger.kernel.org # v5.4+
Signed-off-by: default avatarCédric Le Goater <clg@kaod.org>
Reviewed-by: default avatarGreg Kurz <groug@kaod.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200306150143.5551-3-clg@kaod.org
parent b1a504a6
...@@ -258,11 +258,15 @@ notrace void xmon_xive_do_dump(int cpu) ...@@ -258,11 +258,15 @@ notrace void xmon_xive_do_dump(int cpu)
int xmon_xive_get_irq_config(u32 hw_irq, struct irq_data *d) int xmon_xive_get_irq_config(u32 hw_irq, struct irq_data *d)
{ {
struct irq_chip *chip = irq_data_get_irq_chip(d);
int rc; int rc;
u32 target; u32 target;
u8 prio; u8 prio;
u32 lirq; u32 lirq;
if (!is_xive_irq(chip))
return -EINVAL;
rc = xive_ops->get_irq_config(hw_irq, &target, &prio, &lirq); rc = xive_ops->get_irq_config(hw_irq, &target, &prio, &lirq);
if (rc) { if (rc) {
xmon_printf("IRQ 0x%08x : no config rc=%d\n", hw_irq, rc); xmon_printf("IRQ 0x%08x : no config rc=%d\n", hw_irq, rc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment