lkml.org 
[lkml]   [2012]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 11/27] sh, smpboot: Use generic SMP booting infrastructure
Date
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@linux-sh.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: linux-sh@vger.kernel.org
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
---

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 {


\
 
 \ /
  Last update: 2012-06-01 13:01    [W:1.689 / U:0.900 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site