]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
x86/coco/sev: Convert has_cpuflag() to use cpu_feature_enabled()
authorBorislav Petkov (AMD) <bp@alien8.de>
Thu, 30 Oct 2025 16:59:11 +0000 (17:59 +0100)
committerBorislav Petkov (AMD) <bp@alien8.de>
Tue, 11 Nov 2025 15:42:31 +0000 (16:42 +0100)
Drop one redundant definition, while at it.

There should be no functional changes.

Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://patch.msgid.link/20251031122122.GKaQSpwhLvkinKKbjG@fat_crate.local
arch/x86/boot/startup/sev-shared.c
arch/x86/coco/sev/vc-handle.c
arch/x86/coco/sev/vc-shared.c
arch/x86/lib/kaslr.c

index 4e22ffd735168b0307c845ef097f1700ed386a52..a0fa8bb2b9458eed3d354cab11c82b0f01fae0cc 100644 (file)
@@ -12,7 +12,7 @@
 #include <asm/setup_data.h>
 
 #ifndef __BOOT_COMPRESSED
-#define has_cpuflag(f)                 boot_cpu_has(f)
+#define has_cpuflag(f)                 cpu_feature_enabled(f)
 #else
 #undef WARN
 #define WARN(condition, format...) (!!(condition))
index 7fc136a353347b5c40749e57afee661a53fc633f..f08c7505ed82a666334256866d3b753cc4b56b20 100644 (file)
@@ -352,7 +352,6 @@ fault:
 
 #define sev_printk(fmt, ...)           printk(fmt, ##__VA_ARGS__)
 #define error(v)
-#define has_cpuflag(f)                 boot_cpu_has(f)
 
 #include "vc-shared.c"
 
index e2ac95de4611eb0cea8695b6271fd6d3b0a11b4d..58b2f985d546d1e825163f804972c0687c0b7d77 100644 (file)
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0
 
 #ifndef __BOOT_COMPRESSED
-#define has_cpuflag(f)                  boot_cpu_has(f)
+#define has_cpuflag(f)                  cpu_feature_enabled(f)
 #endif
 
 static enum es_result vc_check_opcode_bytes(struct es_em_ctxt *ctxt,
index b5893928d55c76adc13ccfd9ed528b1dffe78385..8c7cd115b4847e12e6a5874eb21010b898f1ee08 100644 (file)
@@ -22,7 +22,7 @@
 #include <asm/setup.h>
 
 #define debug_putstr(v) early_printk("%s", v)
-#define has_cpuflag(f) boot_cpu_has(f)
+#define has_cpuflag(f) cpu_feature_enabled(f)
 #define get_boot_seed() kaslr_offset()
 #endif