]> 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 4924c48cb1ffc64df621b6d2dd6790c2b0683100..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 */
@@ -496,6 +510,10 @@ int check_legacy_ioport(unsigned long base_port)
                        break;
                }
                np = of_find_node_by_type(NULL, "8042");
+               /* Pegasos has no device_type on its 8042 node, look for the
+                * name instead */
+               if (!np)
+                       np = of_find_node_by_name(NULL, "8042");
                break;
        case FDC_BASE: /* FDC1 */
                np = of_find_node_by_type(NULL, "fdc");