Commit b966e4d4 authored by Bjorn Andersson's avatar Bjorn Andersson Committed by Dmitry Baryshkov
Browse files

cpufreq: qcom-hw: Use initialized cpumask for thermal pressure update



In the event that the SoC is under thermal pressure while booting it's
possible for the dcvs notification to happen inbetween the cpufreq
framework calling init and it actually updating the policy's
related_cpus cpumask.

Prior to the introduction of the thermal pressure update helper an empty
cpumask would simply result in the thermal pressure of no cpus being
updated, but the new code will attempt to dereference an invalid per_cpu
variable.

Avoid this problem by using the policy's cpus cpumask instead of the
related_cpus mask, as this is initialized before the interrupt is
registered.

Fixes: 0258cb19 ("cpufreq: qcom-cpufreq-hw: Use new thermal pressure update function")
Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Message-Id: <20220118185612.2067031-1-bjorn.andersson@linaro.org>
Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
[db: rebased the patch on top of other cpufreq changes]
Signed-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
parent f8dda194
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment