浏览代码

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 <tkhai@yandex.ru>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Kirill Tkhai 11 年之前
父节点
当前提交
abf0ea65e0
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      arch/xtensa/kernel/smp.c

+ 2 - 1
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);