From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Srivatsa S. Bhat" Subject: [PATCH 13/27] hexagon, smpboot: Use generic SMP booting infrastructure Date: Fri, 01 Jun 2012 14:43:10 +0530 Message-ID: <20120601091304.31979.39256.stgit@srivatsabhat.in.ibm.com> References: <20120601090952.31979.24799.stgit@srivatsabhat.in.ibm.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20120601090952.31979.24799.stgit@srivatsabhat.in.ibm.com> Sender: linux-arch-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" To: tglx@linutronix.de, peterz@infradead.org, paulmck@linux.vnet.ibm.com Cc: rusty@rustcorp.com.au, mingo@kernel.org, yong.zhang0@gmail.com, akpm@linux-foundation.org, vatsa@linux.vnet.ibm.com, rjw@sisk.pl, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, srivatsa.bhat@linux.vnet.ibm.com, nikunj@linux.vnet.ibm.com, "Nikunj A. Dadhania" , Richard Kuo , Thomas Gleixner , Rusty Russell , David Howells , Chris Metcalf , linux-hexagon@vger.kernel.org From: Nikunj A. Dadhania Convert hexagon to use the generic framework to boot secondary CPUs. Signed-off-by: Nikunj A. Dadhania Cc: Richard Kuo Cc: Thomas Gleixner Cc: Rusty Russell Cc: David Howells Cc: Chris Metcalf Cc: linux-hexagon@vger.kernel.org Signed-off-by: Srivatsa S. Bhat --- arch/hexagon/kernel/smp.c | 18 ++++++++---------- 1 files changed, 8 insertions(+), 10 deletions(-) diff --git a/arch/hexagon/kernel/smp.c b/arch/hexagon/kernel/smp.c index 149fbef..0a679a4 100644 --- a/arch/hexagon/kernel/smp.c +++ b/arch/hexagon/kernel/smp.c @@ -29,6 +29,7 @@ #include #include #include +#include #include /* timer_interrupt */ #include @@ -148,7 +149,6 @@ void __init smp_prepare_boot_cpu(void) void __cpuinit start_secondary(void) { - unsigned int cpu; unsigned long thread_ptr; /* Calculate thread_info pointer from stack pointer */ @@ -165,6 +165,13 @@ void __cpuinit start_secondary(void) : "r" (thread_ptr) ); + smpboot_start_secondary(NULL); +} + +void __cpuinit __cpu_pre_starting(void *arg) +{ + unsigned int cpu; + /* Set the memory struct */ atomic_inc(&init_mm.mm_count); current->active_mm = &init_mm; @@ -177,17 +184,8 @@ void __cpuinit start_secondary(void) setup_percpu_clockdev(); printk(KERN_INFO "%s cpu %d\n", __func__, current_thread_info()->cpu); - - notify_cpu_starting(cpu); - - set_cpu_online(cpu, true); - - local_irq_enable(); - - cpu_idle(); } - /* * called once for each present cpu * apparently starts up the CPU and then