aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2013-06-28 08:56:02 -0400
committerJames Hogan <james.hogan@imgtec.com>2013-07-02 06:03:51 -0400
commit234c7f1ac109ad1af4ae410463d03ccebf3d6657 (patch)
tree445494b2ed23a56964859e048d4eed0933dc8060
parent42748752f6ada54faa4f39fa471dabce62eaa79a (diff)
metag: smp: enable irqs after set_cpu_online
In secondary_start_kernel() interrupts should be enabled with local_irq_enable() after the cpu is marked as online with set_cpu_online(). Otherwise it's possible for a timer interrupt to trigger a softirq, which if the cpu is marked as offline may have it's affinity altered. Reported-by: Kirill Tkhai <tkhai@yandex.ru> Signed-off-by: James Hogan <james.hogan@imgtec.com> Acked-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com> Cc: Kirill Tkhai <tkhai@yandex.ru>
-rw-r--r--arch/metag/kernel/smp.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/metag/kernel/smp.c b/arch/metag/kernel/smp.c
index b81351538c48..09979f203a4d 100644
--- a/arch/metag/kernel/smp.c
+++ b/arch/metag/kernel/smp.c
@@ -379,12 +379,7 @@ asmlinkage void secondary_start_kernel(void)
379 379
380 setup_priv(); 380 setup_priv();
381 381
382 /*
383 * Enable local interrupts.
384 */
385 tbi_startup_interrupt(TBID_SIGNUM_TRT);
386 notify_cpu_starting(cpu); 382 notify_cpu_starting(cpu);
387 local_irq_enable();
388 383
389 pr_info("CPU%u (thread %u): Booted secondary processor\n", 384 pr_info("CPU%u (thread %u): Booted secondary processor\n",
390 cpu, cpu_2_hwthread_id[cpu]); 385 cpu, cpu_2_hwthread_id[cpu]);
@@ -398,6 +393,12 @@ asmlinkage void secondary_start_kernel(void)
398 set_cpu_online(cpu, true); 393 set_cpu_online(cpu, true);
399 394
400 /* 395 /*
396 * Enable local interrupts.
397 */
398 tbi_startup_interrupt(TBID_SIGNUM_TRT);
399 local_irq_enable();
400
401 /*
401 * OK, it's off to the idle thread for us 402 * OK, it's off to the idle thread for us
402 */ 403 */
403 cpu_startup_entry(CPUHP_ONLINE); 404 cpu_startup_entry(CPUHP_ONLINE);