arch_topology: Rename freq_scale as arch_freq_scale
authorViresh Kumar <viresh.kumar@linaro.org>
Wed, 10 Mar 2021 02:46:40 +0000 (08:16 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Wed, 10 Mar 2021 05:25:37 +0000 (10:55 +0530)
Rename freq_scale to a less generic name, as it will get exported soon
for modules. Since x86 already names its own implementation of this as
arch_freq_scale, lets stick to that.

Suggested-by: Will Deacon <will@kernel.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
arch/arm64/kernel/topology.c
drivers/base/arch_topology.c
include/linux/arch_topology.h

index e08a4126453a2ce50f150d0ec95ce0d868fb26dd..aa8d893619ed33e49a9b44808f15678ed2442997 100644 (file)
@@ -256,8 +256,8 @@ static int init_amu_fie_callback(struct notifier_block *nb, unsigned long val,
         * initialized AMU support and enabled invariance. The AMU counters will
         * keep on working just fine in the absence of the cpufreq driver, and
         * for the CPUs for which there are no counters available, the last set
-        * value of freq_scale will remain valid as that is the frequency those
-        * CPUs are running at.
+        * value of arch_freq_scale will remain valid as that is the frequency
+        * those CPUs are running at.
         */
 
        return 0;
@@ -327,7 +327,7 @@ void topology_scale_freq_tick(void)
                          const_cnt - prev_const_cnt);
 
        scale = min_t(unsigned long, scale, SCHED_CAPACITY_SCALE);
-       this_cpu_write(freq_scale, (unsigned long)scale);
+       this_cpu_write(arch_freq_scale, (unsigned long)scale);
 }
 
 #ifdef CONFIG_ACPI_CPPC_LIB
index de8587cc119e86e097538a091593a68bdd15b6ef..2a1cecbde0a406c04cb030160ef98293cfa54112 100644 (file)
@@ -31,7 +31,7 @@ __weak bool arch_freq_counters_available(const struct cpumask *cpus)
 {
        return false;
 }
-DEFINE_PER_CPU(unsigned long, freq_scale) = SCHED_CAPACITY_SCALE;
+DEFINE_PER_CPU(unsigned long, arch_freq_scale) = SCHED_CAPACITY_SCALE;
 
 void topology_set_freq_scale(const struct cpumask *cpus, unsigned long cur_freq,
                             unsigned long max_freq)
@@ -53,7 +53,7 @@ void topology_set_freq_scale(const struct cpumask *cpus, unsigned long cur_freq,
        scale = (cur_freq << SCHED_CAPACITY_SHIFT) / max_freq;
 
        for_each_cpu(i, cpus)
-               per_cpu(freq_scale, i) = scale;
+               per_cpu(arch_freq_scale, i) = scale;
 }
 
 DEFINE_PER_CPU(unsigned long, cpu_scale) = SCHED_CAPACITY_SCALE;
index 0f6cd6b73a61372c61eac5ad42222f332438999f..583af517f12302cef65ec0fd8f9e96f6f0a49583 100644 (file)
@@ -23,11 +23,11 @@ static inline unsigned long topology_get_cpu_scale(int cpu)
 
 void topology_set_cpu_scale(unsigned int cpu, unsigned long capacity);
 
-DECLARE_PER_CPU(unsigned long, freq_scale);
+DECLARE_PER_CPU(unsigned long, arch_freq_scale);
 
 static inline unsigned long topology_get_freq_scale(int cpu)
 {
-       return per_cpu(freq_scale, cpu);
+       return per_cpu(arch_freq_scale, cpu);
 }
 
 void topology_set_freq_scale(const struct cpumask *cpus, unsigned long cur_freq,