From f0b3f4cd929ace7a8561f30d872562306620cb66 Mon Sep 17 00:00:00 2001 From: Pierre Gondois Date: Mon, 4 Jul 2022 13:27:37 +0200 Subject: [PATCH] cpufreq: qcom-hw: Disable LMH irq when disabling policy If LMH (Limits Management Hardware) is available, when a policy is disabled by unplugging the last online CPU of policy->cpus, the LMH irq is left enabled. When the policy is re-enabled with any of the CPU in policy->cpus being plugged in, qcom_cpufreq_ready() re-enables the irq. This triggers the following warning: [ 379.160106] Unbalanced enable for IRQ 154 [ 379.160120] WARNING: CPU: 7 PID: 48 at kernel/irq/manage.c:774 __enable_irq+0x84/0xc0 Thus disable the irq. Change-Id: I8cd8bec4c6039061c2efb20140b8fb3d3c941e79 Signed-off-by: Pierre Gondois Signed-off-by: Viresh Kumar Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git Git-commit: f7fca54a18990ab465a6d530aadb90769ded1707 Signed-off-by: Mike Tipton --- drivers/cpufreq/qcom-cpufreq-hw.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c index 63ca2d7676f0..b9e62f92e4ce 100644 --- a/drivers/cpufreq/qcom-cpufreq-hw.c +++ b/drivers/cpufreq/qcom-cpufreq-hw.c @@ -543,6 +543,7 @@ static int qcom_cpufreq_hw_cpu_offline(struct cpufreq_policy *policy) cancel_delayed_work_sync(&data->throttle_work); irq_set_affinity_hint(data->throttle_irq, NULL); + disable_irq_nosync(data->throttle_irq); arch_update_thermal_pressure(policy->related_cpus, U32_MAX); trace_dcvsh_throttle(cpumask_first(policy->related_cpus), 0);