[patch] mmu_context_init needs to run earlier

Nathan Lynch nathanl at austin.ibm.com
Tue Nov 2 13:47:22 EST 2004


Hi-

I am seeing "kernel BUG in mmu_context_init at arch/ppc64/mm/init.c:528"
in latest 2.6 bk kernels.  It looks as if arch_initcall is not early
enough for mmu_context_init -- I inserted printk's in that function and
init_new_context, and indeed, init_new_context is being called before
mmu_context_init.

Not sure this is the best fix, or that this completely eliminates the
races, but I didn't see any other obvious solution.  Boot-tested on a
p630.


Signed-off-by: Nathan Lynch <nathanl at austin.ibm.com>


---


diff -puN arch/ppc64/mm/init.c~ppc64-make-mmu_context_init-core_initcall arch/ppc64/mm/init.c
--- linux-2.6.10-rc1-bk11/arch/ppc64/mm/init.c~ppc64-make-mmu_context_init-core_initcall	2004-11-01 19:51:46.000000000 -0600
+++ linux-2.6.10-rc1-bk11-nathanl/arch/ppc64/mm/init.c	2004-11-01 19:53:24.000000000 -0600
@@ -529,7 +529,7 @@ static int __init mmu_context_init(void)
 
 	return 0;
 }
-arch_initcall(mmu_context_init);
+core_initcall(mmu_context_init);
 
 /*
  * Do very early mm setup.

_





More information about the Linuxppc64-dev mailing list