fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / arch / powerpc / kernel / setup_32.c
index 69ac257..61c65d1 100644 (file)
@@ -2,7 +2,6 @@
  * Common prep/pmac/chrp boot and setup code.
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/string.h>
 #include <linux/sched.h>
@@ -52,7 +51,6 @@
 
 extern void bootx_init(unsigned long r4, unsigned long phys);
 
-boot_infos_t *boot_infos;
 struct ide_machdep_calls ppc_ide_md;
 
 int boot_cpuid;
@@ -65,14 +63,6 @@ unsigned int DMA_MODE_WRITE;
 
 int have_of = 1;
 
-#ifdef CONFIG_PPC_MULTIPLATFORM
-dev_t boot_dev;
-#endif /* CONFIG_PPC_MULTIPLATFORM */
-
-#ifdef CONFIG_MAGIC_SYSRQ
-unsigned long SYSRQ_KEY = 0x54;
-#endif /* CONFIG_MAGIC_SYSRQ */
-
 #ifdef CONFIG_VGA_CONSOLE
 unsigned long vgacon_remap_base;
 #endif
@@ -97,6 +87,7 @@ int ucache_bsize;
 unsigned long __init early_init(unsigned long dt_ptr)
 {
        unsigned long offset = reloc_offset();
+       struct cpu_spec *spec;
 
        /* First zero the BSS -- use memset_io, some platforms don't have
         * caches on yet */
@@ -106,8 +97,11 @@ unsigned long __init early_init(unsigned long dt_ptr)
         * Identify the CPU type and fix up code sections
         * that depend on which cpu we have.
         */
-       identify_cpu(offset, 0);
-       do_cpu_ftr_fixups(offset);
+       spec = identify_cpu(offset, mfspr(SPRN_PVR));
+
+       do_feature_fixups(spec->cpu_features,
+                         PTRRELOC(&__start___ftr_fixup),
+                         PTRRELOC(&__stop___ftr_fixup));
 
        return KERNELBASE + offset;
 }
@@ -131,12 +125,6 @@ void __init machine_init(unsigned long dt_ptr, unsigned long phys)
        /* Do some early initialization based on the flat device tree */
        early_init_devtree(__va(dt_ptr));
 
-       /* Check default command line */
-#ifdef CONFIG_CMDLINE
-       if (cmd_line[0] == 0)
-               strlcpy(cmd_line, CONFIG_CMDLINE, sizeof(cmd_line));
-#endif /* CONFIG_CMDLINE */
-
        probe_machine();
 
 #ifdef CONFIG_6xx
@@ -221,7 +209,7 @@ int __init ppc_init(void)
 
        /* register CPU devices */
        for_each_possible_cpu(i)
-               register_cpu(&cpu_devices[i], i, NULL);
+               register_cpu(&cpu_devices[i], i);
 
        /* call platform init */
        if (ppc_md.init != NULL) {
@@ -235,7 +223,7 @@ arch_initcall(ppc_init);
 /* Warning, IO base is not yet inited */
 void __init setup_arch(char **cmdline_p)
 {
-       extern void do_init_bootmem(void);
+       *cmdline_p = cmd_line;
 
        /* so udelay does something sensible, assume <= 1000 bogomips */
        loops_per_jiffy = 500000000 / HZ;
@@ -247,16 +235,14 @@ void __init setup_arch(char **cmdline_p)
                ppc_md.init_early();
 
        find_legacy_serial_ports();
-       finish_device_tree();
 
        smp_setup_cpu_maps();
 
-#ifdef CONFIG_XMON_DEFAULT
-       xmon_init(1);
-#endif
        /* Register early console */
        register_early_udbg_console();
 
+       xmon_setup();
+
 #if defined(CONFIG_KGDB)
        if (ppc_md.kgdb_map_scc)
                ppc_md.kgdb_map_scc();
@@ -285,17 +271,14 @@ void __init setup_arch(char **cmdline_p)
        /* reboot on panic */
        panic_timeout = 180;
 
+       if (ppc_md.panic)
+               setup_panic();
+
        init_mm.start_code = PAGE_OFFSET;
        init_mm.end_code = (unsigned long) _etext;
        init_mm.end_data = (unsigned long) _edata;
        init_mm.brk = klimit;
 
-       /* Save unparsed command line copy for /proc/cmdline */
-       strlcpy(saved_command_line, cmd_line, COMMAND_LINE_SIZE);
-       *cmdline_p = cmd_line;
-
-       parse_early_param();
-
        /* set up the bootmem stuff with available memory */
        do_init_bootmem();
        if ( ppc_md.progress ) ppc_md.progress("setup_arch: bootmem", 0x3eab);