From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from stravinsky.debian.org (stravinsky.debian.org [82.195.75.108]) (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 D0D99A937 for ; Mon, 20 Apr 2026 13:15:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=82.195.75.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776690938; cv=none; b=ZVJ/13lk+yPDGj3rPwQZo/otlMgF+85jCGCUfczkAcza/CiVxS65CwEVUw7zkUh0RjeEuUmjFRfOePnh4G0xAe47ZAt+GUkhfZ76HUmmu0qLhzzV0PzBuUiYzKWmOI7T5YcAzg6HvEAQPgKxKk+/+LUOoRcvhgxpRnrQcyhlj1k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776690938; c=relaxed/simple; bh=oyw+tpv+jVfRUNywltkEEYJKSfzyaN14LOcKHzV8lQk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=PO5IFvx7Kcz6j0YBo/0H0ycCx8gJXiicbLibfV6XRF4/eWkPYNkUFWH0v29LaTJp6MGBckTLlO6koreG7aBioqIprU9nm+B5s5hlWTZYL7ukpqHyKgUdxEii1ZW8xOSBtJP09rD8Dt6TPiRMhrhetsvTS/lpbbYuH1sKdNvGoXQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org; spf=none smtp.mailfrom=debian.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b=fMTifmRA; arc=none smtp.client-ip=82.195.75.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=debian.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b="fMTifmRA" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org; s=smtpauto.stravinsky; h=X-Debian-User:In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Flv7WDVHKTQCMJsNArvsES/Rqc/yEc8FiZFn6Pz6tSk=; b=fMTifmRAn0s5rvDKP4iNbixWrK /1dWcVNPgY2m0ElpTC8rnQGeR/KlcCv0zflvBSDQyR9hb0QmLteg5BrS6P7TKcs/EmCWU6TgcwIp3 9d1recpyzJHZECYviBu0LI96Ygu8K8FAFbbqLYEHWtUV7wBEnYraDbRqy5x7ti8vjLAqUoUZ7JbWO OYV2KFgJ7xeNagUILHQHgkhdedI4M4yNu7MBK7CJewQTGLYT7QV9cfTYC3EpSlPrWrIFgK/XpBKoE 6Tws+r6I6cvILRxo1OKXgq36Agy68ding4V1mtQ5S20CDDHrsjJobhATFnXNIshWc828PLyoluXPi rMIg/W6A==; Received: from authenticated user by stravinsky.debian.org with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1wEoTJ-0006fQ-0P; Mon, 20 Apr 2026 13:15:29 +0000 Date: Mon, 20 Apr 2026 06:15:24 -0700 From: Breno Leitao To: Mark Rutland Cc: Catalin Marinas , Will Deacon , leo.bras@arm.com, leo.yan@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, palmer@dabbelt.com, paulmck@kernel.org, puranjay@kernel.org, usama.arif@linux.dev, kernel-team@meta.com Subject: Re: [PATCH RFC] arm64/irqflags: force inline of arch_local_irq_enable() Message-ID: References: <20260420-arm64_always_inline-v1-1-dba919cf46bc@debian.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Debian-User: leitao On Mon, Apr 20, 2026 at 02:06:23PM +0100, Mark Rutland wrote: > On Mon, Apr 20, 2026 at 05:42:11AM -0700, Breno Leitao wrote: > > arch_local_irq_enable() is a small wrapper that dispatches between two > > unmask paths: __daif_local_irq_enable() on most systems, and > > __pmr_local_irq_enable() on builds that use GIC PMR-based masking > > (Pseudo-NMI). Both leaf primitives are already __always_inline; the > > wrapper itself is plain "static inline". > > > > In practice the compiler does not always inline the wrapper. > > I think this was my mistake, and we should have marked all the helpers > as __always_inline for noinstr safety, as x86 did in commit: > > 7a745be1cc90 ("x86/entry: __always_inline irqflags for noinstr") > > I think we should mark all of the following as __always_inline in one > go: > > * arch_local_irq_enable() > * arch_local_irq_disable() > * arch_local_save_flags() > * arch_irqs_disabled_flags() > * arch_irqs_disabled() > * arch_local_irq_save() > * arch_local_irq_restore() > > ... which then ensures noinstr safety, and has the side benefit of > giving nicer traces as you're suggesting here. > > Are you happy to try that? Absolutely, I'll work on testing it that and put together a patch addressing all of them. Should this be targeted for stable backports as well? If so, which commit should I reference in the Fixes tag? Thanks for the quick answer, --breno