summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc
diff options
context:
space:
mode:
authorJie Zhan <zhanjie9@hisilicon.com>2024-09-29 11:32:13 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-12-05 14:02:01 +0100
commit12b63e2260f5715bfddffe274c642b9e67178504 (patch)
tree40836ac9c2026acfd9c4bc3a91c4ac1dfe253668 /rust/kernel/alloc
parent89933f8ab3b4cad5ac14ea56a39947d1ffe7d0e3 (diff)
downloadlinux-12b63e2260f5715bfddffe274c642b9e67178504.tar.gz
linux-12b63e2260f5715bfddffe274c642b9e67178504.tar.bz2
linux-12b63e2260f5715bfddffe274c642b9e67178504.zip
cppc_cpufreq: Use desired perf if feedback ctrs are 0 or unchanged
[ Upstream commit c47195631960b626058c335aec31f186fa854f97 ] The CPPC performance feedback counters could be 0 or unchanged when the target cpu is in a low-power idle state, e.g. power-gated or clock-gated. When the counters are 0, cppc_cpufreq_get_rate() returns 0 KHz, which makes cpufreq_online() get a false error and fail to generate a cpufreq policy. When the counters are unchanged, the existing cppc_perf_from_fbctrs() returns a cached desired perf, but some platforms may update the real frequency back to the desired perf reg. For the above cases in cppc_cpufreq_get_rate(), get the latest desired perf from the CPPC reg to reflect the frequency because some platforms may update the actual frequency back there; if failed, use the cached desired perf. Fixes: 6a4fec4f6d30 ("cpufreq: cppc: cppc_cpufreq_get_rate() returns zero in all error cases.") Signed-off-by: Jie Zhan <zhanjie9@hisilicon.com> Reviewed-by: Zeng Heng <zengheng4@huawei.com> Reviewed-by: Ionela Voinescu <ionela.voinescu@arm.com> Reviewed-by: Huisong Li <lihuisong@huawei.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'rust/kernel/alloc')
0 files changed, 0 insertions, 0 deletions