Commit 84172928 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/IB77UH


CVE: NA

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

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

Signed-off-by: default avatarLeoLiu-oc <leoliu-oc@zhaoxin.com>
parent b95a35e8
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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) {