summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rw-r--r--init/main.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/init/main.c b/init/main.c
index b1b9dbf7622f..cc48053bb39f 100644
--- a/init/main.c
+++ b/init/main.c
@@ -545,6 +545,11 @@ asmlinkage __visible void __init start_kernel(void)
545 trap_init(); 545 trap_init();
546 mm_init(); 546 mm_init();
547 547
548 ftrace_init();
549
550 /* trace_printk can be enabled here */
551 early_trace_init();
552
548 /* 553 /*
549 * Set up the scheduler prior starting any interrupts (such as the 554 * Set up the scheduler prior starting any interrupts (such as the
550 * timer interrupt). Full topology setup happens at smp_init() 555 * timer interrupt). Full topology setup happens at smp_init()
@@ -570,7 +575,7 @@ asmlinkage __visible void __init start_kernel(void)
570 575
571 rcu_init(); 576 rcu_init();
572 577
573 /* trace_printk() and trace points may be used after this */ 578 /* Trace events are available after this */
574 trace_init(); 579 trace_init();
575 580
576 context_tracking_init(); 581 context_tracking_init();
@@ -670,8 +675,6 @@ asmlinkage __visible void __init start_kernel(void)
670 efi_free_boot_services(); 675 efi_free_boot_services();
671 } 676 }
672 677
673 ftrace_init();
674
675 /* Do the rest non-__init'ed, we're now alive */ 678 /* Do the rest non-__init'ed, we're now alive */
676 rest_init(); 679 rest_init();
677} 680}
@@ -959,6 +962,7 @@ static int __ref kernel_init(void *unused)
959 kernel_init_freeable(); 962 kernel_init_freeable();
960 /* need to finish all async __init code before freeing the memory */ 963 /* need to finish all async __init code before freeing the memory */
961 async_synchronize_full(); 964 async_synchronize_full();
965 ftrace_free_init_mem();
962 free_initmem(); 966 free_initmem();
963 mark_readonly(); 967 mark_readonly();
964 system_state = SYSTEM_RUNNING; 968 system_state = SYSTEM_RUNNING;