aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rw-r--r--init/main.c36
1 files changed, 22 insertions, 14 deletions
diff --git a/init/main.c b/init/main.c
index bb7dc57eee36..0ab82a453de5 100644
--- a/init/main.c
+++ b/init/main.c
@@ -574,6 +574,28 @@ asmlinkage void __init start_kernel(void)
574 setup_nr_cpu_ids(); 574 setup_nr_cpu_ids();
575 smp_prepare_boot_cpu(); /* arch-specific boot-cpu hooks */ 575 smp_prepare_boot_cpu(); /* arch-specific boot-cpu hooks */
576 576
577 build_all_zonelists();
578 page_alloc_init();
579
580 printk(KERN_NOTICE "Kernel command line: %s\n", boot_command_line);
581 parse_early_param();
582 parse_args("Booting kernel", static_command_line, __start___param,
583 __stop___param - __start___param,
584 &unknown_bootoption);
585 /*
586 * These use large bootmem allocations and must precede
587 * kmem_cache_init()
588 */
589 pidhash_init();
590 vmalloc_init();
591 vfs_caches_init_early();
592 sort_main_extable();
593 trap_init();
594 /*
595 * Set up kernel memory allocators
596 */
597 mem_init();
598 kmem_cache_init();
577 /* 599 /*
578 * Set up the scheduler prior starting any interrupts (such as the 600 * Set up the scheduler prior starting any interrupts (such as the
579 * timer interrupt). Full topology setup happens at smp_init() 601 * timer interrupt). Full topology setup happens at smp_init()
@@ -585,25 +607,15 @@ asmlinkage void __init start_kernel(void)
585 * fragile until we cpu_idle() for the first time. 607 * fragile until we cpu_idle() for the first time.
586 */ 608 */
587 preempt_disable(); 609 preempt_disable();
588 build_all_zonelists();
589 page_alloc_init();
590 printk(KERN_NOTICE "Kernel command line: %s\n", boot_command_line);
591 parse_early_param();
592 parse_args("Booting kernel", static_command_line, __start___param,
593 __stop___param - __start___param,
594 &unknown_bootoption);
595 if (!irqs_disabled()) { 610 if (!irqs_disabled()) {
596 printk(KERN_WARNING "start_kernel(): bug: interrupts were " 611 printk(KERN_WARNING "start_kernel(): bug: interrupts were "
597 "enabled *very* early, fixing it\n"); 612 "enabled *very* early, fixing it\n");
598 local_irq_disable(); 613 local_irq_disable();
599 } 614 }
600 sort_main_extable();
601 trap_init();
602 rcu_init(); 615 rcu_init();
603 /* init some links before init_ISA_irqs() */ 616 /* init some links before init_ISA_irqs() */
604 early_irq_init(); 617 early_irq_init();
605 init_IRQ(); 618 init_IRQ();
606 pidhash_init();
607 init_timers(); 619 init_timers();
608 hrtimers_init(); 620 hrtimers_init();
609 softirq_init(); 621 softirq_init();
@@ -645,14 +657,10 @@ asmlinkage void __init start_kernel(void)
645 initrd_start = 0; 657 initrd_start = 0;
646 } 658 }
647#endif 659#endif
648 vmalloc_init();
649 vfs_caches_init_early();
650 cpuset_init_early(); 660 cpuset_init_early();
651 page_cgroup_init(); 661 page_cgroup_init();
652 mem_init();
653 enable_debug_pagealloc(); 662 enable_debug_pagealloc();
654 cpu_hotplug_init(); 663 cpu_hotplug_init();
655 kmem_cache_init();
656 kmemtrace_init(); 664 kmemtrace_init();
657 debug_objects_mem_init(); 665 debug_objects_mem_init();
658 idr_init_cache(); 666 idr_init_cache();