powerpc/mm: Call mmu_context_init() from ppc64
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 23 Jul 2009 23:15:26 +0000 (23:15 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 20 Aug 2009 00:12:42 +0000 (10:12 +1000)
Our 64-bit hash context handling has no init function, but 64-bit Book3E
will use the common mmu_context_nohash.c code which does, so define an
empty inline mmu_context_init() for 64-bit server and call it from
our 64-bit setup_arch()

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/include/asm/mmu_context.h
arch/powerpc/kernel/setup_64.c

index b7063669f972b04238c16c945c34987a67e81524..8dffed317013e7c20b83e7d4f18661997860b2b9 100644 (file)
@@ -14,7 +14,6 @@
 /*
  * Most if the context management is out of line
  */
-extern void mmu_context_init(void);
 extern int init_new_context(struct task_struct *tsk, struct mm_struct *mm);
 extern void destroy_context(struct mm_struct *mm);
 
@@ -23,6 +22,12 @@ extern void switch_stab(struct task_struct *tsk, struct mm_struct *mm);
 extern void switch_slb(struct task_struct *tsk, struct mm_struct *mm);
 extern void set_context(unsigned long id, pgd_t *pgd);
 
+#ifdef CONFIG_PPC_BOOK3S_64
+static inline void mmu_context_init(void) { }
+#else
+extern void mmu_context_init(void);
+#endif
+
 /*
  * switch_mm is the entry point called from the architecture independent
  * code in kernel/sched.c
index 91b89b8d63d800c12b4467e95f5047d38a775fc7..325dc5b2e62649eb616cca0919217e7072cffb84 100644 (file)
@@ -534,6 +534,10 @@ void __init setup_arch(char **cmdline_p)
 #endif
 
        paging_init();
+
+       /* Initialize the MMU context management stuff */
+       mmu_context_init();
+
        ppc64_boot_msg(0x15, "Setup Done");
 }