linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / arch / sparc / kernel / setup.c
index 0251cab..3509e43 100644 (file)
@@ -17,8 +17,9 @@
 #include <asm/smp.h>
 #include <linux/user.h>
 #include <linux/a.out.h>
-#include <linux/screen_info.h>
+#include <linux/tty.h>
 #include <linux/delay.h>
+#include <linux/config.h>
 #include <linux/fs.h>
 #include <linux/seq_file.h>
 #include <linux/syscalls.h>
@@ -30,7 +31,6 @@
 #include <linux/console.h>
 #include <linux/spinlock.h>
 #include <linux/root_dev.h>
-#include <linux/cpu.h>
 
 #include <asm/system.h>
 #include <asm/io.h>
@@ -331,7 +331,7 @@ void __init setup_arch(char **cmdline_p)
        if (!root_flags)
                root_mountflags &= ~MS_RDONLY;
        ROOT_DEV = old_decode_dev(root_dev);
-#ifdef CONFIG_BLK_DEV_RAM
+#ifdef CONFIG_BLK_DEV_INITRD
        rd_image_start = ram_flags & RAMDISK_IMAGE_START_MASK;
        rd_prompt = ((ram_flags & RAMDISK_PROMPT_FLAG) != 0);
        rd_doload = ((ram_flags & RAMDISK_LOAD_FLAG) != 0);     
@@ -349,8 +349,6 @@ void __init setup_arch(char **cmdline_p)
        init_task.thread.kregs = &fake_swapper_regs;
 
        paging_init();
-
-       smp_setup_cpu_possible_map();
 }
 
 static int __init set_preferred_console(void)
@@ -391,8 +389,6 @@ console_initcall(set_preferred_console);
 extern char *sparc_cpu_type;
 extern char *sparc_fpu_type;
 
-static int ncpus_probed;
-
 static int show_cpuinfo(struct seq_file *m, void *__unused)
 {
        seq_printf(m,
@@ -415,7 +411,7 @@ static int show_cpuinfo(struct seq_file *m, void *__unused)
                   romvec->pv_printrev >> 16,
                   romvec->pv_printrev & 0xffff,
                   &cputypval,
-                  ncpus_probed,
+                  num_possible_cpus(),
                   num_online_cpus()
 #ifndef CONFIG_SMP
                   , cpu_data(0).udelay_val/(500000/HZ),
@@ -475,30 +471,3 @@ void sun_do_break(void)
 
 int serial_console = -1;
 int stop_a_enabled = 1;
-
-static int __init topology_init(void)
-{
-       int i, ncpus, err;
-
-       /* Count the number of physically present processors in
-        * the machine, even on uniprocessor, so that /proc/cpuinfo
-        * output is consistent with 2.4.x
-        */
-       ncpus = 0;
-       while (!cpu_find_by_instance(ncpus, NULL, NULL))
-               ncpus++;
-       ncpus_probed = ncpus;
-
-       err = 0;
-       for_each_online_cpu(i) {
-               struct cpu *p = kzalloc(sizeof(*p), GFP_KERNEL);
-               if (!p)
-                       err = -ENOMEM;
-               else
-                       register_cpu(p, i);
-       }
-
-       return err;
-}
-
-subsys_initcall(topology_init);