diff options
author | Juergen Gross <jgross@suse.com> | 2022-11-02 08:47:09 +0100 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2022-11-10 13:12:45 +0100 |
commit | 0b9a6a8bedbfb38e7c6be4d119a267e6277307cc (patch) | |
tree | d483fd6ca7b724ff032ceb817bf10531fc2622b0 /arch/x86/kernel/setup.c | |
parent | x86/mtrr: Let cache_aps_delayed_init replace mtrr_aps_delayed_init (diff) | |
download | linux-0b9a6a8bedbfb38e7c6be4d119a267e6277307cc.tar.xz linux-0b9a6a8bedbfb38e7c6be4d119a267e6277307cc.zip |
x86/mtrr: Add a stop_machine() handler calling only cache_cpu_init()
Instead of having a stop_machine() handler for either a specific
MTRR register or all state at once, add a handler just for calling
cache_cpu_init() if appropriate.
Add functions for calling stop_machine() with this handler as well.
Add a generic replacement for mtrr_bp_restore() and a wrapper for
mtrr_bp_init().
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20221102074713.21493-13-jgross@suse.com
Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'arch/x86/kernel/setup.c')
-rw-r--r-- | arch/x86/kernel/setup.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 216fee7144ee..e0e185ee0229 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -34,6 +34,7 @@ #include <asm/numa.h> #include <asm/bios_ebda.h> #include <asm/bugs.h> +#include <asm/cacheinfo.h> #include <asm/cpu.h> #include <asm/efi.h> #include <asm/gart.h> @@ -1075,7 +1076,7 @@ void __init setup_arch(char **cmdline_p) /* update e820 for memory not covered by WB MTRRs */ if (IS_ENABLED(CONFIG_MTRR)) - mtrr_bp_init(); + cache_bp_init(); else pat_disable("PAT support disabled because CONFIG_MTRR is disabled in the kernel."); |