powerpc: preempt: Don't touch the idle task's preempt_count during hotplug
Guenter Roeck
Tested-byQuoted 14 lines · Valentin Schneider
Powerpc currently resets a CPU's idle task
preempt_countto 0 before said task starts executing the secondary startup routine (and becomes an idle task proper).This conflicts with commit
f1a0a376ca0c("sched/core: Initialize the idle task with preemption disabled")which initializes all of the idle tasks'
preempt_counttoPREEMPT_DISABLEDduringsmp_init(). Note that this was superfluous before said commit, as back then the hotplug machinery would invokeinit_idle()viaidle_thread_get(), which would have already reset the CPU's idle task'spreempt_counttoPREEMPT_ENABLED.
Quoted 6 lines
Get rid of this
preempt_countwrite.Cc Guenter Roeck <[email protected]>Fixes f1a0a376ca0c ("sched/core: Initialize the idle task with preemption disabled")Reported-by Bharata B Rao <[email protected]>Signed-off-by Valentin Schneider <[email protected]>
Tested-by Guenter Roeck <[email protected]>
Quoted 38 lines
--- arch/powerpc/platforms/cell/smp.c | 3 --- arch/powerpc/platforms/pseries/smp.c | 5 +---- 2 files changed, 1 insertion(+), 7 deletions(-)arch/powerpc/platforms/cell/smp.c +0
-3@@ -78,9 +78,6 @@ static inline int smp_startup_cpu(unsigned int lcpu) pcpu =get_hard_smp_processor_id (lcpu); -/* Fixup atomic count: it exited inside IRQ handler. */ -task_thread_info (paca_ptrs[lcpu]->__current)->preempt_count =0 ; -/* * If the RTAS start-cpu token does not exist then presume the * cpu is already spinning. arch/powerpc/platforms/pseries/smp.c +1
-4@@ -105,10 +105,7 @@ static inline int smp_startup_cpu(unsigned int lcpu)return 1 ; } -/* Fixup atomic count: it exited inside IRQ handler. */ -task_thread_info (paca_ptrs[lcpu]->__current)->preempt_count =0 ; - -/* +/* * If the RTAS start-cpu token does not exist then presume the * cpu is already spinning. */ Signature · 1 line
2.25.1