Skip to content

Commit 7663ad9

Browse files
Peter Zijlstrapaulmckrcu
authored andcommitted
rcu: Always inline rcu_dynticks_task*_{enter,exit}()
RCU managed to grow a few noinstr violations: vmlinux.o: warning: objtool: rcu_dynticks_eqs_enter()+0x0: call to rcu_dynticks_task_trace_enter() leaves .noinstr.text section vmlinux.o: warning: objtool: rcu_dynticks_eqs_exit()+0xe: call to rcu_dynticks_task_trace_exit() leaves .noinstr.text section Fix them by adding __always_inline to the relevant trivial functions. Also replace the noinstr with __always_inline for the existing rcu_dynticks_task_*() functions since noinstr would force noinline them, even when empty, which seems silly. Fixes: 7d0c9c5 ("rcu-tasks: Avoid IPIing userspace/idle tasks if kernel is so built") Reported-by: Stephen Rothwell <[email protected]> Reviewed-by: Thomas Gleixner <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
1 parent 925da92 commit 7663ad9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

kernel/rcu/tree_plugin.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1479,23 +1479,23 @@ static void rcu_bind_gp_kthread(void)
14791479
}
14801480

14811481
/* Record the current task on dyntick-idle entry. */
1482-
static void noinstr rcu_dynticks_task_enter(void)
1482+
static __always_inline void rcu_dynticks_task_enter(void)
14831483
{
14841484
#if defined(CONFIG_TASKS_RCU) && defined(CONFIG_NO_HZ_FULL)
14851485
WRITE_ONCE(current->rcu_tasks_idle_cpu, smp_processor_id());
14861486
#endif /* #if defined(CONFIG_TASKS_RCU) && defined(CONFIG_NO_HZ_FULL) */
14871487
}
14881488

14891489
/* Record no current task on dyntick-idle exit. */
1490-
static void noinstr rcu_dynticks_task_exit(void)
1490+
static __always_inline void rcu_dynticks_task_exit(void)
14911491
{
14921492
#if defined(CONFIG_TASKS_RCU) && defined(CONFIG_NO_HZ_FULL)
14931493
WRITE_ONCE(current->rcu_tasks_idle_cpu, -1);
14941494
#endif /* #if defined(CONFIG_TASKS_RCU) && defined(CONFIG_NO_HZ_FULL) */
14951495
}
14961496

14971497
/* Turn on heavyweight RCU tasks trace readers on idle/user entry. */
1498-
static void rcu_dynticks_task_trace_enter(void)
1498+
static __always_inline void rcu_dynticks_task_trace_enter(void)
14991499
{
15001500
#ifdef CONFIG_TASKS_TRACE_RCU
15011501
if (IS_ENABLED(CONFIG_TASKS_TRACE_RCU_READ_MB))
@@ -1504,7 +1504,7 @@ static void rcu_dynticks_task_trace_enter(void)
15041504
}
15051505

15061506
/* Turn off heavyweight RCU tasks trace readers on idle/user exit. */
1507-
static void rcu_dynticks_task_trace_exit(void)
1507+
static __always_inline void rcu_dynticks_task_trace_exit(void)
15081508
{
15091509
#ifdef CONFIG_TASKS_TRACE_RCU
15101510
if (IS_ENABLED(CONFIG_TASKS_TRACE_RCU_READ_MB))

0 commit comments

Comments
 (0)