Merge branch 'akpm'
[safe/jmp/linux-2.6] / init / main.c
index e3c335e..7756dda 100644 (file)
@@ -540,6 +540,11 @@ void __init __weak thread_info_cache_init(void)
  */
 static void __init mm_init(void)
 {
+       /*
+        * page_cgroup requires countinous pages as memmap
+        * and it's bigger than MAX_ORDER unless SPARSEMEM.
+        */
+       page_cgroup_init_flatmem();
        mem_init();
        kmem_cache_init();
        vmalloc_init();
@@ -636,6 +641,7 @@ asmlinkage void __init start_kernel(void)
                                 "enabled early\n");
        early_boot_irqs_on();
        local_irq_enable();
+       kmem_cache_init_late();
 
        /*
         * HACK ALERT! This is early. We're enabling the console before
@@ -665,7 +671,6 @@ asmlinkage void __init start_kernel(void)
                initrd_start = 0;
        }
 #endif
-       cpuset_init_early();
        page_cgroup_init();
        enable_debug_pagealloc();
        cpu_hotplug_init();
@@ -862,6 +867,11 @@ static noinline int init_post(void)
 static int __init kernel_init(void * unused)
 {
        lock_kernel();
+
+       /*
+        * init can allocate pages on any node
+        */
+       set_mems_allowed(node_possible_map);
        /*
         * init can run on any cpu.
         */