]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: qcom-hw: Delay enabling throttle_irq
authorBjorn Andersson <bjorn.andersson@linaro.org>
Fri, 28 Jan 2022 03:25:54 +0000 (19:25 -0800)
committerViresh Kumar <viresh.kumar@linaro.org>
Wed, 9 Feb 2022 07:48:49 +0000 (13:18 +0530)
commit824aa12f5506726326c8dab38792242325c5158d
tree005a02244cc4753b973132bf86610628fd200d33
parent9cc23f56ba7ef0e42c5577b8adc16ffdb62abb74
cpufreq: qcom-hw: Delay enabling throttle_irq

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 newly reintroduced "ready" callback, to
postpone enabling the IRQ until the related_cpus cpumask is filled in.

Fixes: 98e1321ce79a ("cpufreq: qcom-cpufreq-hw: Use new thermal pressure update function")
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/qcom-cpufreq-hw.c