mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Biju Das" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Biju Das <biju.das.jz@bp.renesas.com>,
	Thomas Gleixner <tglx@kernel.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: irq/drivers] irqchip/renesas-rzg2l: Clear the shared interrupt bit in rzg2l_irqc_free()
Date: Tue, 31 Mar 2026 17:26:14 -0000	[thread overview]
Message-ID: <177497797487.1647592.589305499209406656.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20260328103324.134131-2-biju.das.jz@bp.renesas.com>

The following commit has been merged into the irq/drivers branch of tip:

Commit-ID:     d3689cd02c5de52ff5f3044169c482aee0dd5a78
Gitweb:        https://git.kernel.org/tip/d3689cd02c5de52ff5f3044169c482aee0dd5a78
Author:        Biju Das <biju.das.jz@bp.renesas.com>
AuthorDate:    Sat, 28 Mar 2026 10:33:18 
Committer:     Thomas Gleixner <tglx@kernel.org>
CommitterDate: Tue, 31 Mar 2026 18:25:29 +02:00

irqchip/renesas-rzg2l: Clear the shared interrupt bit in rzg2l_irqc_free()

rzg2l_irqc_free() invokes irq_domain_free_irqs_common(), which internally
calls irq_domain_reset_irq_data(). That explicitly sets irq_data->hwirq to
0. Consequently, irqd_to_hwirq(d) returns 0 when called after it.

Since 0 falls outside the valid shared IRQ ranges,
rzg2l_irqc_is_shared_and_get_irq_num() evaluates to false, completely
bypassing the test_and_clear_bit() operation.

This leaves the bit set in priv->used_irqs, causing future allocations to
fail with -EBUSY.

Fix this by retrieving irq_data and caching hwirq before calling
irq_domain_free_irqs_common().

Fixes: e0fcae27ff57 ("irqchip/renesas-rzg2l: Add shared interrupt support")
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260328103324.134131-2-biju.das.jz@bp.renesas.com
---
 drivers/irqchip/irq-renesas-rzg2l.c |  9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/irqchip/irq-renesas-rzg2l.c b/drivers/irqchip/irq-renesas-rzg2l.c
index 755fac3..199b3c6 100644
--- a/drivers/irqchip/irq-renesas-rzg2l.c
+++ b/drivers/irqchip/irq-renesas-rzg2l.c
@@ -698,15 +698,14 @@ shared_irq_free:
 
 static void rzg2l_irqc_free(struct irq_domain *domain, unsigned int virq, unsigned int nr_irqs)
 {
+	struct irq_data *d = irq_domain_get_irq_data(domain, virq);
 	struct rzg2l_irqc_priv *priv = domain->host_data;
+	irq_hw_number_t hwirq = irqd_to_hwirq(d);
 
 	irq_domain_free_irqs_common(domain, virq, nr_irqs);
 
-	if (priv->info.shared_irq_cnt) {
-		struct irq_data *d = irq_domain_get_irq_data(domain, virq);
-
-		rzg2l_irqc_shared_irq_free(priv, irqd_to_hwirq(d));
-	}
+	if (priv->info.shared_irq_cnt)
+		rzg2l_irqc_shared_irq_free(priv, hwirq);
 }
 
 static const struct irq_domain_ops rzg2l_irqc_domain_ops = {

  reply	other threads:[~2026-03-31 17:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-28 10:33 [PATCH 0/3] irqchip/renesas-rzg2l: Bug fixes and NMI support Biju
2026-03-28 10:33 ` [PATCH 1/3] irqchip/renesas-rzg2l: Fix shared IRQ bit not cleared on free Biju
2026-03-31 17:26   ` tip-bot2 for Biju Das [this message]
2026-03-28 10:33 ` [PATCH 2/3] irqchip/renesas-rzg2l: Replace raw_spin_{lock,unlock} with guard() in rzg2l_irq_set_type() Biju
2026-03-28 13:20   ` [tip: irq/drivers] " tip-bot2 for Biju Das
2026-03-28 10:33 ` [PATCH 3/3] irqchip/renesas-rzg2l: Add NMI support Biju
2026-03-28 16:19   ` Wolfram Sang
2026-03-31 17:35     ` Biju Das
2026-03-31 16:15   ` Thomas Gleixner
2026-03-31 17:10     ` Biju Das
2026-03-31 20:29       ` Thomas Gleixner
2026-04-01  7:30         ` Biju Das
2026-04-01 11:22           ` Thomas Gleixner

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=177497797487.1647592.589305499209406656.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=tglx@kernel.org \
    --cc=x86@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 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®