From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796099246; b=P4Da5Pq+dDrCbhff+RkaZh7UtbvRgXvqPv+5eBR4esheHb16BIdHyxVm021eFgNRTZOC 2ZvybgPON7S2FLoWNqgRSpT2IJ4pCMveRTzHit4odVmR1wBFF//fvIxKpeJ5aboow2m0X lpvk3qHHGaUGkBwjjHKB72Wi+edVecMrVvI1FGjuXyoqDyO0Pa4A0dEyhVU5/qKGRqbB2 qLnkCEvvUDatpbk06nrmPu/NyijSD0wGxhcgLgUysrumvzml0Lra4aWsSmFL5vQD96E6x FlG2ap1B1EnKfTj3a5qrwGjm7qwM/j4aBa7WSLfAjwRuM42ays/Ml4Ix9nq8Hh8L69Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796099246; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:Content-Transfer-Encoding; bh=yHo7bwQVFZk3ajmXyp5vpgTvjmDHZCfA/18UN0Ans5c=; b=KlbUTMbIAGnSrthGy30LVK04K3ne8kqn7nkmPgxnlHh4CmVUPusZjWp9X33c/WwiAUSG qc7K93lnzoMZLkSV4voclRvvuDvVuXjUnIb7XEybBtlilZsLXsStEGcK0pdpvkptiGVUp MWvbCITtkVFNQyxTqS6Ty5dG83SoVIzecNVm7G2+yPY3aKMMxSOlOf8fJTqIljCwiS6R1 ZQZV3yppOWMpkyVXICWjI+y158EmcqfKAr8B2cGC4UTtRoudahkK/bGJeG7bt4jFjOO10 1TCykILl1LmCghX5UkpdaXCConp3i2C7Ff7yQKEm/Ldx1rTGTzL/J02NqLeMLaTg/2w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Zn9GDjv7; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6022C606A31A; Tue, 1 Dec 2026 04:27:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Zn9GDjv7 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A6F01F00898; Tue, 1 Dec 2026 04:27:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796099245; bh=yHo7bwQVFZk3ajmXyp5vpgTvjmDHZCfA/18UN0Ans5c=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Zn9GDjv7b9WQlEn3Zs1GiIG0I0ZRqmdNm0oKny00SluhbPn10mS8FqXqowZ1oUX/u eMvWeWJ/mnRGvQ5HVKdYwgWDixjacbiRjBdceI8ODTRukYNgqKx7Mvysxanhcj05U4 hlb5lyuu2h5F9EyYIToBgN4m0oVzAYX12trl5834zCVtrIE7y9QmBSn/s3KYF7z+sH gbjIrWFzaCMAzRJ72MBztoZUTgwpUn2Xa1YfZjpOYa8HVS2cVkDirzTQNP2YWW2zBq TOCsPUzhaEQ3TkCDfeSQc0m2dM9SL6TVxnj3EZspYgQ93YKydXPgyAwBco0KRFTDRC UDcpLCO0e/8OQ== From: Song Liu To: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, live-patching@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, bpf@vger.kernel.org Cc: rostedt@goodmis.org, mhiramat@kernel.org, mark.rutland@arm.com, peterz@infradead.org, tglx@kernel.org, frederic@kernel.org, paulmck@kernel.org, catalin.marinas@arm.com, will@kernel.org, maddy@linux.ibm.com, mpe@ellerman.id.au, npiggin@gmail.com, chleroy@kernel.org, pjw@kernel.org, palmer@dabbelt.com, aou@eecs.berkeley.edu, alex@ghiti.fr, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, ojeda@kernel.org, kernel-team@meta.com, Song Liu Subject: [PATCH v3 17/22] thread_info: Mark the thread flag helpers notrace Date: Mon, 30 Nov 2026 20:21:56 -0800 Message-ID: <20261201042201.3199928-18-song@kernel.org> X-Mailer: git-send-email 2.53.1 In-Reply-To: <20261201042201.3199928-1-song@kernel.org> References: <20261201042201.3199928-1-song@kernel.org> X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit set_ti_thread_flag(), clear_ti_thread_flag() and the other thread flag helpers are plain inline functions. Some idle code uses them while RCU is not watching: snooze_loop() on pseries is a cpuidle state without CPUIDLE_FLAG_RCU_IDLE, so it runs after cpuidle_enter_state() has called ct_cpuidle_enter(), and it sets and clears TIF_POLLING_NRFLAG. With clang, a powerpc ppc64le_defconfig build has out-of-line copies of set_ti_thread_flag() and clear_ti_thread_flag(), called from snooze_loop(). The copies are untraced only because inline implies notrace. Mark the thread flag helpers notrace explicitly. No functional change. Assisted-by: Claude:claude-opus-5 Signed-off-by: Song Liu --- include/linux/thread_info.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h index 307b8390fc67..e62633233cad 100644 --- a/include/linux/thread_info.h +++ b/include/linux/thread_info.h @@ -99,17 +99,17 @@ static inline long set_restart_fn(struct restart_block *restart, * - pass TIF_xxxx constants to these functions */ -static inline void set_ti_thread_flag(struct thread_info *ti, int flag) +static inline notrace void set_ti_thread_flag(struct thread_info *ti, int flag) { set_bit(flag, (unsigned long *)&ti->flags); } -static inline void clear_ti_thread_flag(struct thread_info *ti, int flag) +static inline notrace void clear_ti_thread_flag(struct thread_info *ti, int flag) { clear_bit(flag, (unsigned long *)&ti->flags); } -static inline void update_ti_thread_flag(struct thread_info *ti, int flag, +static inline notrace void update_ti_thread_flag(struct thread_info *ti, int flag, bool value) { if (value) @@ -118,17 +118,17 @@ static inline void update_ti_thread_flag(struct thread_info *ti, int flag, clear_ti_thread_flag(ti, flag); } -static inline int test_and_set_ti_thread_flag(struct thread_info *ti, int flag) +static inline notrace int test_and_set_ti_thread_flag(struct thread_info *ti, int flag) { return test_and_set_bit(flag, (unsigned long *)&ti->flags); } -static inline int test_and_clear_ti_thread_flag(struct thread_info *ti, int flag) +static inline notrace int test_and_clear_ti_thread_flag(struct thread_info *ti, int flag) { return test_and_clear_bit(flag, (unsigned long *)&ti->flags); } -static inline int test_ti_thread_flag(struct thread_info *ti, int flag) +static inline notrace int test_ti_thread_flag(struct thread_info *ti, int flag) { return test_bit(flag, (unsigned long *)&ti->flags); } -- 2.53.1-Meta