Loading
cpufreq: qcom: Fix qcom_cpufreq_hw_recalc_rate() to query LUT if LMh IRQ is not available
stable inclusion from stable-v6.6.76 commit f757327c4ce69f9d654aa43889c8c14035090d14 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IBW08Q Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f757327c4ce69f9d654aa43889c8c14035090d14 -------------------------------- [ Upstream commit 85d8b11351a8f15d6ec7a5e97909861cb3b6bcec ] Currently, qcom_cpufreq_hw_recalc_rate() returns the LMh throttled frequency for the domain even if LMh IRQ is not available. But as per qcom_cpufreq_hw_get(), the driver has to query LUT entries to get the actual frequency of the domain. So do the same in qcom_cpufreq_hw_recalc_rate(). While doing so, refactor the existing qcom_cpufreq_hw_get() function so that qcom_cpufreq_hw_recalc_rate() can make use of the existing code and avoid code duplication. This also requires setting the qcom_cpufreq_data::policy even if LMh IRQ is not available. Fixes: 4370232c ("cpufreq: qcom-hw: Add CPU clock provider support") Signed-off-by:Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by:
Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by:
Sasha Levin <sashal@kernel.org> (cherry picked from commit f757327c4ce69f9d654aa43889c8c14035090d14) Signed-off-by:
Wentao Guan <guanwentao@uniontech.com>