Pull sbs into release branch
[pandora-kernel.git] / arch / powerpc / kernel / setup_32.c
index 44a6a3c..7ec6ba5 100644 (file)
@@ -92,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
@@ -195,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) {
@@ -257,13 +262,11 @@ void __init setup_arch(char **cmdline_p)
         * Systems with OF can look in the properties on the cpu node(s)
         * for a possibly more accurate value.
         */
-       if (cpu_has_feature(CPU_FTR_SPLIT_ID_CACHE)) {
-               dcache_bsize = cur_cpu_spec->dcache_bsize;
-               icache_bsize = cur_cpu_spec->icache_bsize;
-               ucache_bsize = 0;
-       } else
-               ucache_bsize = dcache_bsize = icache_bsize
-                       = cur_cpu_spec->dcache_bsize;
+       dcache_bsize = cur_cpu_spec->dcache_bsize;
+       icache_bsize = cur_cpu_spec->icache_bsize;
+       ucache_bsize = 0;
+       if (cpu_has_feature(CPU_FTR_UNIFIED_ID_CACHE))
+               ucache_bsize = icache_bsize = dcache_bsize;
 
        /* reboot on panic */
        panic_timeout = 180;