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

From: Srivatsa S. Bhat
Date: Fri Jun 01 2012 - 05:15:45 EST


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 <lethal@xxxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
Cc: Mike Frysinger <vapier@xxxxxxxxxx>
Cc: linux-sh@xxxxxxxxxxxxxxx
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@xxxxxxxxxxxxxxxxxx>
---

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 {

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/