summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/cpu/bugs.c
diff options
context:
space:
mode:
authorBorislav Petkov (AMD) <bp@alien8.de>2026-06-19 18:50:41 -0700
committerBorislav Petkov (AMD) <bp@alien8.de>2026-07-06 21:34:26 -0700
commit3eaa50e1e255ec261c757b9eea811ef3bac10d1e (patch)
treebf0083c895d6cfce97f943096f426ff600eda42a /arch/x86/kernel/cpu/bugs.c
parent8cdeaa50eae8dad34885515f62559ee83e7e8dda (diff)
downloadlinux-next-3eaa50e1e255ec261c757b9eea811ef3bac10d1e.tar.gz
linux-next-3eaa50e1e255ec261c757b9eea811ef3bac10d1e.zip
x86/cpu: Hide and rename static_cpu_has()
cpu_feature_enabled() is the one to use to test feature flags so hide the static thing which doesn't pay attention to disabled mask bits anyway. Use the following command to do the replacement: $ git grep --files-with-matches -w static_cpu_has -- ':(exclude)*cpufeature.h' \ | xargs sed -i 's/static_cpu_has(/cpu_feature_enabled\(/g' There should be no functional changes resulting from this. Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Nikolay Borisov <nik.borisov@suse.com> Link: https://patch.msgid.link/20260620015041.336288-1-bp@kernel.org
Diffstat (limited to 'arch/x86/kernel/cpu/bugs.c')
-rw-r--r--arch/x86/kernel/cpu/bugs.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index d9af230c0512..ddf0db5326fa 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -192,8 +192,8 @@ x86_virt_spec_ctrl(u64 guest_virt_spec_ctrl, bool setguest)
* If SSBD is not handled in MSR_SPEC_CTRL on AMD, update
* MSR_AMD64_L2_CFG or MSR_VIRT_SPEC_CTRL if supported.
*/
- if (!static_cpu_has(X86_FEATURE_LS_CFG_SSBD) &&
- !static_cpu_has(X86_FEATURE_VIRT_SSBD))
+ if (!cpu_feature_enabled(X86_FEATURE_LS_CFG_SSBD) &&
+ !cpu_feature_enabled(X86_FEATURE_VIRT_SSBD))
return;
/*
@@ -201,7 +201,7 @@ x86_virt_spec_ctrl(u64 guest_virt_spec_ctrl, bool setguest)
* virtual MSR value. If its not permanently enabled, evaluate
* current's TIF_SSBD thread flag.
*/
- if (static_cpu_has(X86_FEATURE_SPEC_STORE_BYPASS_DISABLE))
+ if (cpu_feature_enabled(X86_FEATURE_SPEC_STORE_BYPASS_DISABLE))
hostval = SPEC_CTRL_SSBD;
else
hostval = ssbd_tif_to_spec_ctrl(ti->flags);
@@ -2499,8 +2499,8 @@ static void __init ssb_apply_mitigation(void)
* Intel uses the SPEC CTRL MSR Bit(2) for this, while AMD may
* use a completely different MSR and bit dependent on family.
*/
- if (!static_cpu_has(X86_FEATURE_SPEC_CTRL_SSBD) &&
- !static_cpu_has(X86_FEATURE_AMD_SSBD)) {
+ if (!cpu_feature_enabled(X86_FEATURE_SPEC_CTRL_SSBD) &&
+ !cpu_feature_enabled(X86_FEATURE_AMD_SSBD)) {
x86_amd_ssb_disable();
} else {
x86_spec_ctrl_base |= SPEC_CTRL_SSBD;