]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/kernel/setup_32.c
powerpc/mm: Rework usage of _PAGE_COHERENT/NO_CACHE/GUARDED
[linux-2.6-omap-h63xx.git] / arch / powerpc / kernel / setup_32.c
index 066e65c59b58230091db2145e1e4115abe541b84..d72ef39f2b37d3d3a66fc4f36f270fa448160c5a 100644 (file)
@@ -38,6 +38,7 @@
 #include <asm/time.h>
 #include <asm/serial.h>
 #include <asm/udbg.h>
+#include <asm/mmu_context.h>
 
 #include "setup.h"
 
@@ -49,12 +50,12 @@ int boot_cpuid;
 EXPORT_SYMBOL_GPL(boot_cpuid);
 int boot_cpuid_phys;
 
+int smp_hw_index[NR_CPUS];
+
 unsigned long ISA_DMA_THRESHOLD;
 unsigned int DMA_MODE_READ;
 unsigned int DMA_MODE_WRITE;
 
-int have_of = 1;
-
 #ifdef CONFIG_VGA_CONSOLE
 unsigned long vgacon_remap_base;
 EXPORT_SYMBOL(vgacon_remap_base);
@@ -97,6 +98,10 @@ notrace unsigned long __init early_init(unsigned long dt_ptr)
                          PTRRELOC(&__start___ftr_fixup),
                          PTRRELOC(&__stop___ftr_fixup));
 
+       do_feature_fixups(spec->mmu_features,
+                         PTRRELOC(&__start___mmu_ftr_fixup),
+                         PTRRELOC(&__stop___mmu_ftr_fixup));
+
        do_lwsync_fixups(spec->cpu_features,
                         PTRRELOC(&__start___lwsync_fixup),
                         PTRRELOC(&__stop___lwsync_fixup));
@@ -111,7 +116,7 @@ notrace unsigned long __init early_init(unsigned long dt_ptr)
  * This is called very early on the boot process, after a minimal
  * MMU environment has been set up but before MMU_init is called.
  */
-notrace void __init machine_init(unsigned long dt_ptr, unsigned long phys)
+notrace void __init machine_init(unsigned long dt_ptr)
 {
        /* Enable early debugging if any specified (see udbg.h) */
        udbg_early_init();
@@ -209,23 +214,12 @@ EXPORT_SYMBOL(nvram_sync);
 
 #endif /* CONFIG_NVRAM */
 
-static DEFINE_PER_CPU(struct cpu, cpu_devices);
-
 int __init ppc_init(void)
 {
-       int cpu;
-
        /* clear the progress line */
        if (ppc_md.progress)
                ppc_md.progress("             ", 0xffff);
 
-       /* register CPU devices */
-       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) {
                ppc_md.init();
@@ -337,4 +331,8 @@ void __init setup_arch(char **cmdline_p)
        if ( ppc_md.progress ) ppc_md.progress("arch: exit", 0x3eab);
 
        paging_init();
+
+       /* Initialize the MMU context management stuff */
+       mmu_context_init();
+
 }