Commit ce5a3a8e authored by Ionela Voinescu's avatar Ionela Voinescu Committed by Zeng Heng
Browse files

cppc_cpufreq: use policy->cpu as driver of frequency setting

mainline inclusion
from mainline-v5.11-rc1
commit d2641a5c
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8TPP6

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d2641a5c3d5ecaa1078225e493c7fed821715a04



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

Considering only the currently supported coordination types (ANY, HW,
NONE), this change only makes a difference for the ANY type, when
policy->cpu is hotplugged out. In that case the new policy->cpu will
be different from ((struct cppc_cpudata *)policy->driver_data)->cpu.

While in this case the controls of *ANY* CPU could be used to drive
frequency changes, it's more consistent to use policy->cpu as the
leading CPU, as used in all other cppc_cpufreq functions. Additionally,
the debug prints in cppc_set_perf() would no longer create confusion
when referring to a CPU that is hotplugged out.

Signed-off-by: default avatarIonela Voinescu <ionela.voinescu@arm.com>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Tested-by: default avatarMian Yousaf Kaukab <ykaukab@suse.de>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarZeng Heng <zengheng4@huawei.com>
parent 8aa11dc8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment