From: "Cédric Le Goater" <clg@kaod.org>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org,
"Paul Mackerras" <paulus@samba.org>,
"Cédric Le Goater" <clg@kaod.org>,
"Nicholas Piggin" <npiggin@gmail.com>
Subject: [PATCH 3/3] powerpc/xmon: Add a dump of all XIVE interrupts
Date: Wed, 14 Aug 2019 17:47:54 +0200 [thread overview]
Message-ID: <20190814154754.23682-4-clg@kaod.org> (raw)
In-Reply-To: <20190814154754.23682-1-clg@kaod.org>
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>
---
arch/powerpc/xmon/xmon.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
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;
}
--
2.21.0
prev parent reply other threads:[~2019-08-14 16:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-14 15:47 [PATCH 0/3] powerpc/xmon: Fix dump of XIVE interrupt under pseries Cédric Le Goater
2019-08-14 15:47 ` [PATCH 1/3] powerpc/xmon: Check for HV mode when dumping XIVE info from OPAL Cédric Le Goater
2019-08-15 7:30 ` Jordan Niethe
2019-08-15 8:15 ` Cédric Le Goater
2019-08-15 16:44 ` Cédric Le Goater
2019-08-22 13:09 ` Michael Ellerman
2019-08-14 15:47 ` [PATCH 2/3] powerpc/xive: Fix dump of XIVE interrupt under pseries Cédric Le Goater
2019-08-14 15:47 ` Cédric Le Goater [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190814154754.23682-4-clg@kaod.org \
--to=clg@kaod.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).