Commit 65940a8a authored by LeoLiu-oc's avatar LeoLiu-oc
Browse files

cpufreq: acpi-cpufreq: Zhaoxin: fix incorrect max-freq issue

zhaoxin inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/IBB6OU


CVE: NA

-------------------

Workaround for incorrect max frequency calculation on Zhaoxin/Centaur CPUs.

Signed-off-by: default avatarLeoLiu-oc <leoliu-oc@zhaoxin.com>
parent 06ee47aa
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -650,6 +650,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",