Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
[powerpc.git] / arch / powerpc / kernel / setup_32.c
index 61c65d1..35f8f44 100644 (file)
@@ -65,6 +65,7 @@ int have_of = 1;
 
 #ifdef CONFIG_VGA_CONSOLE
 unsigned long vgacon_remap_base;
+EXPORT_SYMBOL(vgacon_remap_base);
 #endif
 
 /*
@@ -91,7 +92,8 @@ unsigned long __init early_init(unsigned long dt_ptr)
 
        /* First zero the BSS -- use memset_io, some platforms don't have
         * caches on yet */
-       memset_io((void __iomem *)PTRRELOC(&__bss_start), 0, _end - __bss_start);
+       memset_io((void __iomem *)PTRRELOC(&__bss_start), 0,
+                       __bss_stop - __bss_start);
 
        /*
         * Identify the CPU type and fix up code sections
@@ -115,12 +117,8 @@ unsigned long __init early_init(unsigned long dt_ptr)
  */
 void __init machine_init(unsigned long dt_ptr, unsigned long phys)
 {
-       /* If btext is enabled, we might have a BAT setup for early display,
-        * thus we do enable some very basic udbg output
-        */
-#ifdef CONFIG_BOOTX_TEXT
-       udbg_putc = btext_drawchar;
-#endif
+       /* Enable early debugging if any specified (see udbg.h) */
+       udbg_early_init();
 
        /* Do some early initialization based on the flat device tree */
        early_init_devtree(__va(dt_ptr));
@@ -198,18 +196,22 @@ EXPORT_SYMBOL(nvram_sync);
 
 #endif /* CONFIG_NVRAM */
 
-static struct cpu cpu_devices[NR_CPUS];
+static DEFINE_PER_CPU(struct cpu, cpu_devices);
 
 int __init ppc_init(void)
 {
-       int i;
+       int cpu;
 
        /* clear the progress line */
-       if ( ppc_md.progress ) ppc_md.progress("             ", 0xffff);
+       if (ppc_md.progress)
+               ppc_md.progress("             ", 0xffff);
 
        /* register CPU devices */
-       for_each_possible_cpu(i)
-               register_cpu(&cpu_devices[i], i);
+       for_each_possible_cpu(cpu) {
+               struct cpu *c = &per_cpu(cpu_devices, cpu);
+               c->hotpluggable = 1;
+               register_cpu(c, cpu);
+       }
 
        /* call platform init */
        if (ppc_md.init != NULL) {