[PATCH 13/27] hexagon, smpboot: Use generic SMP booting infrastructure

From: Srivatsa S. Bhat
Date: Fri Jun 01 2012 - 06:16:12 EST


From: Nikunj A. Dadhania <nikunj@xxxxxxxxxxxxxxxxxx>

Convert hexagon to use the generic framework to boot secondary CPUs.

Signed-off-by: Nikunj A. Dadhania <nikunj@xxxxxxxxxxxxxxxxxx>
Cc: Richard Kuo <rkuo@xxxxxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
Cc: David Howells <dhowells@xxxxxxxxxx>
Cc: Chris Metcalf <cmetcalf@xxxxxxxxxx>
Cc: linux-hexagon@xxxxxxxxxxxxxxx
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@xxxxxxxxxxxxxxxxxx>
---

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 <linux/smp.h>
#include <linux/spinlock.h>
#include <linux/cpu.h>
+#include <linux/smpboot.h>

#include <asm/time.h> /* timer_interrupt */
#include <asm/hexagon_vm.h>
@@ -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

--
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/