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 <quic_viveka@quicinc.com>
Signed-off-by: Mike Tipton <quic_mdtipton@quicinc.com>
This commit is contained in:
Vivek Aknurwar 2022-03-09 19:08:59 -08:00 committed by Mike Tipton
parent 6d360fbe4b
commit 0785922904

View File

@ -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;
}