rcu: Make rcu_cpu_starting() rely on interrupts being disabled
authorPaul E. McKenney <paulmck@kernel.org>
Thu, 27 Apr 2023 17:50:47 +0000 (10:50 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Thu, 11 May 2023 20:42:39 +0000 (13:42 -0700)
commit15d44dfa40305da1648de4bf001e91cc63148725
tree7b205747506c8d2458d36cf4f82e048371bf5a24
parenta24c1aab652ebacf9ea62470a166514174c96fe1
rcu: Make rcu_cpu_starting() rely on interrupts being disabled

Currently, rcu_cpu_starting() is written so that it might be invoked
with interrupts enabled.  However, it is always called when interrupts
are disabled, either by rcu_init(), notify_cpu_starting(), or from a
call point prior to the call to notify_cpu_starting().

But why bother requiring that interrupts be disabled?  The purpose is
to allow the rcu_data structure's ->beenonline flag to be set after all
early processing has completed for the incoming CPU, thus allowing this
flag to be used to determine when workqueues have been set up for the
incoming CPU, while still allowing this flag to be used as a diagnostic
within rcu_core().

This commit therefore makes rcu_cpu_starting() rely on interrupts being
disabled.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/tree.c