diff mbox series

[V6,3/4] arch_topology: Export arch_freq_scale and helpers

Message ID 1b5c83549720da480b1e23e542f44b1edb2e4157.1615351622.git.viresh.kumar@linaro.org (mailing list archive)
State New
Delegated to: viresh kumar
Headers show
Series cpufreq: cppc: Add support for frequency invariance | expand

Commit Message

Viresh Kumar March 10, 2021, 5:23 a.m. UTC
It is possible now for other parts of the kernel to provide their own
implementation of sched_freq_tick() and they can very well be modules
themselves (like CPPC cpufreq driver, which is going to use these in a
later commit).

Export arch_freq_scale and topology_{set|clear}_scale_freq_source().

Reviewed-by: Ionela Voinescu <ionela.voinescu@arm.com>
Tested-by: Ionela Voinescu <ionela.voinescu@arm.com>
Tested-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/base/arch_topology.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Viresh Kumar March 12, 2021, 5:05 a.m. UTC | #1
On 10-03-21, 10:53, Viresh Kumar wrote:
> It is possible now for other parts of the kernel to provide their own
> implementation of sched_freq_tick() and they can very well be modules
> themselves (like CPPC cpufreq driver, which is going to use these in a
> later commit).
> 
> Export arch_freq_scale and topology_{set|clear}_scale_freq_source().
> 
> Reviewed-by: Ionela Voinescu <ionela.voinescu@arm.com>
> Tested-by: Ionela Voinescu <ionela.voinescu@arm.com>
> Tested-by: Vincent Guittot <vincent.guittot@linaro.org>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
>  drivers/base/arch_topology.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c
> index ebcd2ea3091f..995e52b9eca4 100644
> --- a/drivers/base/arch_topology.c
> +++ b/drivers/base/arch_topology.c
> @@ -78,6 +78,7 @@ void topology_set_scale_freq_source(struct scale_freq_data *data,
>  
>  	update_scale_freq_invariant(true);
>  }
> +EXPORT_SYMBOL_GPL(topology_set_scale_freq_source);
>  
>  void topology_clear_scale_freq_source(enum scale_freq_source source,
>  				      const struct cpumask *cpus)
> @@ -96,6 +97,7 @@ void topology_clear_scale_freq_source(enum scale_freq_source source,
>  
>  	update_scale_freq_invariant(false);
>  }
> +EXPORT_SYMBOL_GPL(topology_clear_scale_freq_source);
>  
>  void topology_scale_freq_tick(void)
>  {
> @@ -106,6 +108,7 @@ void topology_scale_freq_tick(void)
>  }
>  
>  DEFINE_PER_CPU(unsigned long, arch_freq_scale) = SCHED_CAPACITY_SCALE;
> +EXPORT_SYMBOL_GPL(arch_freq_scale);

Did minor change here after testing bot complaint of sparse warning.

-EXPORT_SYMBOL_GPL(arch_freq_scale);
+EXPORT_PER_CPU_SYMBOL_GPL(arch_freq_scale);
diff mbox series

Patch

diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c
index ebcd2ea3091f..995e52b9eca4 100644
--- a/drivers/base/arch_topology.c
+++ b/drivers/base/arch_topology.c
@@ -78,6 +78,7 @@  void topology_set_scale_freq_source(struct scale_freq_data *data,
 
 	update_scale_freq_invariant(true);
 }
+EXPORT_SYMBOL_GPL(topology_set_scale_freq_source);
 
 void topology_clear_scale_freq_source(enum scale_freq_source source,
 				      const struct cpumask *cpus)
@@ -96,6 +97,7 @@  void topology_clear_scale_freq_source(enum scale_freq_source source,
 
 	update_scale_freq_invariant(false);
 }
+EXPORT_SYMBOL_GPL(topology_clear_scale_freq_source);
 
 void topology_scale_freq_tick(void)
 {
@@ -106,6 +108,7 @@  void topology_scale_freq_tick(void)
 }
 
 DEFINE_PER_CPU(unsigned long, arch_freq_scale) = SCHED_CAPACITY_SCALE;
+EXPORT_SYMBOL_GPL(arch_freq_scale);
 
 void topology_set_freq_scale(const struct cpumask *cpus, unsigned long cur_freq,
 			     unsigned long max_freq)