aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2013-07-19 15:08:15 +0100
committerMark Brown <broonie@linaro.org>2014-05-14 12:16:21 +0100
commit31cc1d7d724ea7ec31c1d65d3a10e842c0e74b86 (patch)
tree6be4fcc885ab49b6192b6ec2b51d5b4f698247eb
parentec2a2a7f53125cf8e1c9ec40fa433909521647c2 (diff)
downloadlinux-linaro-stable-31cc1d7d724ea7ec31c1d65d3a10e842c0e74b86.tar.gz
arm64: Only enable local interrupts after the CPU is marked online
commit 53ae3acd4390ffeecb3a11dbd5be347b5a3d98f2 upstream. 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> Cc: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit 81ca15a3e04961b54d4a0b395e681bffb6cfbc68) Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r--arch/arm64/kernel/smp.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
index 5d54e3717bf8..9c93e126328c 100644
--- a/arch/arm64/kernel/smp.c
+++ b/arch/arm64/kernel/smp.c
@@ -200,13 +200,6 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
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
* before we continue.
@@ -215,6 +208,14 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
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
*/
cpu_startup_entry(CPUHP_ONLINE);