All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@kaod.org>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: "Greg Kurz" <groug@kaod.org>,
	linuxppc-dev@lists.ozlabs.org, "Cédric Le Goater" <clg@kaod.org>,
	stable@vger.kernel.org
Subject: [PATCH 2/4] powerpc/xive: Fix xmon support on the PowerNV platform
Date: Fri,  6 Mar 2020 16:01:41 +0100	[thread overview]
Message-ID: <20200306150143.5551-3-clg@kaod.org> (raw)
In-Reply-To: <20200306150143.5551-1-clg@kaod.org>

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: 5896163f7f91 ("powerpc/xmon: Improve output of XIVE interrupts")
Cc: stable@vger.kernel.org # v5.4+
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
 arch/powerpc/sysdev/xive/common.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c
index 550baba98ec9..8155adc2225a 100644
--- a/arch/powerpc/sysdev/xive/common.c
+++ b/arch/powerpc/sysdev/xive/common.c
@@ -261,11 +261,15 @@ notrace void xmon_xive_do_dump(int cpu)
 
 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;
 	u32 target;
 	u8 prio;
 	u32 lirq;
 
+	if (!is_xive_irq(chip))
+		return -EINVAL;
+
 	rc = xive_ops->get_irq_config(hw_irq, &target, &prio, &lirq);
 	if (rc) {
 		xmon_printf("IRQ 0x%08x : no config rc=%d\n", hw_irq, rc);
-- 
2.21.1


WARNING: multiple messages have this Message-ID (diff)
From: "Cédric Le Goater" <clg@kaod.org>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org, "Greg Kurz" <groug@kaod.org>,
	stable@vger.kernel.org, "Cédric Le Goater" <clg@kaod.org>
Subject: [PATCH 2/4] powerpc/xive: Fix xmon support on the PowerNV platform
Date: Fri,  6 Mar 2020 16:01:41 +0100	[thread overview]
Message-ID: <20200306150143.5551-3-clg@kaod.org> (raw)
In-Reply-To: <20200306150143.5551-1-clg@kaod.org>

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: 5896163f7f91 ("powerpc/xmon: Improve output of XIVE interrupts")
Cc: stable@vger.kernel.org # v5.4+
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
 arch/powerpc/sysdev/xive/common.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c
index 550baba98ec9..8155adc2225a 100644
--- a/arch/powerpc/sysdev/xive/common.c
+++ b/arch/powerpc/sysdev/xive/common.c
@@ -261,11 +261,15 @@ notrace void xmon_xive_do_dump(int cpu)
 
 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;
 	u32 target;
 	u8 prio;
 	u32 lirq;
 
+	if (!is_xive_irq(chip))
+		return -EINVAL;
+
 	rc = xive_ops->get_irq_config(hw_irq, &target, &prio, &lirq);
 	if (rc) {
 		xmon_printf("IRQ 0x%08x : no config rc=%d\n", hw_irq, rc);
-- 
2.21.1


  parent reply	other threads:[~2020-03-06 15:38 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-06 15:01 [PATCH 0/4] powerpc/xive: fixes and debug extensions Cédric Le Goater
2020-03-06 15:01 ` [PATCH 1/4] powerpc/xive: Use XIVE_BAD_IRQ instead of zero to catch non configured IPIs Cédric Le Goater
2020-03-06 15:01   ` Cédric Le Goater
2020-03-10  5:17   ` David Gibson
2020-03-10  5:17     ` David Gibson
2020-03-10 15:09   ` Greg Kurz
2020-03-10 15:09     ` Greg Kurz
2020-03-10 16:07     ` Cédric Le Goater
2020-03-10 16:07       ` Cédric Le Goater
2020-04-01 12:53   ` Michael Ellerman
2020-04-01 12:53     ` Michael Ellerman
2020-03-06 15:01 ` Cédric Le Goater [this message]
2020-03-06 15:01   ` [PATCH 2/4] powerpc/xive: Fix xmon support on the PowerNV platform Cédric Le Goater
2020-03-10 15:38   ` Greg Kurz
2020-03-10 15:38     ` Greg Kurz
2020-03-06 15:01 ` [PATCH 3/4] powerpc/xmon: Add source flags to output of XIVE interrupts Cédric Le Goater
2020-03-10 15:43   ` Greg Kurz
2020-03-06 15:01 ` [PATCH 4/4] powerpc/xive: Add a debugfs file to dump internal XIVE state Cédric Le Goater

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=20200306150143.5551-3-clg@kaod.org \
    --to=clg@kaod.org \
    --cc=groug@kaod.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=stable@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.