main.c (caf9a82657b313106aae8f4a35936c116a152299) | main.c (aa8c6248f8c75acfd610fe15d8cae23cf70d9d09) |
---|---|
1/* 2 * linux/init/main.c 3 * 4 * Copyright (C) 1991, 1992 Linus Torvalds 5 * 6 * GK 2/5/95 - Changed to support mounting root fs via NFS 7 * Added initrd & change_root: Werner Almesberger & Hans Lermen, Feb '96 8 * Moan early if gcc is old, avoiding bogus kernels - Paul Gortmaker, May '96 --- 32 unchanged lines hidden (view full) --- 41#include <linux/moduleparam.h> 42#include <linux/kallsyms.h> 43#include <linux/writeback.h> 44#include <linux/cpu.h> 45#include <linux/cpuset.h> 46#include <linux/cgroup.h> 47#include <linux/efi.h> 48#include <linux/tick.h> | 1/* 2 * linux/init/main.c 3 * 4 * Copyright (C) 1991, 1992 Linus Torvalds 5 * 6 * GK 2/5/95 - Changed to support mounting root fs via NFS 7 * Added initrd & change_root: Werner Almesberger & Hans Lermen, Feb '96 8 * Moan early if gcc is old, avoiding bogus kernels - Paul Gortmaker, May '96 --- 32 unchanged lines hidden (view full) --- 41#include <linux/moduleparam.h> 42#include <linux/kallsyms.h> 43#include <linux/writeback.h> 44#include <linux/cpu.h> 45#include <linux/cpuset.h> 46#include <linux/cgroup.h> 47#include <linux/efi.h> 48#include <linux/tick.h> |
49#include <linux/sched/isolation.h> | |
50#include <linux/interrupt.h> 51#include <linux/taskstats_kern.h> 52#include <linux/delayacct.h> 53#include <linux/unistd.h> 54#include <linux/rmap.h> 55#include <linux/mempolicy.h> 56#include <linux/key.h> 57#include <linux/buffer_head.h> --- 7 unchanged lines hidden (view full) --- 65#include <linux/kthread.h> 66#include <linux/sched.h> 67#include <linux/sched/init.h> 68#include <linux/signal.h> 69#include <linux/idr.h> 70#include <linux/kgdb.h> 71#include <linux/ftrace.h> 72#include <linux/async.h> | 49#include <linux/interrupt.h> 50#include <linux/taskstats_kern.h> 51#include <linux/delayacct.h> 52#include <linux/unistd.h> 53#include <linux/rmap.h> 54#include <linux/mempolicy.h> 55#include <linux/key.h> 56#include <linux/buffer_head.h> --- 7 unchanged lines hidden (view full) --- 64#include <linux/kthread.h> 65#include <linux/sched.h> 66#include <linux/sched/init.h> 67#include <linux/signal.h> 68#include <linux/idr.h> 69#include <linux/kgdb.h> 70#include <linux/ftrace.h> 71#include <linux/async.h> |
72#include <linux/kmemcheck.h> |
|
73#include <linux/sfi.h> 74#include <linux/shmem_fs.h> 75#include <linux/slab.h> 76#include <linux/perf_event.h> 77#include <linux/ptrace.h> | 73#include <linux/sfi.h> 74#include <linux/shmem_fs.h> 75#include <linux/slab.h> 76#include <linux/perf_event.h> 77#include <linux/ptrace.h> |
78#include <linux/pti.h> |
|
78#include <linux/blkdev.h> 79#include <linux/elevator.h> 80#include <linux/sched_clock.h> 81#include <linux/sched/task.h> 82#include <linux/sched/task_stack.h> 83#include <linux/context_tracking.h> 84#include <linux/random.h> 85#include <linux/list.h> --- 415 unchanged lines hidden (view full) --- 501 page_ext_init_flatmem(); 502 mem_init(); 503 kmem_cache_init(); 504 pgtable_init(); 505 vmalloc_init(); 506 ioremap_huge_init(); 507 /* Should be run before the first non-init thread is created */ 508 init_espfix_bsp(); | 79#include <linux/blkdev.h> 80#include <linux/elevator.h> 81#include <linux/sched_clock.h> 82#include <linux/sched/task.h> 83#include <linux/sched/task_stack.h> 84#include <linux/context_tracking.h> 85#include <linux/random.h> 86#include <linux/list.h> --- 415 unchanged lines hidden (view full) --- 502 page_ext_init_flatmem(); 503 mem_init(); 504 kmem_cache_init(); 505 pgtable_init(); 506 vmalloc_init(); 507 ioremap_huge_init(); 508 /* Should be run before the first non-init thread is created */ 509 init_espfix_bsp(); |
510 /* Should be run after espfix64 is set up. */ 511 pti_init(); |
|
509} 510 511asmlinkage __visible void __init start_kernel(void) 512{ 513 char *command_line; 514 char *after_dashes; 515 516 set_task_stack_end_magic(&init_task); --- 42 unchanged lines hidden (view full) --- 559 560 jump_label_init(); 561 562 /* 563 * These use large bootmem allocations and must precede 564 * kmem_cache_init() 565 */ 566 setup_log_buf(0); | 512} 513 514asmlinkage __visible void __init start_kernel(void) 515{ 516 char *command_line; 517 char *after_dashes; 518 519 set_task_stack_end_magic(&init_task); --- 42 unchanged lines hidden (view full) --- 562 563 jump_label_init(); 564 565 /* 566 * These use large bootmem allocations and must precede 567 * kmem_cache_init() 568 */ 569 setup_log_buf(0); |
570 pidhash_init(); |
|
567 vfs_caches_init_early(); 568 sort_main_extable(); 569 trap_init(); 570 mm_init(); 571 572 ftrace_init(); 573 574 /* trace_printk can be enabled here */ --- 11 unchanged lines hidden (view full) --- 586 */ 587 preempt_disable(); 588 if (WARN(!irqs_disabled(), 589 "Interrupts were enabled *very* early, fixing it\n")) 590 local_irq_disable(); 591 radix_tree_init(); 592 593 /* | 571 vfs_caches_init_early(); 572 sort_main_extable(); 573 trap_init(); 574 mm_init(); 575 576 ftrace_init(); 577 578 /* trace_printk can be enabled here */ --- 11 unchanged lines hidden (view full) --- 590 */ 591 preempt_disable(); 592 if (WARN(!irqs_disabled(), 593 "Interrupts were enabled *very* early, fixing it\n")) 594 local_irq_disable(); 595 radix_tree_init(); 596 597 /* |
594 * Set up housekeeping before setting up workqueues to allow the unbound 595 * workqueue to take non-housekeeping into account. 596 */ 597 housekeeping_init(); 598 599 /* | |
600 * Allow workqueue creation and work item queueing/cancelling 601 * early. Work item execution depends on kthreads and starts after 602 * workqueue_init(). 603 */ 604 workqueue_init_early(); 605 606 rcu_init(); 607 --- 58 unchanged lines hidden (view full) --- 666 initrd_start = 0; 667 } 668#endif 669 page_ext_init(); 670 kmemleak_init(); 671 debug_objects_mem_init(); 672 setup_per_cpu_pageset(); 673 numa_policy_init(); | 598 * Allow workqueue creation and work item queueing/cancelling 599 * early. Work item execution depends on kthreads and starts after 600 * workqueue_init(). 601 */ 602 workqueue_init_early(); 603 604 rcu_init(); 605 --- 58 unchanged lines hidden (view full) --- 664 initrd_start = 0; 665 } 666#endif 667 page_ext_init(); 668 kmemleak_init(); 669 debug_objects_mem_init(); 670 setup_per_cpu_pageset(); 671 numa_policy_init(); |
674 acpi_early_init(); | |
675 if (late_time_init) 676 late_time_init(); 677 calibrate_delay(); | 672 if (late_time_init) 673 late_time_init(); 674 calibrate_delay(); |
678 pid_idr_init(); | 675 pidmap_init(); |
679 anon_vma_init(); | 676 anon_vma_init(); |
677 acpi_early_init(); |
|
680#ifdef CONFIG_X86 681 if (efi_enabled(EFI_RUNTIME_SERVICES)) 682 efi_enter_virtual_mode(); 683#endif 684 thread_stack_cache_init(); 685 cred_init(); 686 fork_init(); 687 proc_caches_init(); --- 414 unchanged lines hidden --- | 678#ifdef CONFIG_X86 679 if (efi_enabled(EFI_RUNTIME_SERVICES)) 680 efi_enter_virtual_mode(); 681#endif 682 thread_stack_cache_init(); 683 cred_init(); 684 fork_init(); 685 proc_caches_init(); --- 414 unchanged lines hidden --- |