aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPekka Enberg <penberg@cs.helsinki.fi>2009-06-11 11:29:06 -0400
committerPekka Enberg <penberg@cs.helsinki.fi>2009-06-11 12:27:03 -0400
commit444f478f65c7ca4606f9965b31feed13fe2bc9fa (patch)
tree3f59865a5cbf927bfa6489ea6d024994aceb2b29
parent43ebdac42f16037263b52a5aeedcd1bfa4a9bb29 (diff)
init: introduce mm_init()
As suggested by Christoph Lameter, introduce mm_init() now that we initialize all the kernel memory allocations together. Cc: Christoph Lameter <cl@linux-foundation.org> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
-rw-r--r--init/main.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/init/main.c b/init/main.c
index 6d38f9607d14..7917695bf71e 100644
--- a/init/main.c
+++ b/init/main.c
@@ -533,6 +533,16 @@ void __init __weak thread_info_cache_init(void)
533{ 533{
534} 534}
535 535
536/*
537 * Set up kernel memory allocators
538 */
539static void __init mm_init(void)
540{
541 mem_init();
542 kmem_cache_init();
543 vmalloc_init();
544}
545
536asmlinkage void __init start_kernel(void) 546asmlinkage void __init start_kernel(void)
537{ 547{
538 char * command_line; 548 char * command_line;
@@ -590,12 +600,7 @@ asmlinkage void __init start_kernel(void)
590 vfs_caches_init_early(); 600 vfs_caches_init_early();
591 sort_main_extable(); 601 sort_main_extable();
592 trap_init(); 602 trap_init();
593 /* 603 mm_init();
594 * Set up kernel memory allocators
595 */
596 mem_init();
597 kmem_cache_init();
598 vmalloc_init();
599 /* 604 /*
600 * Set up the scheduler prior starting any interrupts (such as the 605 * Set up the scheduler prior starting any interrupts (such as the
601 * timer interrupt). Full topology setup happens at smp_init() 606 * timer interrupt). Full topology setup happens at smp_init()