From nobody Wed Apr 1 09:52:41 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2352F36920D; Tue, 31 Mar 2026 17:26:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774977980; cv=none; b=fTY3+2QnwK/WkZdpX6jVH6B1YozgPxcArNSyki6tthbnVYd8MpGnfKSVDMbgN0Lk/i1+Fxq4HqSve1jRdf3m1xcDAfN3Rh6iaB/FzE7nPgPMnXuvn22jLqkWerMGPuqZYW5q12EmMvWnKVH/j0HR96AOkR8qB2XGDGmlitbWsTs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774977980; c=relaxed/simple; bh=cZN15uqhaqyI0xqaz+UzFOm19W07Eo5CVSvpRPi0sEk=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=WQ2vdodA+DPr7IAJoc2rbYNuIDXREVaLwr6RjHR0K2Vu9H4EfNcNcNt1p3YmNC6FezuuJnsMqyzRfM4vJw1/j05t0bi1RrWeqGa3ksS18GujfsjScl2MUnJPuCpCodHdAxlHRXsOHA5aiQB9yTbUrBxJZ5sexG5GxWqx3C2JvqM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=bPzEV3bB; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=o15kSjGK; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="bPzEV3bB"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="o15kSjGK" Date: Tue, 31 Mar 2026 17:26:14 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1774977976; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=usM+eZAZCdpYtoV3OBReGwCBpOW75+cTFWe9LiirJhU=; b=bPzEV3bBH04aoa9vHuvKVYECo7vG7un0THK7cbl0qJqCytBKfryStA9LOzUZzQYUB7FMNY gBp/1YFaDsLSpme8P2jK95rXQGsi/reRIqVJVk8EMBbrjR2b/tIZylswq5RXtrcWweLCHy +nvkfnXLtk0bT6dgIujfxy8bKwToDZRz6ytUm3mdF1wOHvu96LjGFOsIoiqkwofp8eSS/S 9lEwSmTfAkIXgItz548FhkLBNoLnbjj+CKpJYA9ilMEuosahSQMwSbQurZTcWPjrXfOI3e NQDyqJWIziTjYapbXgkLHUmX8Px0zUZWqAqvSbOtNO1fkaYxq+7ZZZ5bPUAqAA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1774977976; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=usM+eZAZCdpYtoV3OBReGwCBpOW75+cTFWe9LiirJhU=; b=o15kSjGKFfOvUBLnWaS55n11A9TfdfHNr9qheQn5RQRWXCBwwr9r/tilFluZLM2VNPhW6x gz1VO8S5KrM52MAA== From: "tip-bot2 for Biju Das" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/drivers] irqchip/renesas-rzg2l: Clear the shared interrupt bit in rzg2l_irqc_free() Cc: Biju Das , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260328103324.134131-2-biju.das.jz@bp.renesas.com> References: <20260328103324.134131-2-biju.das.jz@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177497797487.1647592.589305499209406656.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the irq/drivers branch of tip: Commit-ID: d3689cd02c5de52ff5f3044169c482aee0dd5a78 Gitweb: https://git.kernel.org/tip/d3689cd02c5de52ff5f3044169c482aee= 0dd5a78 Author: Biju Das AuthorDate: Sat, 28 Mar 2026 10:33:18=20 Committer: Thomas Gleixner 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 Signed-off-by: Thomas Gleixner Link: https://patch.msgid.link/20260328103324.134131-2-biju.das.jz@bp.renes= as.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-rene= sas-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: =20 static void rzg2l_irqc_free(struct irq_domain *domain, unsigned int virq, = unsigned int nr_irqs) { + struct irq_data *d =3D irq_domain_get_irq_data(domain, virq); struct rzg2l_irqc_priv *priv =3D domain->host_data; + irq_hw_number_t hwirq =3D irqd_to_hwirq(d); =20 irq_domain_free_irqs_common(domain, virq, nr_irqs); =20 - if (priv->info.shared_irq_cnt) { - struct irq_data *d =3D 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); } =20 static const struct irq_domain_ops rzg2l_irqc_domain_ops =3D {