* [PATCH] rcu: mark lockdep_assert_rcu_helper() __always_inline
@ 2026-02-02 9:55 Arnd Bergmann
2026-02-02 9:58 ` Peter Zijlstra
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Arnd Bergmann @ 2026-02-02 9:55 UTC (permalink / raw)
To: Paul E. McKenney, Frederic Weisbecker, Neeraj Upadhyay,
Joel Fernandes, Josh Triplett, Boqun Feng, Uladzislau Rezki,
Peter Zijlstra (Intel), Marco Elver
Cc: Arnd Bergmann, Steven Rostedt, Mathieu Desnoyers, Lai Jiangshan,
Zqiang, Vlastimil Babka, Harry Yoo, Menglong Dong, Herbert Xu,
rcu, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
There are some configurations in which lockdep_assert_rcu_helper() ends up
not being inlined, for some reason. This leads to a link failure because
now the caller tries to pass a nonexistant __ctx_lock_RCU structure:
ld: lib/test_context-analysis.o: in function `test_rcu_assert_variants':
test_context-analysis.c:(.text+0x275c): undefined reference to `RCU'
ld: test_context-analysis.c:(.text+0x276c): undefined reference to `RCU_BH'
ld: test_context-analysis.c:(.text+0x2774): undefined reference to `RCU_SCHED'
I saw this in one out of many 32-bit arm builds using gcc-15.2, but
it probably happens in others as well.
Mark this function as __always_inline to fix the build.
Fixes: fe00f6e84621 ("rcu: Support Clang's context analysis")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
include/linux/rcupdate.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index ea1e979b290e..7729fef249e1 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -406,7 +406,7 @@ static inline void rcu_preempt_sleep_check(void) { }
// See RCU_LOCKDEP_WARN() for an explanation of the double call to
// debug_lockdep_rcu_enabled().
-static inline bool lockdep_assert_rcu_helper(bool c, const struct __ctx_lock_RCU *ctx)
+static __always_inline bool lockdep_assert_rcu_helper(bool c, const struct __ctx_lock_RCU *ctx)
__assumes_shared_ctx_lock(RCU) __assumes_shared_ctx_lock(ctx)
{
return debug_lockdep_rcu_enabled() &&
--
2.39.5
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] rcu: mark lockdep_assert_rcu_helper() __always_inline
2026-02-02 9:55 [PATCH] rcu: mark lockdep_assert_rcu_helper() __always_inline Arnd Bergmann
@ 2026-02-02 9:58 ` Peter Zijlstra
2026-02-02 15:53 ` Paul E. McKenney
2026-02-02 21:04 ` [tip: locking/core] rcu: Mark " tip-bot2 for Arnd Bergmann
2 siblings, 0 replies; 4+ messages in thread
From: Peter Zijlstra @ 2026-02-02 9:58 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Paul E. McKenney, Frederic Weisbecker, Neeraj Upadhyay,
Joel Fernandes, Josh Triplett, Boqun Feng, Uladzislau Rezki,
Marco Elver, Arnd Bergmann, Steven Rostedt, Mathieu Desnoyers,
Lai Jiangshan, Zqiang, Vlastimil Babka, Harry Yoo, Menglong Dong,
Herbert Xu, rcu, linux-kernel
On Mon, Feb 02, 2026 at 10:55:01AM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> There are some configurations in which lockdep_assert_rcu_helper() ends up
> not being inlined, for some reason. This leads to a link failure because
> now the caller tries to pass a nonexistant __ctx_lock_RCU structure:
>
> ld: lib/test_context-analysis.o: in function `test_rcu_assert_variants':
> test_context-analysis.c:(.text+0x275c): undefined reference to `RCU'
> ld: test_context-analysis.c:(.text+0x276c): undefined reference to `RCU_BH'
> ld: test_context-analysis.c:(.text+0x2774): undefined reference to `RCU_SCHED'
>
> I saw this in one out of many 32-bit arm builds using gcc-15.2, but
> it probably happens in others as well.
>
> Mark this function as __always_inline to fix the build.
>
> Fixes: fe00f6e84621 ("rcu: Support Clang's context analysis")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] rcu: mark lockdep_assert_rcu_helper() __always_inline
2026-02-02 9:55 [PATCH] rcu: mark lockdep_assert_rcu_helper() __always_inline Arnd Bergmann
2026-02-02 9:58 ` Peter Zijlstra
@ 2026-02-02 15:53 ` Paul E. McKenney
2026-02-02 21:04 ` [tip: locking/core] rcu: Mark " tip-bot2 for Arnd Bergmann
2 siblings, 0 replies; 4+ messages in thread
From: Paul E. McKenney @ 2026-02-02 15:53 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Frederic Weisbecker, Neeraj Upadhyay, Joel Fernandes,
Josh Triplett, Boqun Feng, Uladzislau Rezki,
Peter Zijlstra (Intel), Marco Elver, Arnd Bergmann,
Steven Rostedt, Mathieu Desnoyers, Lai Jiangshan, Zqiang,
Vlastimil Babka, Harry Yoo, Menglong Dong, Herbert Xu, rcu,
linux-kernel
On Mon, Feb 02, 2026 at 10:55:01AM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> There are some configurations in which lockdep_assert_rcu_helper() ends up
> not being inlined, for some reason. This leads to a link failure because
> now the caller tries to pass a nonexistant __ctx_lock_RCU structure:
>
> ld: lib/test_context-analysis.o: in function `test_rcu_assert_variants':
> test_context-analysis.c:(.text+0x275c): undefined reference to `RCU'
> ld: test_context-analysis.c:(.text+0x276c): undefined reference to `RCU_BH'
> ld: test_context-analysis.c:(.text+0x2774): undefined reference to `RCU_SCHED'
>
> I saw this in one out of many 32-bit arm builds using gcc-15.2, but
> it probably happens in others as well.
>
> Mark this function as __always_inline to fix the build.
>
> Fixes: fe00f6e84621 ("rcu: Support Clang's context analysis")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
> ---
> include/linux/rcupdate.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
> index ea1e979b290e..7729fef249e1 100644
> --- a/include/linux/rcupdate.h
> +++ b/include/linux/rcupdate.h
> @@ -406,7 +406,7 @@ static inline void rcu_preempt_sleep_check(void) { }
>
> // See RCU_LOCKDEP_WARN() for an explanation of the double call to
> // debug_lockdep_rcu_enabled().
> -static inline bool lockdep_assert_rcu_helper(bool c, const struct __ctx_lock_RCU *ctx)
> +static __always_inline bool lockdep_assert_rcu_helper(bool c, const struct __ctx_lock_RCU *ctx)
> __assumes_shared_ctx_lock(RCU) __assumes_shared_ctx_lock(ctx)
> {
> return debug_lockdep_rcu_enabled() &&
> --
> 2.39.5
>
^ permalink raw reply [flat|nested] 4+ messages in thread* [tip: locking/core] rcu: Mark lockdep_assert_rcu_helper() __always_inline
2026-02-02 9:55 [PATCH] rcu: mark lockdep_assert_rcu_helper() __always_inline Arnd Bergmann
2026-02-02 9:58 ` Peter Zijlstra
2026-02-02 15:53 ` Paul E. McKenney
@ 2026-02-02 21:04 ` tip-bot2 for Arnd Bergmann
2 siblings, 0 replies; 4+ messages in thread
From: tip-bot2 for Arnd Bergmann @ 2026-02-02 21:04 UTC (permalink / raw)
To: linux-tip-commits
Cc: Arnd Bergmann, Peter Zijlstra (Intel), Paul E. McKenney, x86,
linux-kernel
The following commit has been merged into the locking/core branch of tip:
Commit-ID: 451c3a0356099483218535aed17fcf94ab5764a3
Gitweb: https://git.kernel.org/tip/451c3a0356099483218535aed17fcf94ab5764a3
Author: Arnd Bergmann <arnd@arndb.de>
AuthorDate: Mon, 02 Feb 2026 10:55:01 +01:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Mon, 02 Feb 2026 22:02:49 +01:00
rcu: Mark lockdep_assert_rcu_helper() __always_inline
There are some configurations in which lockdep_assert_rcu_helper() ends up
not being inlined, for some reason. This leads to a link failure because
now the caller tries to pass a nonexistant __ctx_lock_RCU structure:
ld: lib/test_context-analysis.o: in function `test_rcu_assert_variants':
test_context-analysis.c:(.text+0x275c): undefined reference to `RCU'
ld: test_context-analysis.c:(.text+0x276c): undefined reference to `RCU_BH'
ld: test_context-analysis.c:(.text+0x2774): undefined reference to `RCU_SCHED'
I saw this in one out of many 32-bit arm builds using gcc-15.2, but
it probably happens in others as well.
Mark this function as __always_inline to fix the build.
Fixes: fe00f6e84621 ("rcu: Support Clang's context analysis")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
Link: https://patch.msgid.link/20260202095507.1237440-1-arnd@kernel.org
---
include/linux/rcupdate.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index d828a46..f0aa48b 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -435,7 +435,7 @@ static inline void rcu_preempt_sleep_check(void) { }
// See RCU_LOCKDEP_WARN() for an explanation of the double call to
// debug_lockdep_rcu_enabled().
-static inline bool lockdep_assert_rcu_helper(bool c, const struct __ctx_lock_RCU *ctx)
+static __always_inline bool lockdep_assert_rcu_helper(bool c, const struct __ctx_lock_RCU *ctx)
__assumes_shared_ctx_lock(RCU) __assumes_shared_ctx_lock(ctx)
{
return debug_lockdep_rcu_enabled() &&
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-02-02 21:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-02 9:55 [PATCH] rcu: mark lockdep_assert_rcu_helper() __always_inline Arnd Bergmann
2026-02-02 9:58 ` Peter Zijlstra
2026-02-02 15:53 ` Paul E. McKenney
2026-02-02 21:04 ` [tip: locking/core] rcu: Mark " tip-bot2 for Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox