From 5f7681ec74e1003e46b566b8df3f059135d809b0 Mon Sep 17 00:00:00 2001 From: LeoLiu-oc Date: Mon, 23 Dec 2024 16:28:37 +0800 Subject: [PATCH] cpufreq: acpi-cpufreq: Zhaoxin: fix incorrect max-freq issue Workaround for incorrect max frequency calculation on Zhaoxin/Centaur CPUs. Signed-off-by: LeoLiu-oc --- drivers/cpufreq/acpi-cpufreq.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c index ef958008ad5c..cffbf66670ad 100644 --- a/drivers/cpufreq/acpi-cpufreq.c +++ b/drivers/cpufreq/acpi-cpufreq.c @@ -637,6 +637,10 @@ static u64 get_max_boost_ratio(unsigned int cpu) if (acpi_pstate_strict) return 0; + if (boot_cpu_data.x86_vendor == X86_VENDOR_ZHAOXIN || + boot_cpu_data.x86_vendor == X86_VENDOR_CENTAUR) + return 0; + ret = cppc_get_perf_caps(cpu, &perf_caps); if (ret) { pr_debug("CPU%d: Unable to get performance capabilities (%d)\n",