[PATCH 11/27] sh, smpboot: Use generic SMP booting infrastructure

From
Srivatsa S. Bhat <hidden>
Date
2012-06-01 09:15:52
Also in
linux-sh, lkml
Reply to
Srivatsa S. Bhat, 2012-06-01
Convert sh to use the generic framework to boot secondary CPUs.

Notes:
Postpone enabling local interrupts to after completing bringup of
secondary CPU.

Cc: Paul Mundt <redacted>
Cc: Thomas Gleixner <redacted>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Rusty Russell <redacted>
Cc: Mike Frysinger <redacted>
Cc: <redacted>
Signed-off-by: Srivatsa S. Bhat <redacted>
---

 arch/sh/kernel/smp.c |   19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/arch/sh/kernel/smp.c b/arch/sh/kernel/smp.c
index 8e0fde0..d7f7faf 100644
--- a/arch/sh/kernel/smp.c
+++ b/arch/sh/kernel/smp.c
@@ -179,6 +179,11 @@ void native_play_dead(void)
 
 asmlinkage void __cpuinit start_secondary(void)
 {
+	smpboot_start_secondary(NULL);
+}
+
+void __cpuinit __cpu_pre_starting(void *unused)
+{
 	unsigned int cpu = smp_processor_id();
 	struct mm_struct *mm = &init_mm;
 
@@ -190,23 +195,17 @@ asmlinkage void __cpuinit start_secondary(void)
 	local_flush_tlb_all();
 
 	per_cpu_trap_init();
+}
 
-	preempt_disable();
-
-	notify_cpu_starting(cpu);
-
-	local_irq_enable();
+void __cpuinit __cpu_pre_online(void *unused)
+{
+	unsigned int cpu = smp_processor_id();
 
 	/* Enable local timers */
 	local_timer_setup(cpu);
 	calibrate_delay();
 
 	smp_store_cpu_info(cpu);
-
-	set_cpu_online(cpu, true);
-	per_cpu(cpu_state, cpu) = CPU_ONLINE;
-
-	cpu_idle();
 }
 
 extern struct {
Thread (81 messages) 81 messages, 12 authors, last reply 2012-06-05
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help