Commit 444f478f authored by Pekka Enberg's avatar Pekka Enberg

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: default avatarPekka Enberg <penberg@cs.helsinki.fi>
parent 43ebdac4
...@@ -533,6 +533,16 @@ void __init __weak thread_info_cache_init(void) ...@@ -533,6 +533,16 @@ void __init __weak thread_info_cache_init(void)
{ {
} }
/*
* Set up kernel memory allocators
*/
static void __init mm_init(void)
{
mem_init();
kmem_cache_init();
vmalloc_init();
}
asmlinkage void __init start_kernel(void) asmlinkage void __init start_kernel(void)
{ {
char * command_line; char * command_line;
...@@ -590,12 +600,7 @@ asmlinkage void __init start_kernel(void) ...@@ -590,12 +600,7 @@ asmlinkage void __init start_kernel(void)
vfs_caches_init_early(); vfs_caches_init_early();
sort_main_extable(); sort_main_extable();
trap_init(); trap_init();
/* mm_init();
* Set up kernel memory allocators
*/
mem_init();
kmem_cache_init();
vmalloc_init();
/* /*
* Set up the scheduler prior starting any interrupts (such as the * Set up the scheduler prior starting any interrupts (such as the
* timer interrupt). Full topology setup happens at smp_init() * timer interrupt). Full topology setup happens at smp_init()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment