mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 06:14:39 +01:00
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 commitf1a0a376ca("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:f1a0a376ca("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]> Tested-by: Bharata B Rao <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
This commit is contained in:
1 parent
1df3af6dc3
commit
2c669ef697
2 files changed
-6
No files matched your search
@@ -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.
|
||||
|
||||
@@ -105,9 +105,6 @@ 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.
|
||||
|
||||
Reference in new issue
Block a user