[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240117104116.2055349-4-quic_sibis@quicinc.com>
Date: Wed, 17 Jan 2024 16:11:15 +0530
From: Sibi Sankar <quic_sibis@...cinc.com>
To: <sudeep.holla@....com>, <cristian.marussi@....com>, <rafael@...nel.org>,
<viresh.kumar@...aro.org>, <morten.rasmussen@....com>,
<dietmar.eggemann@....com>, <lukasz.luba@....com>
CC: <linux-arm-kernel@...ts.infradead.org>, <linux-pm@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <quic_mdtipton@...cinc.com>,
<linux-arm-msm@...r.kernel.org>, Sibi Sankar <quic_sibis@...cinc.com>
Subject: [PATCH V2 3/4] cpufreq: Export cpufreq_update_pressure
The SCMI cpufreq driver doesn't require any additional signal
smoothing provided by arch_update_hw_pressure interface, export
cpufreq_update_pressure so that it can be called upon directly
instead.
Suggested-by: Lukasz Luba <lukasz.luba@....com>
Signed-off-by: Sibi Sankar <quic_sibis@...cinc.com>
---
v2:
* Export cpufreq_update_pressure and use it directly [Lukasz]
drivers/cpufreq/cpufreq.c | 3 ++-
include/linux/cpufreq.h | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index f4eee3d107f1..c051d1719a06 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -2571,7 +2571,7 @@ DEFINE_PER_CPU(unsigned long, cpufreq_pressure);
*
* Update the value of cpufreq pressure for all @cpus in the policy.
*/
-static void cpufreq_update_pressure(struct cpufreq_policy *policy)
+void cpufreq_update_pressure(struct cpufreq_policy *policy)
{
unsigned long max_capacity, capped_freq, pressure;
u32 max_freq;
@@ -2596,6 +2596,7 @@ static void cpufreq_update_pressure(struct cpufreq_policy *policy)
for_each_cpu(cpu, policy->related_cpus)
WRITE_ONCE(per_cpu(cpufreq_pressure, cpu), pressure);
}
+EXPORT_SYMBOL(cpufreq_update_pressure);
/**
* cpufreq_set_policy - Modify cpufreq policy parameters.
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index b1d97edd3253..c6395b698863 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -241,6 +241,7 @@ struct kobject *get_governor_parent_kobj(struct cpufreq_policy *policy);
void cpufreq_enable_fast_switch(struct cpufreq_policy *policy);
void cpufreq_disable_fast_switch(struct cpufreq_policy *policy);
bool has_target_index(void);
+void cpufreq_update_pressure(struct cpufreq_policy *policy);
DECLARE_PER_CPU(unsigned long, cpufreq_pressure);
static inline unsigned long cpufreq_get_pressure(int cpu)
@@ -269,6 +270,7 @@ static inline bool cpufreq_supports_freq_invariance(void)
return false;
}
static inline void disable_cpufreq(void) { }
+static inline void cpufreq_update_pressure(struct cpufreq_policy *policy) { }
static inline unsigned long cpufreq_get_pressure(int cpu)
{
return 0;
--
2.34.1
Powered by blists - more mailing lists