From nobody Sun Dec 14 13:54:13 2025 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 BF362197A7F for ; Tue, 10 Dec 2024 10:20:45 +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=1733826047; cv=none; b=R3VamJwnJD9GPdmH/5P1KRqFAlesdPDQbJHcprbU6sHbshwouX010B2ixwD/RaRoD2HcqYgqjtDy6lztHu4bRX0oDdFxScZkPaeVoD9HL4f9raraS5SuafVZqpptqmOmX3AtupGpVMo5O2wS6qxqtc4twg07m24af8TBAL0uB4Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733826047; c=relaxed/simple; bh=vuNmMMWX1fv71HxaXsVGskpwiVOTZE7xPc1uXd9+QR0=; h=Message-ID:From:To:Cc:Subject:References:MIME-Version: Content-Type:Date; b=DPcHdkgshTOWd29k+vXqwJs46Yq1XlOL25o/YlILXf+2xWTsqECv82bUrzxjFSafARc4AkVhT2ZCaxTEAVvQIc867SK019G+nEGDtYNSZturguXZSanNf3vUEvYamqI8DWZZUbftSWtbaopy0w6v17aTmuLqvdCjMQIf/0+QZvg= 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=QEI7pUSn; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=GKic31Sq; 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="QEI7pUSn"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="GKic31Sq" Message-ID: <20241210101811.497716609@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1733826043; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=KmkAuzbm4a+qactOGR6smW7QItuLqmWVrEBlv9kYunM=; b=QEI7pUSnfM1VqmhOZOicb8+4VMSuHC6yYkj1skwU4fwVLOaQLtvbAplRR5bEerVZKFYaF4 PVXuM8hs/tHYzXg+SFJRO5UAEX8bVG8KLOd01jDSU7S4YQ2TbQ4mhV9qEZdlJR0PZncLBH a5iWwa7hTn5J+aCy3MGeFnNiv1WfEySLIJvMl3anG4OuJay5vuQXS+ujsDlewc4o+ufDAE /FhnmxX13JgUAuhQnuuVxtQRbhySvNjLdGFa082i/Nh3oDkBh3hgCUTl+42+6/AlfNEpkH QUt5kXETc6OJgKXR9XUrIY4ihv70Si8W5LqMvtk9f3eoYx34rNgCLWwj5CHMoA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1733826043; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=KmkAuzbm4a+qactOGR6smW7QItuLqmWVrEBlv9kYunM=; b=GKic31SqVonzo25+jJRyyBpOemJcs5gFSNnnAfANKxzQRZMDUGFsR9iRa3xhSJzwjhC2wc WHXM5qeeNIHaGuBQ== From: Thomas Gleixner To: LKML Cc: Marc Zyngier , Valentin Schneider Subject: [patch 1/2] genirq: Make handle_enforce_irqctx() unconditionally available References: <20241210101114.126983214@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Date: Tue, 10 Dec 2024 11:20:43 +0100 (CET) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Commit 1b57d91b969c ("irqchip/gic-v2, v3: Prevent SW resends entirely") sett the flag which enforces interrupt handling in interrupt context and prevents software base resends for ARM GIC v2/v3. But it missed that the helper function which checks the flag was hidden behind CONFIG_GENERIC_PENDING_IRQ, which is not set by ARM[64]. Make the helper unconditionally available so that the enforcement actually works. Fixes: 1b57d91b969c ("irqchip/gic-v2, v3: Prevent SW resends entirely") Signed-off-by: Thomas Gleixner Cc: Marc Zyngier Cc: Valentin Schneider --- kernel/irq/internals.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) --- a/kernel/irq/internals.h +++ b/kernel/irq/internals.h @@ -441,10 +441,6 @@ static inline struct cpumask *irq_desc_g { return desc->pending_mask; } -static inline bool handle_enforce_irqctx(struct irq_data *data) -{ - return irqd_is_handle_enforce_irqctx(data); -} bool irq_fixup_move_pending(struct irq_desc *desc, bool force_clear); #else /* CONFIG_GENERIC_PENDING_IRQ */ static inline bool irq_can_move_pcntxt(struct irq_data *data) @@ -471,11 +467,12 @@ static inline bool irq_fixup_move_pendin { return false; } +#endif /* !CONFIG_GENERIC_PENDING_IRQ */ + static inline bool handle_enforce_irqctx(struct irq_data *data) { - return false; + return irqd_is_handle_enforce_irqctx(data); } -#endif /* !CONFIG_GENERIC_PENDING_IRQ */ =20 #if !defined(CONFIG_IRQ_DOMAIN) || !defined(CONFIG_IRQ_DOMAIN_HIERARCHY) static inline int irq_domain_activate_irq(struct irq_data *data, bool rese= rve) From nobody Sun Dec 14 13:54:13 2025 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 255911DC9A2 for ; Tue, 10 Dec 2024 10:20:46 +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=1733826048; cv=none; b=DbeX0BGEUnkUaGcrVYAp2xH3oOBdOH3zBId3pSG8L0TAW/pY7/gXYACB1wCa5Es6F0SYuEIla5re+MzWSxL+gSG0MfuVB/ii6gG8W/PlUEEs+X78lElhVIG7rgOVva+1xKUEExVEJ5r2w6sP3UuyafYVahjdnbpt1K8+MlVNbYc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733826048; c=relaxed/simple; bh=PiOZnpgCk1m1HYScd2CMlNmCkVzgwsz3b0aUpo9y5Ls=; h=Message-ID:From:To:Subject:References:MIME-Version:Content-Type: cc:Date; b=EArr5BsIg2JR+MuyjB/Z4mXkTHjDybd8eIYsvJsHXQ82etK0XUJ8Oae5qf0hErP/5278fhXDh9mmi7YB8u6Shjkk0PljrtdCRjNUiwJUyElgf3gg6DTNWQ2T5UZhkT7dwy5bIHZnvYAAE2PMWVoAwkQRCBe4mVs8uzRXEgUnhkg= 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=itRDma+n; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=BWqUJMIa; 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="itRDma+n"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="BWqUJMIa" Message-ID: <20241210101811.561078243@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1733826045; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=/oDl9VzvX50i0pSP6IgHha/x7PE6jIHoiziKXPgCOkc=; b=itRDma+nLjaXoTeblEJnucrxA8EpVLOcgF2dQQG+gQLS1GVS8zq0mxhyyG/ixoDsWs/QMq X1mDbDGe5DuUXS1yeoebT/souMEUKLGqV8RD0sQAxZd6pNMfEcWCt5jWWxJ4usPwLeWV1u lWbm+WgYRXtIkrS4rTLq7/ksKJrCOYKzbgfGplCejxiavxnq5+uC1KTUimma7bx+x3A572 rSoL4FwHYtlKRYQ3ZuVXmJYzirLpm2kdRPv6dvxm6owuVm6kuwjovDzqLn8q/pgBEFGt5R Byy81oCQLHF94QDmu6epKhZ8ijfiAsdgK41iQD9p5+ggkvzbu3u38A85RpL5tg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1733826045; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=/oDl9VzvX50i0pSP6IgHha/x7PE6jIHoiziKXPgCOkc=; b=BWqUJMIaJuc/Z1+jYpFGKOl7m7ASX/STBib1/xrnU0fBTQb+rXiMPrqPjbwVDiHlSpEduF Y23RRouUbNimQGBQ== From: Thomas Gleixner To: LKML Subject: [patch 2/2] genirq: Remove handle_enforce_irqctx() wrapper References: <20241210101114.126983214@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 cc: Marc Zyngier , Valentin Schneider Date: Tue, 10 Dec 2024 11:20:45 +0100 (CET) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Now that it is unconditionally available, remove the wrapper. Signed-off-by: Thomas Gleixner --- kernel/irq/internals.h | 5 ----- kernel/irq/irqdesc.c | 2 +- kernel/irq/resend.c | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) --- a/kernel/irq/internals.h +++ b/kernel/irq/internals.h @@ -469,11 +469,6 @@ static inline bool irq_fixup_move_pendin } #endif /* !CONFIG_GENERIC_PENDING_IRQ */ =20 -static inline bool handle_enforce_irqctx(struct irq_data *data) -{ - return irqd_is_handle_enforce_irqctx(data); -} - #if !defined(CONFIG_IRQ_DOMAIN) || !defined(CONFIG_IRQ_DOMAIN_HIERARCHY) static inline int irq_domain_activate_irq(struct irq_data *data, bool rese= rve) { --- a/kernel/irq/irqdesc.c +++ b/kernel/irq/irqdesc.c @@ -708,7 +708,7 @@ int handle_irq_desc(struct irq_desc *des return -EINVAL; =20 data =3D irq_desc_get_irq_data(desc); - if (WARN_ON_ONCE(!in_hardirq() && handle_enforce_irqctx(data))) + if (WARN_ON_ONCE(!in_hardirq() && irqd_is_handle_enforce_irqctx(data))) return -EPERM; =20 generic_handle_irq_desc(desc); --- a/kernel/irq/resend.c +++ b/kernel/irq/resend.c @@ -53,7 +53,7 @@ static int irq_sw_resend(struct irq_desc * Validate whether this interrupt can be safely injected from * non interrupt context */ - if (handle_enforce_irqctx(&desc->irq_data)) + if (irqd_is_handle_enforce_irqctx(&desc->irq_data)) return -EINVAL; =20 /*