summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLukasz Luba <lukasz.luba@arm.com>2021-11-09 20:57:10 +0100
committerViresh Kumar <viresh.kumar@linaro.org>2021-11-23 10:40:26 +0100
commitc214f124161d446b340597e7c968e0a2dc149142 (patch)
treee3421d0fd8a1b0d91c8e5609aaadf3a44d8f129f /arch
parentLinux 5.16-rc1 (diff)
downloadlinux-c214f124161d446b340597e7c968e0a2dc149142.tar.xz
linux-c214f124161d446b340597e7c968e0a2dc149142.zip
arch_topology: Introduce thermal pressure update function
The thermal pressure is a mechanism which is used for providing information about reduced CPU performance to the scheduler. Usually code has to convert the value from frequency units into capacity units, which are understandable by the scheduler. Create a common conversion code which can be just used via a handy API. Internally, the topology_update_thermal_pressure() operates on frequency in MHz and max CPU frequency is taken from 'freq_factor' (per-cpu). Signed-off-by: Lukasz Luba <lukasz.luba@arm.com> Reviewed-by: Thara Gopinath <thara.gopinath@linaro.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/include/asm/topology.h1
-rw-r--r--arch/arm64/include/asm/topology.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/include/asm/topology.h b/arch/arm/include/asm/topology.h
index 470299ee2fba..f1eafacc9a30 100644
--- a/arch/arm/include/asm/topology.h
+++ b/arch/arm/include/asm/topology.h
@@ -24,6 +24,7 @@
/* Replace task scheduler's default thermal pressure API */
#define arch_scale_thermal_pressure topology_get_thermal_pressure
#define arch_set_thermal_pressure topology_set_thermal_pressure
+#define arch_update_thermal_pressure topology_update_thermal_pressure
#else
diff --git a/arch/arm64/include/asm/topology.h b/arch/arm64/include/asm/topology.h
index ec2db3419c41..7a421cbc99ed 100644
--- a/arch/arm64/include/asm/topology.h
+++ b/arch/arm64/include/asm/topology.h
@@ -33,6 +33,7 @@ void update_freq_counters_refs(void);
/* Replace task scheduler's default thermal pressure API */
#define arch_scale_thermal_pressure topology_get_thermal_pressure
#define arch_set_thermal_pressure topology_set_thermal_pressure
+#define arch_update_thermal_pressure topology_update_thermal_pressure
#include <asm-generic/topology.h>