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:Bjorn Andersson <bjorn.andersson@linaro.org> Message-Id: <20220118185612.2067031-1-bjorn.andersson@linaro.org> Signed-off-by:
Vinod Koul <vkoul@kernel.org> [db: rebased the patch on top of other cpufreq changes] Signed-off-by:
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Loading
Please sign in to comment