From abf0ea65e0adede5f40a836e6af7f62e7c850546 Mon Sep 17 00:00:00 2001 From: Kirill Tkhai Date: Thu, 12 Dec 2013 17:41:01 +0400 Subject: [PATCH] xtensa: Enable irqs after cpu is set online there is a small possibility that wake_up of softirq thread happens between local_irq_enable() and set_cpu_online(). In this case affinity of the thread changes to fallback affinity (i.e. CPU0). This may be a source of problems. The patch kills that possibility. Signed-off-by: Kirill Tkhai Signed-off-by: Max Filippov --- arch/xtensa/kernel/smp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/xtensa/kernel/smp.c b/arch/xtensa/kernel/smp.c index 1c7a209795e8..aa8bd8717927 100644 --- a/arch/xtensa/kernel/smp.c +++ b/arch/xtensa/kernel/smp.c @@ -151,9 +151,10 @@ void secondary_start_kernel(void) secondary_init_irq(); local_timer_setup(cpu); + set_cpu_online(cpu, true); + local_irq_enable(); - set_cpu_online(cpu, true); complete(&cpu_running); cpu_startup_entry(CPUHP_ONLINE); -- 2.20.1