]> err.no Git - linux-2.6/blobdiff - arch/powerpc/kernel/setup-common.c
x86: printk kernel version in WARN_ON and other dump_stack users
[linux-2.6] / arch / powerpc / kernel / setup-common.c
index 50ef38cffdbfc3db60df3b3a90827daac12aef47..2de00f870edc34438352ae71ed54c7013228b7fa 100644 (file)
@@ -76,6 +76,8 @@ EXPORT_SYMBOL(machine_id);
 
 unsigned long klimit = (unsigned long) _end;
 
+char cmd_line[COMMAND_LINE_SIZE];
+
 /*
  * This still seems to be needed... -- paulus
  */ 
@@ -411,16 +413,28 @@ void __init smp_setup_cpu_maps(void)
                of_node_put(dn);
        }
 
+       vdso_data->processorCount = num_present_cpus();
+#endif /* CONFIG_PPC64 */
+}
+
+/*
+ * Being that cpu_sibling_map is now a per_cpu array, then it cannot
+ * be initialized until the per_cpu areas have been created.  This
+ * function is now called from setup_per_cpu_areas().
+ */
+void __init smp_setup_cpu_sibling_map(void)
+{
+#if defined(CONFIG_PPC64)
+       int cpu;
+
        /*
         * Do the sibling map; assume only two threads per processor.
         */
        for_each_possible_cpu(cpu) {
-               cpu_set(cpu, cpu_sibling_map[cpu]);
+               cpu_set(cpu, per_cpu(cpu_sibling_map, cpu));
                if (cpu_has_feature(CPU_FTR_SMT))
-                       cpu_set(cpu ^ 0x1, cpu_sibling_map[cpu]);
+                       cpu_set(cpu ^ 0x1, per_cpu(cpu_sibling_map, cpu));
        }
-
-       vdso_data->processorCount = num_present_cpus();
 #endif /* CONFIG_PPC64 */
 }
 #endif /* CONFIG_SMP */