Skip to content

Commit

Permalink
arm64: Only enable local interrupts after the CPU is marked online
Browse files Browse the repository at this point in the history
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 <catalin.marinas@arm.com>
Reported-by: Kirill Tkhai <tkhai@yandex.ru>
  • Loading branch information
Catalin Marinas committed Jul 19, 2013
1 parent ad81f05 commit 53ae3ac
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions arch/arm64/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,6 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
raw_spin_lock(&boot_lock);
raw_spin_unlock(&boot_lock);

/*
* Enable local interrupts.
*/
notify_cpu_starting(cpu);
local_irq_enable();
local_fiq_enable();

/*
* OK, now it's safe to let the boot CPU continue. Wait for
* the CPU migration code to notice that the CPU is online
Expand All @@ -214,6 +207,14 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
set_cpu_online(cpu, true);
complete(&cpu_running);

/*
* Enable GIC and timers.
*/
notify_cpu_starting(cpu);

local_irq_enable();
local_fiq_enable();

/*
* OK, it's off to the idle thread for us
*/
Expand Down

0 comments on commit 53ae3ac

Please sign in to comment.