Qian Cai de5d9dae15 s390/smp: move rcu_cpu_starting() earlier
The call to rcu_cpu_starting() in smp_init_secondary() is not early
enough in the CPU-hotplug onlining process, which results in lockdep
splats as follows:

 WARNING: suspicious RCU usage
 -----------------------------
 kernel/locking/lockdep.c:3497 RCU-list traversed in non-reader section!!

 other info that might help us debug this:

 RCU used illegally from offline CPU!
 rcu_scheduler_active = 1, debug_locks = 1
 no locks held by swapper/1/0.

 Call Trace:
 show_stack+0x158/0x1f0
 dump_stack+0x1f2/0x238
 __lock_acquire+0x2640/0x4dd0
 lock_acquire+0x3a8/0xd08
 _raw_spin_lock_irqsave+0xc0/0xf0
 clockevents_register_device+0xa8/0x528
 init_cpu_timer+0x33e/0x468
 smp_init_secondary+0x11a/0x328
 smp_start_secondary+0x82/0x88

This is avoided by moving the call to rcu_cpu_starting up near the
beginning of the smp_init_secondary() function. Note that the
raw_smp_processor_id() is required in order to avoid calling into
lockdep before RCU has declared the CPU to be watched for readers.

Link: https://lore.kernel.org/lkml/160223032121.7002.1269740091547117869.tip-bot2@tip-bot2/
Signed-off-by: Qian Cai <cai@redhat.com>
Acked-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
2020-11-03 15:12:16 +01:00
..
2020-10-22 13:13:57 -07:00
2020-08-11 18:16:43 +02:00
2020-09-17 14:11:03 +02:00
2020-09-30 12:09:54 +02:00
2020-10-16 12:36:38 -07:00
2020-08-26 18:47:21 +02:00
2020-09-14 10:08:07 +02:00
2020-06-29 16:31:46 +02:00
2020-01-30 13:07:55 +01:00
2020-08-17 13:17:14 +02:00
2020-10-16 12:36:38 -07:00
2020-06-29 16:31:46 +02:00
2020-08-26 18:47:21 +02:00