From: Nikunj A. Dadhania <[email protected]>

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

Notes:
1. Removed call to default_idle() in idle_proc(). The generic framework will
invoke cpu_idle().
2. The generic code will call preempt_disable() and local_irq_enable() which
weren't originally present in idle_proc().

Signed-off-by: Nikunj A. Dadhania <[email protected]>
Cc: Jeff Dike <[email protected]>
Cc: Richard Weinberger <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Rusty Russell <[email protected]>
Cc: Chris Metcalf <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Srivatsa S. Bhat <[email protected]>
---

 arch/um/kernel/smp.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/arch/um/kernel/smp.c b/arch/um/kernel/smp.c
index a02b7e9..6cffcf4 100644
--- a/arch/um/kernel/smp.c
+++ b/arch/um/kernel/smp.c
@@ -10,6 +10,7 @@
 #ifdef CONFIG_SMP
 
 #include "linux/sched.h"
+#include "linux/smpboot.h"
 #include "linux/module.h"
 #include "linux/threads.h"
 #include "linux/interrupt.h"
@@ -58,6 +59,12 @@ static cpumask_t cpu_callin_map = CPU_MASK_NONE;
 
 static int idle_proc(void *cpup)
 {
+       smpboot_start_secondary(cpup);
+       return 0;
+}
+
+void __cpuinit __cpu_pre_starting(void *unused)
+{
        int cpu = (int) cpup, err;
 
        err = os_pipe(cpu_data[cpu].ipi_pipe, 1, 1);
@@ -74,11 +81,6 @@ static int idle_proc(void *cpup)
 
        while (!cpu_isset(cpu, smp_commenced_mask))
                cpu_relax();
-
-       notify_cpu_starting(cpu);
-       set_cpu_online(cpu, true);
-       default_idle();
-       return 0;
 }
 
 static struct task_struct *idle_thread(int cpu)


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reply via email to