Skip to content

Commit 53ae3ac

Browse files
committed
arm64: Only enable local interrupts after the CPU is marked online
There is a slight chance that (timer) interrupts are triggered before a secondary CPU has been marked online with implications on softirq thread affinity. Signed-off-by: Catalin Marinas <[email protected]> Reported-by: Kirill Tkhai <[email protected]>
1 parent ad81f05 commit 53ae3ac

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

arch/arm64/kernel/smp.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,6 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
199199
raw_spin_lock(&boot_lock);
200200
raw_spin_unlock(&boot_lock);
201201

202-
/*
203-
* Enable local interrupts.
204-
*/
205-
notify_cpu_starting(cpu);
206-
local_irq_enable();
207-
local_fiq_enable();
208-
209202
/*
210203
* OK, now it's safe to let the boot CPU continue. Wait for
211204
* the CPU migration code to notice that the CPU is online
@@ -214,6 +207,14 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
214207
set_cpu_online(cpu, true);
215208
complete(&cpu_running);
216209

210+
/*
211+
* Enable GIC and timers.
212+
*/
213+
notify_cpu_starting(cpu);
214+
215+
local_irq_enable();
216+
local_fiq_enable();
217+
217218
/*
218219
* OK, it's off to the idle thread for us
219220
*/

0 commit comments

Comments
 (0)