arm64: Only enable local interrupts after the CPU is marked online
authorCatalin Marinas <catalin.marinas@arm.com>
Fri, 19 Jul 2013 14:08:15 +0000 (15:08 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 19 Jul 2013 14:49:42 +0000 (15:49 +0100)
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>
arch/arm64/kernel/smp.c

index 5d54e37..9c93e12 100644 (file)
@@ -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);