Merge ../linus
[linux-drm-fsl-dcu.git] / arch / arm / mach-integrator / platsmp.c
index aecf47ba033a753040646ec8779bd48767675261..613b841a10f3b42285326f0559d33920f3b9c4a0 100644 (file)
@@ -15,9 +15,9 @@
 #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>
 #include <asm/ptrace.h>
 #include <asm/smp.h>
 
@@ -80,6 +80,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
         * "cpu" is Linux's internal ID.
         */
        pen_release = cpu;
+       flush_cache_all();
 
        /*
         * XXX
@@ -138,6 +139,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 +187,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