OSDN Git Service

cpufreq: qcom-hw: Don't do lmh things without a throttle interrupt
authorStephen Boyd <swboyd@chromium.org>
Thu, 16 Jun 2022 22:45:31 +0000 (15:45 -0700)
committerViresh Kumar <viresh.kumar@linaro.org>
Tue, 28 Jun 2022 08:04:51 +0000 (13:34 +0530)
commit668a7a12ded7077d4fd7ad1305667e559907e5bb
treea8b10a997655a6f44294f0e7f2c3cbbc77da042d
parent4ff5a9b6d95f3524bf6d27147df497eb21968300
cpufreq: qcom-hw: Don't do lmh things without a throttle interrupt

Offlining cpu6 and cpu7 and then onlining cpu6 hangs on
sc7180-trogdor-lazor because the throttle interrupt doesn't exist.
Similarly, things go sideways when suspend/resume runs. That's because
the qcom_cpufreq_hw_cpu_online() and qcom_cpufreq_hw_lmh_exit()
functions are calling genirq APIs with an interrupt value of '-6', i.e.
-ENXIO, and that isn't good.

Check the value of the throttle interrupt like we already do in other
functions in this file and bail out early from lmh code to fix the hang.

Reported-by: Rob Clark <robdclark@chromium.org>
Cc: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Fixes: a1eb080a0447 ("cpufreq: qcom-hw: provide online/offline operations")
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/qcom-cpufreq-hw.c