aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorLukasz Luba <lukasz.luba@arm.com>2021-11-09 19:57:14 +0000
committerViresh Kumar <viresh.kumar@linaro.org>2021-11-23 15:10:26 +0530
commit7e97b3dc2556743dd02612c92a8de7026e8d7dc9 (patch)
treee3eb4ab081ec776552357d9a48b5f8033d87cf77 /drivers/base
parentcpufreq: qcom-cpufreq-hw: Use new thermal pressure update function (diff)
downloadlinux-dev-7e97b3dc2556743dd02612c92a8de7026e8d7dc9.tar.xz
linux-dev-7e97b3dc2556743dd02612c92a8de7026e8d7dc9.zip
arch_topology: Remove unused topology_set_thermal_pressure() and related
There is no need of this function (and related) since code has been converted to use the new arch_update_thermal_pressure() API. The old code can be removed. Signed-off-by: Lukasz Luba <lukasz.luba@arm.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/arch_topology.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c
index a3ae0b4eea09..976154140f0b 100644
--- a/drivers/base/arch_topology.c
+++ b/drivers/base/arch_topology.c
@@ -156,16 +156,6 @@ void topology_set_cpu_scale(unsigned int cpu, unsigned long capacity)
DEFINE_PER_CPU(unsigned long, thermal_pressure);
-void topology_set_thermal_pressure(const struct cpumask *cpus,
- unsigned long th_pressure)
-{
- int cpu;
-
- for_each_cpu(cpu, cpus)
- WRITE_ONCE(per_cpu(thermal_pressure, cpu), th_pressure);
-}
-EXPORT_SYMBOL_GPL(topology_set_thermal_pressure);
-
/**
* topology_update_thermal_pressure() - Update thermal pressure for CPUs
* @cpus : The related CPUs for which capacity has been reduced
@@ -183,7 +173,7 @@ EXPORT_SYMBOL_GPL(topology_set_thermal_pressure);
void topology_update_thermal_pressure(const struct cpumask *cpus,
unsigned long capped_freq)
{
- unsigned long max_capacity, capacity;
+ unsigned long max_capacity, capacity, th_pressure;
u32 max_freq;
int cpu;
@@ -203,7 +193,10 @@ void topology_update_thermal_pressure(const struct cpumask *cpus,
else
capacity = mult_frac(max_capacity, capped_freq, max_freq);
- arch_set_thermal_pressure(cpus, max_capacity - capacity);
+ th_pressure = max_capacity - capacity;
+
+ for_each_cpu(cpu, cpus)
+ WRITE_ONCE(per_cpu(thermal_pressure, cpu), th_pressure);
}
EXPORT_SYMBOL_GPL(topology_update_thermal_pressure);