cpufreq: qcom-hw: Fix probable nested interrupt handling
authorVladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Thu, 11 Nov 2021 15:48:07 +0000 (17:48 +0200)
committerViresh Kumar <viresh.kumar@linaro.org>
Thu, 25 Nov 2021 06:49:38 +0000 (12:19 +0530)
commite0e27c3d4e20dab861566f1c348ae44e4b498630
treeba2ad8f42411fe22b08bf4fbfbb1ebb0d384e9bd
parentbe6592ed56a7cca8a001ff339cb9325bfa3c6e3f
cpufreq: qcom-hw: Fix probable nested interrupt handling

Re-enabling an interrupt from its own interrupt handler may cause
an interrupt storm, if there is a pending interrupt and because its
handling is disabled due to already done entrance into the handler
above in the stack.

Also, apparently it is improper to lock a mutex in an interrupt contex.

Fixes: 275157b367f4 ("cpufreq: qcom-cpufreq-hw: Add dcvs interrupt support")
Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/qcom-cpufreq-hw.c