mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiaxun Yang <jiaxun.yang@flygoat.com>
To: maz@kernel.org
Cc: tsbogend@alpha.franken.de, fancer.lancer@gmail.com,
	tglx@linutronix.de, linux-mips@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Jiaxun Yang <jiaxun.yang@flygoat.com>,
	stable@vger.kernel.org
Subject: [PATCH 1/2] irqchip/mips-gic: Don't touch vl_map if a local interrupt is not routable
Date: Mon, 24 Apr 2023 11:31:55 +0100	[thread overview]
Message-ID: <20230424103156.66753-2-jiaxun.yang@flygoat.com> (raw)
In-Reply-To: <20230424103156.66753-1-jiaxun.yang@flygoat.com>

When a GIC local interrupt is not routable, it's vl_map will be used
to control some internal states for core (providing IPTI, IPPCI, IPFDC
input signal for core). Overriding it will interfere core's intetrupt
controller.

Do not touch vl_map if a local interrupt is not routable, we are not
going to remap it.

Before dd098a0e0319 (" irqchip/mips-gic: Get rid of the reliance on
irq_cpu_online()"), if a local interrupt is not routable, then it won't
be requested from GIC Local domain, and thus gic_all_vpes_irq_cpu_online
won't be called for that particular interrupt.

Fixes: dd098a0e0319 (" irqchip/mips-gic: Get rid of the reliance on irq_cpu_online()")
Cc: stable@vger.kernel.org
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
 drivers/irqchip/irq-mips-gic.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c
index 046c355e120b..b568d55ef7c5 100644
--- a/drivers/irqchip/irq-mips-gic.c
+++ b/drivers/irqchip/irq-mips-gic.c
@@ -399,6 +399,8 @@ static void gic_all_vpes_irq_cpu_online(void)
 		unsigned int intr = local_intrs[i];
 		struct gic_all_vpes_chip_data *cd;
 
+		if (!gic_local_irq_is_routable(intr))
+			continue;
 		cd = &gic_all_vpes_chip_data[intr];
 		write_gic_vl_map(mips_gic_vx_map_reg(intr), cd->map);
 		if (cd->mask)
-- 
2.34.1


  reply	other threads:[~2023-04-24 10:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-24 10:31 [PATCH 0/2] irqchip/mips-gic fixes Jiaxun Yang
2023-04-24 10:31 ` Jiaxun Yang [this message]
2023-05-14 13:41   ` [PATCH 1/2] irqchip/mips-gic: Don't touch vl_map if a local interrupt is not routable Serge Semin
2023-05-16 10:22   ` [irqchip: irq/irqchip-fixes] " irqchip-bot for Jiaxun Yang
2023-04-24 10:31 ` [PATCH 2/2] irqchip/mips-gic: Use raw spinlock for gic_lock Jiaxun Yang
2023-05-14 13:56   ` Serge Semin
2023-05-14 20:45     ` Jiaxun Yang
2023-05-16 10:22   ` [irqchip: irq/irqchip-fixes] " irqchip-bot for Jiaxun Yang
2023-05-12 11:54 ` [PATCH 0/2] irqchip/mips-gic fixes Jiaxun Yang
2023-05-14 14:04 ` Serge Semin

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=20230424103156.66753-2-jiaxun.yang@flygoat.com \
    --to=jiaxun.yang@flygoat.com \
    --cc=fancer.lancer@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tsbogend@alpha.franken.de \
    /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

all inboxes | Powered by JetHome®