Re: [PATCH 23/27] cris, smpboot: Use generic SMP booting infrastructure

From
Srivatsa S. Bhat <hidden>
Date
2012-06-03 11:53:59
Also in
lkml
Reply to
Yong Zhang, 2012-06-03
On 06/03/2012 02:11 PM, Yong Zhang wrote:
On Fri, Jun 01, 2012 at 02:45:40PM +0530, Srivatsa S. Bhat wrote:
quoted
Convert cris to use the generic framework to boot secondary CPUs.

Cc: Mikael Starvik <redacted>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Thomas Gleixner <redacted>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Eric Dumazet <redacted>
Cc: Mike Frysinger <redacted>
Cc: <redacted>
Signed-off-by: Srivatsa S. Bhat <redacted>
---

 arch/cris/arch-v32/kernel/smp.c |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/arch/cris/arch-v32/kernel/smp.c b/arch/cris/arch-v32/kernel/smp.c
index ebe2cb3..357114a 100644
--- a/arch/cris/arch-v32/kernel/smp.c
+++ b/arch/cris/arch-v32/kernel/smp.c
@@ -17,6 +17,7 @@
 #include <linux/cpumask.h>
 #include <linux/interrupt.h>
 #include <linux/module.h>
+#include <linux/smpboot.h>
 
 #define IPI_SCHEDULE 1
 #define IPI_CALL 2
@@ -145,8 +146,11 @@ smp_boot_one_cpu(int cpuid, struct task_struct idle)
  * specific stuff such as the local timer and the MMU. */
 void __init smp_callin(void)
 {
-	extern void cpu_idle(void);
+	smpboot_start_secondary(NULL);
+}
 
+void __cpuinit __cpu_pre_starting(void *unused)
+{
 	int cpu = cpu_now_booting;
 	reg_intr_vect_rw_mask vect_mask = {0};
 
@@ -161,16 +165,10 @@ void __init smp_callin(void)
 	/* Setup local timer. */
 	cris_timer_init();
 
-	/* Enable IRQ and idle */
+	/* Enable IRQ */
I don't know cris; is the comments right?
quoted
 	REG_WR(intr_vect, irq_regs[cpu], rw_mask, vect_mask);
 	crisv32_unmask_irq(IPI_INTR_VECT);
 	crisv32_unmask_irq(TIMER0_INTR_VECT);
-	preempt_disable();
-	notify_cpu_starting(cpu);
-	local_irq_enable();
-
-	set_cpu_online(cpu, true);
-	cpu_idle();
Before your patch, the comments seems end here.

Good catch! I will remove that comment then, keeping the code in the
patch untouched.

Regards,
Srivatsa S. Bhat
quoted
 }
 
 /* Stop execution on this CPU.*/
Thread (81 messages) 81 messages, 12 authors, last reply 2012-06-05
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help