Patchwork sparc64: smp_callin: Enable irqs after preemption is disabled

login
register
mail settings
Submitter Kirill Tkhai
Date Dec. 12, 2013, 2:09 p.m.
Message ID <62771386857390@web21m.yandex.ru>
Download mbox | patch
Permalink /patch/300667/
State Accepted
Delegated to: David Miller
Headers show

Comments

Kirill Tkhai - Dec. 12, 2013, 2:09 p.m.
Most of other architectures have below suggested order.
So lets do the same to fit generic idle loop scheme better.

Signed-off-by: Kirill Tkhai <tkhai@yandex.ru>
---
 arch/sparc/kernel/smp_64.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Jan. 5, 2014, 2:06 a.m.
From: Kirill Tkhai <tkhai@yandex.ru>
Date: Thu, 12 Dec 2013 18:09:50 +0400

> Most of other architectures have below suggested order.
> So lets do the same to fit generic idle loop scheme better.
> 
> Signed-off-by: Kirill Tkhai <tkhai@yandex.ru>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c
index b66a533..b085311 100644
--- a/arch/sparc/kernel/smp_64.c
+++ b/arch/sparc/kernel/smp_64.c
@@ -123,11 +123,12 @@  void smp_callin(void)
 		rmb();
 
 	set_cpu_online(cpuid, true);
-	local_irq_enable();
 
 	/* idle thread is expected to have preempt disabled */
 	preempt_disable();
 
+	local_irq_enable();
+
 	cpu_startup_entry(CPUHP_ONLINE);
 }