]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-integrator/platsmp.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bcollins/linux1394-2.6
[linux-2.6-omap-h63xx.git] / arch / arm / mach-integrator / platsmp.c
index 2ba0257770982497fa2821952a14bb395fb0ffbc..1bc8534ef0c696d5fca65a19dbe10b47be3f7d66 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/mm.h>
 
 #include <asm/atomic.h>
+#include <asm/cacheflush.h>
 #include <asm/delay.h>
 #include <asm/mmu_context.h>
 #include <asm/procinfo.h>
@@ -27,12 +28,12 @@ extern void integrator_secondary_startup(void);
  * control for which core is the next to come out of the secondary
  * boot "holding pen"
  */
-volatile int __initdata pen_release = -1;
-unsigned long __initdata phys_pen_release = 0;
+volatile int __cpuinitdata pen_release = -1;
+unsigned long __cpuinitdata phys_pen_release = 0;
 
 static DEFINE_SPINLOCK(boot_lock);
 
-void __init platform_secondary_init(unsigned int cpu)
+void __cpuinit platform_secondary_init(unsigned int cpu)
 {
        /*
         * the primary core may have used a "cross call" soft interrupt
@@ -61,7 +62,7 @@ void __init platform_secondary_init(unsigned int cpu)
        spin_unlock(&boot_lock);
 }
 
-int __init boot_secondary(unsigned int cpu, struct task_struct *idle)
+int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
 {
        unsigned long timeout;
 
@@ -80,6 +81,7 @@ int __init boot_secondary(unsigned int cpu, struct task_struct *idle)
         * "cpu" is Linux's internal ID.
         */
        pen_release = cpu;
+       flush_cache_all();
 
        /*
         * XXX
@@ -138,6 +140,18 @@ static void __init poke_milo(void)
        mb();
 }
 
+/*
+ * Initialise the CPU possible map early - this describes the CPUs
+ * which may be present or become present in the system.
+ */
+void __init smp_init_cpus(void)
+{
+       unsigned int i, ncores = get_core_count();
+
+       for (i = 0; i < ncores; i++)
+               cpu_set(i, cpu_possible_map);
+}
+
 void __init smp_prepare_cpus(unsigned int max_cpus)
 {
        unsigned int ncores = get_core_count();
@@ -174,14 +188,11 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
                max_cpus = ncores;
 
        /*
-        * Initialise the possible/present maps.
-        * cpu_possible_map describes the set of CPUs which may be present
-        * cpu_present_map describes the set of CPUs populated
+        * Initialise the present map, which describes the set of CPUs
+        * actually populated at the present time.
         */
-       for (i = 0; i < max_cpus; i++) {
-               cpu_set(i, cpu_possible_map);
+       for (i = 0; i < max_cpus; i++)
                cpu_set(i, cpu_present_map);
-       }
 
        /*
         * Do we need any more CPUs? If so, then let them know where