Skip to contentSkip to conversation

x86/cpu/amd: remove the CPU model ID to get correct highest perf

PATCH New Perry Yuan 1 participant 1 message Oct 3, 2022

Subsystems (2)
lore
Share & tools
lore

Perry Yuan

author
#0 lore raw

PATCH 1/1 x86/cpu/amd: remove the CPU model ID to get correct highest perf

The AMD Rome CPU model IDs(30h-3Fh) do not need to get the highest perf value from the amd_get_highest_perf() function, the correct highest perf will be queried from the cppc_acpi interface.

Fixes 3743d55b2 (x86, sched: Fix the AMD CPPC maximum performance value on certain AMD Ryzen generations)
---
 arch/x86/kernel/cpu/amd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/x86/kernel/cpu/amd.c +1 -2
index 48276c0e479d..1734cc5aa7ff 100644
@@ -1183,8 +1183,7 @@ u32 amd_get_highest_perf(void)
 {
 	struct cpuinfo_x86 *c = &boot_cpu_data;
 
-	if (c->x86 == 0x17 && ((c->x86_model >= 0x30 && c->x86_model < 0x40) ||
-			       (c->x86_model >= 0x70 && c->x86_model < 0x80)))
+	if (c->x86 == 0x17 && (c->x86_model >= 0x70 && c->x86_model < 0x80))
 		return 166;
 
 	if (c->x86 == 0x19 && ((c->x86_model >= 0x20 && c->x86_model < 0x30) ||
Signature · 1 line
2.34.1