linux-cvs-patches
[Top] [All Lists]

CVS Update@linux-mips.org: linux

To: linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
From: ralf@linux-mips.org
Date: Tue, 22 Feb 2005 21:18:10 +0000
Reply-to: linux-mips@linux-mips.org
Sender: linux-cvs-patches-bounce@linux-mips.org
CVSROOT:        /home/cvs
Module name:    linux
Changes by:     ralf@ftp.linux-mips.org 05/02/22 21:18:04

Modified files:
        arch/mips/kernel: smp.c 

Log message:
        Merge do_boot_cpu() into the new style __cpu_up().

diff -urN linux/arch/mips/kernel/smp.c linux/arch/mips/kernel/smp.c
--- linux/arch/mips/kernel/smp.c        2005/02/10 12:00:06     1.74
+++ linux/arch/mips/kernel/smp.c        2005/02/22 21:18:01     1.75
@@ -266,23 +266,31 @@
 }
 
 /*
- * Startup the CPU with this logical number
+ * Called once for each "cpu_possible(cpu)".  Needs to spin up the cpu
+ * and keep control until "cpu_online(cpu)" is set.  Note: cpu is
+ * physical, not logical.
  */
-static int __init do_boot_cpu(int cpu)
+int __devinit __cpu_up(unsigned int cpu)
 {
        struct task_struct *idle;
 
        /*
+        * Processor goes to start_secondary(), sets online flag
         * The following code is purely to make sure
         * Linux can schedule processes on this slave.
         */
        idle = fork_idle(cpu);
-       if (IS_ERR(idle))
-               panic("failed fork for CPU %d\n", cpu);
+       if (IS_ERR(idle)) {
+               panic(KERN_ERR "Fork failed for CPU %d\n", cpu);
+
+               return PTR_ERR(idle);
+       }
 
        prom_boot_secondary(cpu, idle);
 
-       /* XXXKW timeout */
+       /*
+        * Trust is futile.  We should really have timeouts ...
+        */
        while (!cpu_isset(cpu, cpu_callin_map))
                udelay(100);
 
@@ -290,23 +298,6 @@
 
        return 0;
 }
-
-/*
- * Called once for each "cpu_possible(cpu)".  Needs to spin up the cpu
- * and keep control until "cpu_online(cpu)" is set.  Note: cpu is
- * physical, not logical.
- */
-int __devinit __cpu_up(unsigned int cpu)
-{
-       int ret;
-
-       /* Processor goes to start_secondary(), sets online flag */
-       ret = do_boot_cpu(cpu);
-       if (ret < 0)
-               return ret;
-
-       return 0;
-}
 
 /* Not really SMP stuff ... */
 int setup_profiling_timer(unsigned int multiplier)

<Prev in Thread] Current Thread [Next in Thread>