]> www.infradead.org Git - users/willy/xarray.git/commitdiff
x86/cpufeatures: Add AMD FAST CPPC feature flag
authorPerry Yuan <perry.yuan@amd.com>
Sat, 25 May 2024 15:08:43 +0000 (23:08 +0800)
committerMario Limonciello <mario.limonciello@amd.com>
Tue, 11 Jun 2024 21:12:12 +0000 (16:12 -0500)
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 <perry.yuan@amd.com>
Signed-off-by: Xiaojian Du <Xiaojian.Du@amd.com>
Reviewed-by: Borislav Petkov (AMD) <bp@alien8.de>
arch/x86/include/asm/cpufeatures.h
arch/x86/kernel/cpu/scattered.c

index 3c7434329661c66e7c34283f0a3f2c59a87f8044..6c128d463a143c53bce2dc6a82d8c6f0dc76ad4d 100644 (file)
 #define X86_FEATURE_BHI_CTRL           (21*32+ 2) /* "" BHI_DIS_S HW control available */
 #define X86_FEATURE_CLEAR_BHB_HW       (21*32+ 3) /* "" BHI_DIS_S HW control enabled */
 #define X86_FEATURE_CLEAR_BHB_LOOP_ON_VMEXIT (21*32+ 4) /* "" Clear branch history at vmexit using SW loop */
+#define X86_FEATURE_FAST_CPPC          (21*32 + 5) /* "" AMD Fast CPPC */
 
 /*
  * BUG word(s)
index af5aa2c754c22226080870967d6c410067c86447..c84c30188fdf2414fd6c08b6c95ce3a352e03c2b 100644 (file)
@@ -45,6 +45,7 @@ static const struct cpuid_bit cpuid_bits[] = {
        { X86_FEATURE_HW_PSTATE,        CPUID_EDX,  7, 0x80000007, 0 },
        { X86_FEATURE_CPB,              CPUID_EDX,  9, 0x80000007, 0 },
        { X86_FEATURE_PROC_FEEDBACK,    CPUID_EDX, 11, 0x80000007, 0 },
+       { X86_FEATURE_FAST_CPPC,        CPUID_EDX, 15, 0x80000007, 0 },
        { X86_FEATURE_MBA,              CPUID_EBX,  6, 0x80000008, 0 },
        { X86_FEATURE_SMBA,             CPUID_EBX,  2, 0x80000020, 0 },
        { X86_FEATURE_BMEC,             CPUID_EBX,  3, 0x80000020, 0 },