mm: Move pgtable_cache_init() earlier
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 17 Jun 2009 03:48:39 +0000 (13:48 +1000)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 17 Jun 2009 04:14:42 +0000 (21:14 -0700)
Some architectures need to initialize SLAB caches to be able
to allocate page tables. They do that from pgtable_cache_init()
so the later should be called earlier now, best is before
vmalloc_init().

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
init/main.c

index 7756ddad3c854f9c5342757e1f687621c114f7af..0e7aedeaa05f4f56a6737c078331f675201505a1 100644 (file)
@@ -547,6 +547,7 @@ static void __init mm_init(void)
        page_cgroup_init_flatmem();
        mem_init();
        kmem_cache_init();
+       pgtable_cache_init();
        vmalloc_init();
 }
 
@@ -684,7 +685,6 @@ asmlinkage void __init start_kernel(void)
                late_time_init();
        calibrate_delay();
        pidmap_init();
-       pgtable_cache_init();
        anon_vma_init();
 #ifdef CONFIG_X86
        if (efi_enabled)