• Bjorn Andersson's avatar
    cpufreq: qcom-hw: Delay enabling throttle_irq · ef8ee1cb
    Bjorn Andersson authored
    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: 0258cb19 ("cpufreq: qcom-cpufreq-hw: Use new thermal pressure update function")
    Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
    Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
    ef8ee1cb
qcom-cpufreq-hw.c 16 KB