Skip to content
Commit 2c669ef6 authored by Valentin Schneider's avatar Valentin Schneider Committed by Michael Ellerman
Browse files

powerpc/preempt: Don't touch the idle task's preempt_count during hotplug

Powerpc currently resets a CPU's idle task preempt_count to 0 before
said task starts executing the secondary startup routine (and becomes an
idle task proper).

This conflicts with commit f1a0a376 ("sched/core: Initialize the
idle task with preemption disabled").

which initializes all of the idle tasks' preempt_count to
PREEMPT_DISABLED during smp_init(). Note that this was superfluous
before said commit, as back then the hotplug machinery would invoke
init_idle() via idle_thread_get(), which would have already reset the
CPU's idle task's preempt_count to PREEMPT_ENABLED.

Get rid of this preempt_count write.

Fixes: f1a0a376

 ("sched/core: Initialize the idle task with preemption disabled")
Reported-by: default avatarBharata B Rao <bharata@linux.ibm.com>
Signed-off-by: default avatarValentin Schneider <valentin.schneider@arm.com>
Tested-by: default avatarGuenter Roeck <linux@roeck-us.net>
Tested-by: default avatarBharata B Rao <bharata@linux.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210707183831.2106509-1-valentin.schneider@arm.com
parent 1df3af6d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment