From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E135E606A325 for ; Tue, 1 Dec 2026 04:27:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=TVfOlAV4; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Zn9GDjv7 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=9lvLblW+DBjOY9zmZIIT1TGW98E46tOl1w+s68IN+mY=; b=TVfOlAV4zdbfCpFB8JZK6iSZQb YolJwy5UKetYfK2G+lnAsxHEYzhCfXThgMBoEXS6rZVfdqT6JJ226lBNlspiXBMKDINvVfd+mLTK0 fI5kp5/Rw8LQngWHBm8A/xGK5mvCPPeVXASck9abEsd5oDEmAMaYq54/eGlLuGKJMLYytZSb7V0KN Df+SNHRJ5vkiW5l64xsxMycuBsglBmWi5cPDc2EbHQaHoPGN1JEgJGruzYdD3VFnCuJrlXJJ1JAGG yMh4JoajKWKqspI0ICJyLT8w0Lsuow+xewg5LqrXzpMHv2j+fGWCeD/1t9paa8lWRgo/0jfSrjwmq xIAP70hw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYFSj-00000006a9f-2Aoh; Tue, 01 Dec 2026 04:27:29 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYFSg-00000006a5B-376v; Tue, 01 Dec 2026 04:27:26 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 58E0B43B9C; Tue, 1 Dec 2026 04:27:26 +0000 (UTC) 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-Archived-By: MIME-Version: 1.0 X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" X-Spam-Status: No, score=-16.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 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 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv