Skip to content

Commit 2c669ef

Browse files
Valentin Schneidermpe
Valentin Schneider
authored andcommitted
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 f1a0a37 ("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: f1a0a37 ("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]
1 parent 1df3af6 commit 2c669ef

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

arch/powerpc/platforms/cell/smp.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,6 @@ static inline int smp_startup_cpu(unsigned int lcpu)
7878

7979
pcpu = get_hard_smp_processor_id(lcpu);
8080

81-
/* Fixup atomic count: it exited inside IRQ handler. */
82-
task_thread_info(paca_ptrs[lcpu]->__current)->preempt_count = 0;
83-
8481
/*
8582
* If the RTAS start-cpu token does not exist then presume the
8683
* cpu is already spinning.

arch/powerpc/platforms/pseries/smp.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,6 @@ static inline int smp_startup_cpu(unsigned int lcpu)
105105
return 1;
106106
}
107107

108-
/* Fixup atomic count: it exited inside IRQ handler. */
109-
task_thread_info(paca_ptrs[lcpu]->__current)->preempt_count = 0;
110-
111108
/*
112109
* If the RTAS start-cpu token does not exist then presume the
113110
* cpu is already spinning.

0 commit comments

Comments
 (0)