linux/kernel/rcu
Paul E. McKenney fdbb9b315c rcu: Make rcu_cpu_starting() use its "cpu" argument
The rcu_cpu_starting() function uses this_cpu_ptr() to locate the
incoming CPU's rcu_data structure.  This works for the boot CPU and for
all CPUs onlined after rcu_init() executes (during very early boot).
Currently, this is the full set of CPUs, so all is well.  But if
anyone ever parallelizes boot before rcu_init() time, it will fail.
This commit therefore substitutes the rcu_cpu_starting() function's
this_cpu_pointer() for per_cpu_ptr(), future-proofing the code and
(arguably) improving readability.

This commit inadvertently fixes a latent bug: If there ever had been
more than just the boot CPU online at rcu_init() time, the old code
would not initialize the non-boot CPUs, but rather would repeatedly
initialize the boot CPU.

Reported-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2017-01-23 11:37:13 -08:00
..
Makefile rcutorture: Add RCU grace-period performance tests 2016-03-31 13:37:38 -07:00
rcu.h rcu: Narrow early boot window of illegal synchronous grace periods 2017-01-14 21:23:48 -08:00
rcuperf.c rcuperf: Consistently insert space between flag and message 2016-08-22 10:06:16 -07:00
rcutorture.c torture: Trace long read-side delays 2016-11-14 10:46:30 -08:00
srcu.c rcu: Add rcu_normal kernel parameter to suppress expediting 2015-12-04 12:26:53 -08:00
sync.c locking, rcu, cgroup: Avoid synchronize_sched() in __cgroup_procs_write() 2016-08-18 15:36:59 +02:00
tiny_plugin.h rcu: Narrow early boot window of illegal synchronous grace periods 2017-01-14 21:23:48 -08:00
tiny.c rcu: Remove unneeded rcu_process_callbacks() declarations 2017-01-23 11:32:29 -08:00
tree_exp.h rcu: Add comment headers to expedited-grace-period counter functions 2017-01-23 11:37:13 -08:00
tree_plugin.h rcu: Narrow early boot window of illegal synchronous grace periods 2017-01-14 21:23:48 -08:00
tree_trace.c rcu: Drive expedited grace periods from workqueue 2016-08-22 09:30:25 -07:00
tree.c rcu: Make rcu_cpu_starting() use its "cpu" argument 2017-01-23 11:37:13 -08:00
tree.h rcu: Make expedited grace periods recheck dyntick idle state 2016-11-14 10:46:31 -08:00
update.c rcu: update: Make RCU_EXPEDITE_BOOT be the default 2017-01-16 16:56:39 -08:00