Skip to content

Commit 24ee8d9

Browse files
yghannambp3tk0v
authored andcommitted
x86/CPU/AMD: Add X86_FEATURE_ZEN6
Add a synthetic feature flag for Zen6. [ bp: Move the feature flag to a free slot and avoid future merge conflicts from incoming stuff. ] Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/20250513204857.3376577-1-yazen.ghannam@amd.com
1 parent 82b7f88 commit 24ee8d9

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

arch/x86/include/asm/cpufeatures.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
#define X86_FEATURE_CENTAUR_MCR ( 3*32+ 3) /* "centaur_mcr" Centaur MCRs (= MTRRs) */
7676
#define X86_FEATURE_K8 ( 3*32+ 4) /* Opteron, Athlon64 */
7777
#define X86_FEATURE_ZEN5 ( 3*32+ 5) /* CPU based on Zen5 microarchitecture */
78-
/* Free ( 3*32+ 6) */
78+
#define X86_FEATURE_ZEN6 ( 3*32+ 6) /* CPU based on Zen6 microarchitecture */
7979
/* Free ( 3*32+ 7) */
8080
#define X86_FEATURE_CONSTANT_TSC ( 3*32+ 8) /* "constant_tsc" TSC ticks at a constant rate */
8181
#define X86_FEATURE_UP ( 3*32+ 9) /* "up" SMP kernel running on UP */

arch/x86/kernel/cpu/amd.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,11 @@ static void bsp_init_amd(struct cpuinfo_x86 *c)
472472
case 0x60 ... 0x7f:
473473
setup_force_cpu_cap(X86_FEATURE_ZEN5);
474474
break;
475+
case 0x50 ... 0x5f:
476+
case 0x90 ... 0xaf:
477+
case 0xc0 ... 0xcf:
478+
setup_force_cpu_cap(X86_FEATURE_ZEN6);
479+
break;
475480
default:
476481
goto warn;
477482
}

0 commit comments

Comments
 (0)