From 078592290436d0650155bc5f260f52f3af92c991 Mon Sep 17 00:00:00 2001 From: Vivek Aknurwar Date: Wed, 9 Mar 2022 19:08:59 -0800 Subject: [PATCH] cpufreq: qcom-hw: remove thermal pressure on cpu hotplugged/offline When cpu is hotplugged out, cpu stack is torn down and lmh mitigation also stops. Hence on lmh exit remove thermal pressure. This will ensure that scheduler requests higher frequency when cpu is back online again, since it's likely the CPU has cooled down in the meantime. And if it hasn't, then lmh IRQ will fire again and we'll reapply pressure. Change-Id: I0c17e8eb3b54f4c0661c730015c19b476e322770 Signed-off-by: Vivek Aknurwar Signed-off-by: Mike Tipton --- drivers/cpufreq/qcom-cpufreq-hw.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c index 98a160ec0c3f..3d077c644624 100644 --- a/drivers/cpufreq/qcom-cpufreq-hw.c +++ b/drivers/cpufreq/qcom-cpufreq-hw.c @@ -531,6 +531,8 @@ 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); + arch_update_thermal_pressure(policy->related_cpus, U32_MAX); + return 0; }