Skip to content

Commit c710775

Browse files
Perry Yuansuperm1
authored andcommitted
x86/cpufeatures: Add AMD FAST CPPC feature flag
Some AMD Zen 4 processors support a new feature FAST CPPC which allows for a faster CPPC loop due to internal architectural enhancements. The goal of this faster loop is higher performance at the same power consumption. Reference: See the page 99 of PPR for AMD Family 19h Model 61h rev.B1, docID 56713 Signed-off-by: Perry Yuan <[email protected]> Signed-off-by: Xiaojian Du <[email protected]> Reviewed-by: Borislav Petkov (AMD) <[email protected]>
1 parent 83a7eef commit c710775

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

arch/x86/include/asm/cpufeatures.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,7 @@
470470
#define X86_FEATURE_BHI_CTRL (21*32+ 2) /* "" BHI_DIS_S HW control available */
471471
#define X86_FEATURE_CLEAR_BHB_HW (21*32+ 3) /* "" BHI_DIS_S HW control enabled */
472472
#define X86_FEATURE_CLEAR_BHB_LOOP_ON_VMEXIT (21*32+ 4) /* "" Clear branch history at vmexit using SW loop */
473+
#define X86_FEATURE_FAST_CPPC (21*32 + 5) /* "" AMD Fast CPPC */
473474

474475
/*
475476
* BUG word(s)

arch/x86/kernel/cpu/scattered.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ static const struct cpuid_bit cpuid_bits[] = {
4545
{ X86_FEATURE_HW_PSTATE, CPUID_EDX, 7, 0x80000007, 0 },
4646
{ X86_FEATURE_CPB, CPUID_EDX, 9, 0x80000007, 0 },
4747
{ X86_FEATURE_PROC_FEEDBACK, CPUID_EDX, 11, 0x80000007, 0 },
48+
{ X86_FEATURE_FAST_CPPC, CPUID_EDX, 15, 0x80000007, 0 },
4849
{ X86_FEATURE_MBA, CPUID_EBX, 6, 0x80000008, 0 },
4950
{ X86_FEATURE_SMBA, CPUID_EBX, 2, 0x80000020, 0 },
5051
{ X86_FEATURE_BMEC, CPUID_EBX, 3, 0x80000020, 0 },

0 commit comments

Comments
 (0)