x86/mm: Initialize text poking earlier
authorPeter Zijlstra <peterz@infradead.org>
Tue, 25 Oct 2022 19:38:25 +0000 (21:38 +0200)
committerDave Hansen <dave.hansen@linux.intel.com>
Thu, 15 Dec 2022 18:37:26 +0000 (10:37 -0800)
Move poking_init() up a bunch; specifically move it right after
mm_init() which is right before ftrace_init().

This will allow simplifying ftrace text poking which currently has
a bunch of exceptions for early boot.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20221025201057.881703081@infradead.org
init/main.c

index f1d1a549e1ccbb71b71c47a7c30b3b078eb3cafd..5372ea2437352147beeee301e0924fe0549e04e2 100644 (file)
@@ -996,7 +996,7 @@ asmlinkage __visible void __init __no_sanitize_address start_kernel(void)
        sort_main_extable();
        trap_init();
        mm_init();
-
+       poking_init();
        ftrace_init();
 
        /* trace_printk can be enabled here */
@@ -1135,7 +1135,6 @@ asmlinkage __visible void __init __no_sanitize_address start_kernel(void)
        taskstats_init_early();
        delayacct_init();
 
-       poking_init();
        check_bugs();
 
        acpi_subsystem_init();