summaryrefslogtreecommitdiff
path: root/arch/powerpc/sysdev/xive/common.c
diff options
context:
space:
mode:
authorCédric Le Goater <clg@kaod.org>2019-08-14 17:47:53 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2019-08-19 13:20:24 +1000
commitb4868ff55d082bc66b0c287a41e4888f6d3e5f87 (patch)
tree1433205cf4e23a07497bebeacac7ec7b599822ca /arch/powerpc/sysdev/xive/common.c
parentc3e0dbd7f780a58c4695f1cd8fc8afde80376737 (diff)
downloadlwn-b4868ff55d082bc66b0c287a41e4888f6d3e5f87.tar.gz
lwn-b4868ff55d082bc66b0c287a41e4888f6d3e5f87.zip
powerpc/xive: Fix dump of XIVE interrupt under pseries
The xmon 'dxi' command calls OPAL to query the XIVE configuration of a interrupt. This can only be done on baremetal (PowerNV) and it will crash a pseries machine. Introduce a new XIVE get_irq_config() operation which implements a different query depending on the platform, PowerNV or pseries, and modify xmon to use a top level wrapper. 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/20190814154754.23682-3-clg@kaod.org
Diffstat (limited to 'arch/powerpc/sysdev/xive/common.c')
-rw-r--r--arch/powerpc/sysdev/xive/common.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c
index 6b973b7cdd8a..f75a660365e5 100644
--- a/arch/powerpc/sysdev/xive/common.c
+++ b/arch/powerpc/sysdev/xive/common.c
@@ -257,6 +257,13 @@ notrace void xmon_xive_do_dump(int cpu)
}
#endif
}
+
+int xmon_xive_get_irq_config(u32 irq, u32 *target, u8 *prio,
+ u32 *sw_irq)
+{
+ return xive_ops->get_irq_config(irq, target, prio, sw_irq);
+}
+
#endif /* CONFIG_XMON */
static unsigned int xive_get_irq(void)