Skip to content

Commit b68f16d

Browse files
zhouzhouyi-hubchantra
authored andcommittedSep 27, 2022
powerpc: avoid lockdep when we are offline
This is second version of my fix to PPC's "WARNING: suspicious RCU usage", I improved my fix under Paul E. McKenney's guidance: Link: https://lore.kernel.org/lkml/[email protected]/T/ During the cpu offlining, the sub functions of xive_teardown_cpu will call __lock_acquire when CONFIG_LOCKDEP=y. The latter function will travel RCU protected list, so "WARNING: suspicious RCU usage" will be triggered. Avoid lockdep when we are offline. Signed-off-by: Zhouyi Zhou <[email protected]>
1 parent 6445a5a commit b68f16d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎arch/powerpc/platforms/pseries/hotplug-cpu.c

+5
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,15 @@ static void pseries_cpu_offline_self(void)
6464

6565
local_irq_disable();
6666
idle_task_exit();
67+
/* prevent lockdep code from traveling RCU protected list
68+
* when we are offline.
69+
*/
70+
lockdep_off();
6771
if (xive_enabled())
6872
xive_teardown_cpu();
6973
else
7074
xics_teardown_cpu();
75+
lockdep_on();
7176

7277
unregister_slb_shadow(hwcpu);
7378
rtas_stop_self();

0 commit comments

Comments
 (0)