]> 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 36c90ba2d31269a2fa32d950c1ec812c6e94264b..2de00f870edc34438352ae71ed54c7013228b7fa 100644 (file)
@@ -413,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 */