]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cpufreq: Fix per-policy boost behavior on SoCs using cpufreq_boost_set_sw()
authorSibi Sankar <quic_sibis@quicinc.com>
Tue, 12 Mar 2024 10:37:23 +0000 (16:07 +0530)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:20:08 +0000 (18:20 -0400)
commit9d47d2e7f82dec7cab09996bdb9062786eb827f6
treef22e0487fd7d0ff6feb6fe09475b75176d47913c
parentfa92366e413fdb87379ebd0e11eae24259c68028
cpufreq: Fix per-policy boost behavior on SoCs using cpufreq_boost_set_sw()

[ Upstream commit f37a4d6b4a2c77414e8b9d25dd5ee31537ce9b00 ]

In the existing code, per-policy flags don't have any impact i.e.
if cpufreq_driver boost is enabled and boost is disabled for one or
more of the policies, the cpufreq driver will behave as if boost is
enabled.

Fix this by incorporating per-policy boost flag in the policy->max
computation used in cpufreq_frequency_table_cpuinfo and setting the
default per-policy boost to mirror the cpufreq_driver boost flag.

Fixes: 218a06a79d9a ("cpufreq: Support per-policy performance boost")
Reported-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Sibi Sankar <quic_sibis@quicinc.com>
Tested-by:Yipeng Zou <zouyipeng@huawei.com> <mailto:zouyipeng@huawei.com>
Reviewed-by: Yipeng Zou <zouyipeng@huawei.com> <mailto:zouyipeng@huawei.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/cpufreq/cpufreq.c
drivers/cpufreq/freq_table.c