]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
x86/cpufeatures: Add X86_FEATURE_AMD_HETEROGENEOUS_CORES
authorPerry Yuan <perry.yuan@amd.com>
Fri, 25 Oct 2024 17:14:56 +0000 (12:14 -0500)
committerBorislav Petkov (AMD) <bp@alien8.de>
Fri, 25 Oct 2024 18:31:16 +0000 (20:31 +0200)
CPUID leaf 0x80000026 advertises core types with different efficiency
rankings.

Bit 30 indicates the heterogeneous core topology feature, if the bit
set, it means not all instances at the current hierarchical level have
the same core topology.

This is described in the AMD64 Architecture Programmers Manual Volume
2 and 3, doc ID #25493 and #25494.

Signed-off-by: Perry Yuan <perry.yuan@amd.com>
Co-developed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20241025171459.1093-3-mario.limonciello@amd.com
arch/x86/include/asm/cpufeatures.h
arch/x86/kernel/cpu/scattered.c

index a71a403bd59d560971c66b74b3ed698a3e3b15ed..1216a0588ba8e1d97f46450ac5e37e6d73eb325b 100644 (file)
 #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_AMD_FAST_CPPC      (21*32 + 5) /* Fast CPPC */
+#define X86_FEATURE_AMD_HETEROGENEOUS_CORES (21*32 + 6) /* Heterogeneous Core Topology */
 
 /*
  * BUG word(s)
index 1db2bb81a3847e41b4d04b8186d3d8da3c936036..307a9174153431bf25eaf49ace8748effdfb4b7f 100644 (file)
@@ -52,6 +52,7 @@ static const struct cpuid_bit cpuid_bits[] = {
        { X86_FEATURE_PERFMON_V2,       CPUID_EAX,  0, 0x80000022, 0 },
        { X86_FEATURE_AMD_LBR_V2,       CPUID_EAX,  1, 0x80000022, 0 },
        { X86_FEATURE_AMD_LBR_PMC_FREEZE,       CPUID_EAX,  2, 0x80000022, 0 },
+       { X86_FEATURE_AMD_HETEROGENEOUS_CORES,  CPUID_EAX,  30, 0x80000026, 0 },
        { 0, 0, 0, 0, 0 }
 };