From 84172928ecae93e3c884c08798d4c47570acce0d Mon Sep 17 00:00:00 2001 From: LeoLiu-oc Date: Tue, 26 Nov 2024 19:07:32 +0800 Subject: [PATCH] cpufreq: acpi-cpufreq: Zhaoxin: fix incorrect max-freq issue zhaoxin inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/IB77UH CVE: NA ----------------- 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 d34a8ca6187d..5d3c6e4c7a3f 100644 --- a/drivers/cpufreq/acpi-cpufreq.c +++ b/drivers/cpufreq/acpi-cpufreq.c @@ -656,6 +656,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; + cppc_get_highest_nominal_perf(cpu, &highest_perf, &nominal_perf); if (!highest_perf || !nominal_perf) { -- Gitee