vserver 2.0 rc7
[linux-2.6.git] / arch / m32r / kernel / setup.c
index fb03be1..4826cd6 100644 (file)
@@ -7,8 +7,6 @@
  *                            Hitoshi Yamamoto
  */
 
-/* $Id$ */
-
 #include <linux/config.h>
 #include <linux/init.h>
 #include <linux/stddef.h>
@@ -24,6 +22,9 @@
 #include <linux/seq_file.h>
 #include <linux/timex.h>
 #include <linux/tty.h>
+#include <linux/cpu.h>
+#include <linux/nodemask.h>
+
 #include <asm/processor.h>
 #include <asm/pgtable.h>
 #include <asm/io.h>
@@ -52,7 +53,7 @@ struct cpuinfo_m32r boot_cpu_data;
 #ifdef CONFIG_BLK_DEV_RAM
 extern int rd_doload;  /* 1 = load ramdisk, 0 = don't load */
 extern int rd_prompt;  /* 1 = prompt for ramdisk, 0 = don't prompt */
-extern int rd_image_start;  /* starting block # of image */
+extern int rd_image_start;     /* starting block # of image */
 #endif
 
 #if defined(CONFIG_VGA_CONSOLE)
@@ -273,6 +274,21 @@ void __init setup_arch(char **cmdline_p)
        paging_init();
 }
 
+static struct cpu cpu[NR_CPUS];
+
+static int __init topology_init(void)
+{
+       int cpu_id;
+
+       for (cpu_id = 0; cpu_id < NR_CPUS; cpu_id++)
+               if (cpu_possible(cpu_id))
+                       register_cpu(&cpu[cpu_id], cpu_id, NULL);
+
+       return 0;
+}
+
+subsys_initcall(topology_init);
+
 #ifdef CONFIG_PROC_FS
 /*
  *     Get CPU information for use by the procfs.
@@ -285,7 +301,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
 #ifdef CONFIG_SMP
        if (!cpu_online(cpu))
                return 0;
-#endif  /* CONFIG_SMP */
+#endif /* CONFIG_SMP */
 
        seq_printf(m, "processor\t: %ld\n", cpu);
 
@@ -359,7 +375,7 @@ struct seq_operations cpuinfo_op = {
        stop:   c_stop,
        show:   show_cpuinfo,
 };
-#endif  /* CONFIG_PROC_FS */
+#endif /* CONFIG_PROC_FS */
 
 unsigned long cpu_initialized __initdata = 0;
 
@@ -399,7 +415,6 @@ void __init cpu_init (void)
 #endif
 
        /* Set up ICUIMASK */
-       outl(0x00070000, M32R_ICU_IMASK_PORTL);   /* imask=111 */
+       outl(0x00070000, M32R_ICU_IMASK_PORTL);         /* imask=111 */
 }
-#endif  /* defined(CONFIG_CHIP_VDEC2) ... */
-
+#endif /* defined(CONFIG_CHIP_VDEC2) ... */