summaryrefslogtreecommitdiff
path: root/arch/powerpc/xmon
diff options
context:
space:
mode:
authorCédric Le Goater <clg@kaod.org>2019-08-14 18:47:54 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2019-08-19 06:20:24 +0300
commit39f14e79b15a40709ef177bc4c07f193b6d3bce3 (patch)
treec9df2b88d4959c7dc2476e2e5707ba39e8dadd31 /arch/powerpc/xmon
parentb4868ff55d082bc66b0c287a41e4888f6d3e5f87 (diff)
downloadlinux-39f14e79b15a40709ef177bc4c07f193b6d3bce3.tar.xz
powerpc/xmon: Add a dump of all XIVE interrupts
Modify the xmon 'dxi' command to query all interrupts if no IRQ number is specified. 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-4-clg@kaod.org
Diffstat (limited to 'arch/powerpc/xmon')
-rw-r--r--arch/powerpc/xmon/xmon.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 4ea53e05053f..dc9832e06256 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -2584,6 +2584,25 @@ static void dump_one_xive_irq(u32 num)
num, target, prio, lirq, rc);
}
+static void dump_all_xive_irq(void)
+{
+ unsigned int i;
+ struct irq_desc *desc;
+
+ for_each_irq_desc(i, desc) {
+ struct irq_data *d = irq_desc_get_irq_data(desc);
+ unsigned int hwirq;
+
+ if (!d)
+ continue;
+
+ hwirq = (unsigned int)irqd_to_hwirq(d);
+ /* IPIs are special (HW number 0) */
+ if (hwirq)
+ dump_one_xive_irq(hwirq);
+ }
+}
+
static void dump_xives(void)
{
unsigned long num;
@@ -2601,6 +2620,8 @@ static void dump_xives(void)
} else if (c == 'i') {
if (scanhex(&num))
dump_one_xive_irq(num);
+ else
+ dump_all_xive_irq();
return;
}