Commit 75bdf29e authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Aichun Shi
Browse files

x86/mm: Initialize text poking earlier

stable inclusion
from stable-v5.10.189
commit 79972c2b95eca5e7d3d237d728339b21e9075629
category: bugfix
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I8LVBS
CVE: N/A
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=79972c2b95eca5e7d3d237d728339b21e9075629



-------------------------------------

Intel-SIG: commit 79972c2b95ec ("x86/mm: Initialize text poking earlier")
Backport x86 related patches from 5.10.189 upstream

-------------------------------------

commit 5b93a836 upstream.

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: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20221025201057.881703081@infradead.org


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarAichun Shi <aichun.shi@intel.com>
parent 4101b2fe
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -929,7 +929,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 */
@@ -1065,8 +1065,6 @@ asmlinkage __visible void __init __no_sanitize_address start_kernel(void)
	taskstats_init_early();
	delayacct_init();

	poking_init();

	acpi_subsystem_init();
	arch_post_acpi_subsys_init();
	sfi_init_late();