Skip to content

Commit b2c1dd6

Browse files
committed
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
1 parent 92ad650 commit b2c1dd6

4 files changed

Lines changed: 3 additions & 4 deletions

File tree

arch/x86/boot/startup/sev-shared.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <asm/setup_data.h>
1313

1414
#ifndef __BOOT_COMPRESSED
15-
#define has_cpuflag(f) boot_cpu_has(f)
15+
#define has_cpuflag(f) cpu_feature_enabled(f)
1616
#else
1717
#undef WARN
1818
#define WARN(condition, format...) (!!(condition))

arch/x86/coco/sev/vc-handle.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,6 @@ static enum es_result vc_read_mem(struct es_em_ctxt *ctxt,
352352

353353
#define sev_printk(fmt, ...) printk(fmt, ##__VA_ARGS__)
354354
#define error(v)
355-
#define has_cpuflag(f) boot_cpu_has(f)
356355

357356
#include "vc-shared.c"
358357

arch/x86/coco/sev/vc-shared.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: GPL-2.0
22

33
#ifndef __BOOT_COMPRESSED
4-
#define has_cpuflag(f) boot_cpu_has(f)
4+
#define has_cpuflag(f) cpu_feature_enabled(f)
55
#endif
66

77
static enum es_result vc_check_opcode_bytes(struct es_em_ctxt *ctxt,

arch/x86/lib/kaslr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <asm/setup.h>
2323

2424
#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)
2626
#define get_boot_seed() kaslr_offset()
2727
#endif
2828

0 commit comments

Comments
 (0)