Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

x86/coco/sev: Convert has_cpuflag() to use cpu_feature_enabled()

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

+3 -4
+1 -1
arch/x86/boot/startup/sev-shared.c
··· 12 12 #include <asm/setup_data.h> 13 13 14 14 #ifndef __BOOT_COMPRESSED 15 - #define has_cpuflag(f) boot_cpu_has(f) 15 + #define has_cpuflag(f) cpu_feature_enabled(f) 16 16 #else 17 17 #undef WARN 18 18 #define WARN(condition, format...) (!!(condition))
-1
arch/x86/coco/sev/vc-handle.c
··· 352 352 353 353 #define sev_printk(fmt, ...) printk(fmt, ##__VA_ARGS__) 354 354 #define error(v) 355 - #define has_cpuflag(f) boot_cpu_has(f) 356 355 357 356 #include "vc-shared.c" 358 357
+1 -1
arch/x86/coco/sev/vc-shared.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 3 3 #ifndef __BOOT_COMPRESSED 4 - #define has_cpuflag(f) boot_cpu_has(f) 4 + #define has_cpuflag(f) cpu_feature_enabled(f) 5 5 #endif 6 6 7 7 static enum es_result vc_check_opcode_bytes(struct es_em_ctxt *ctxt,
+1 -1
arch/x86/lib/kaslr.c
··· 22 22 #include <asm/setup.h> 23 23 24 24 #define debug_putstr(v) early_printk("%s", v) 25 - #define has_cpuflag(f) boot_cpu_has(f) 25 + #define has_cpuflag(f) cpu_feature_enabled(f) 26 26 #define get_boot_seed() kaslr_offset() 27 27 #endif 28 28