summaryrefslogtreecommitdiff
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorVishal Badole <Vishal.Badole@amd.com>2026-07-21 21:15:13 +0530
committerBorislav Petkov (AMD) <bp@alien8.de>2026-07-23 14:23:27 -0700
commitbdb1b1f03b9b1cc1cde7d54f8b5b2f9a6bdda782 (patch)
tree33996584c995aa565970bbcb4db08249bab44902 /arch/x86/kernel
parent598ebce64c4cfaca54cbecdc25a7ef56ea701051 (diff)
downloadlinux-next-bdb1b1f03b9b1cc1cde7d54f8b5b2f9a6bdda782.tar.gz
linux-next-bdb1b1f03b9b1cc1cde7d54f8b5b2f9a6bdda782.zip
x86/topology: Name the AMD core-type values
Replace the bare 0/1 in get_topology_cpu_type() with named constants that mirror what the AMD APM publishes for CPUID Fn0x80000026 EBX[31:28] (Extended CPU Topology, Core Type): 0 - Performance core 1 - Efficient core 2 - Low-power core (used by a follow-up) No functional change. Suggested-by: Borislav Petkov (AMD) <bp@alien8.de> Signed-off-by: Vishal Badole <Vishal.Badole@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://patch.msgid.link/20260721154514.2506972-3-Vishal.Badole@amd.com
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/cpu/topology_common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/topology_common.c b/arch/x86/kernel/cpu/topology_common.c
index b9d025f3373a..71b6c33afe0b 100644
--- a/arch/x86/kernel/cpu/topology_common.c
+++ b/arch/x86/kernel/cpu/topology_common.c
@@ -42,8 +42,8 @@ enum x86_topology_cpu_type get_topology_cpu_type(struct cpuinfo_x86 *c)
}
if (c->x86_vendor == X86_VENDOR_AMD) {
switch (c->topo.amd_type) {
- case 0: return TOPO_CPU_TYPE_PERFORMANCE;
- case 1: return TOPO_CPU_TYPE_EFFICIENCY;
+ case AMD_CPU_TYPE_PERFORMANCE: return TOPO_CPU_TYPE_PERFORMANCE;
+ case AMD_CPU_TYPE_EFFICIENCY: return TOPO_CPU_TYPE_EFFICIENCY;
}
}