asmlinkage void __init start_kernel(void)
{
char * command_line;
extern const struct kernel_param __start___param[], __stop___param[];
smp_setup_processor_id(); /*空*/
lockdep_init(); /*空*/
debug_objects_early_init(); /*空*/
boot_init_stack_canary(); /*空*/
cgroup_init_early(); /*空*/
local_irq_disable();
early_boot_irqs_disabled = true;
tick_init(); /*
调用 clockevents_register_notifier 函数向 clockevents_chain 通知链注册元素: tick_notifier。见
http://blog.chinaunix.net/uid-29254195-id-3978737.html*/
boot_cpu_init();
page_address_init(); /*空*/
printk(KERN_NOTICE "%s", linux_banner);
setup_arch(&command_line);
mm_init_owner(&init_mm, &init_task);
mm_init_cpumask(&init_mm);
setup_command_line(command_line);
setup_nr_cpu_ids();
setup_per_cpu_areas();
smp_prepare_boot_cpu(); /*空*/
build_all_zonelists(NULL);
page_alloc_init();
printk(KERN_NOTICE "Kernel command line: %s\n", boot_command_line);
parse_early_param();
parse_args("Booting kernel", static_command_line, __start___param, __stop___param - __start___param, &unknown_bootoption);
setup_log_buf(0);
pidhash_init();
vfs_caches_init_early();
sort_main_extable();
trap_init();
mm_init();
sched_init();
preempt_disable();
if (!irqs_disabled()) {
printk(KERN_WARNING "start_kernel(): bug: interrupts were ""enabled *very* early, fixing it\n");
local_irq_disable();
}
idr_init_cache();
perf_event_init();
rcu_init(); /*空*/
radix_tree_init();
early_irq_init();
init_IRQ();
prio_tree_init();
init_timers();
hrtimers_init();
softirq_init();
timekeeping_init();
time_init();
profile_init(); /*空*/
call_function_init(); /*空*/
if (!irqs_disabled())
printk(KERN_CRIT "start_kernel(): bug: interrupts were ""enabled early\n");
early_boot_irqs_disabled = false;
local_irq_enable();
gfp_allowed_mask = __GFP_BITS_MASK;
kmem_cache_init_late(); /*空*/
console_init();
if (panic_later)
panic(panic_later, panic_param);
lockdep_info(); /*空*/
locking_selftest(); /*空*/
page_cgroup_init(); /*空*/
enable_debug_pagealloc();
debug_objects_mem_init(); /*空*/
kmemleak_init(); /*空*/
setup_per_cpu_pageset();
numa_policy_init(); /*空*/
if (late_time_init)
late_time_init();
sched_clock_init();
calibrate_delay();
pidmap_init();
anon_vma_init();
thread_info_cache_init(); /*空*/
cred_init();
fork_init(totalram_pages);
proc_caches_init();
buffer_init();
key_init();
security_init();
dbg_late_init(); /*空*/
vfs_caches_init(totalram_pages);
signals_init();
page_writeback_init();
#ifdef CONFIG_PROC_FS
proc_root_init();
#endif
cgroup_init(); /*空*/
cpuset_init(); /*空*/
taskstats_init_early(); /*空*/
delayacct_init(); /*空*/
check_bugs();
acpi_early_init();
sfi_init_late(); /*空*/
ftrace_init(); /*空*/
rest_init();
}
阅读(989) | 评论(0) | 转发(0) |