summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorValentin Schneider <valentin.schneider@arm.com>2020-09-01 22:55:48 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2020-09-18 19:11:04 +0200
commitecddc3a0d5d752071c627aa1a1d4d7b529ddae67 (patch)
tree6f78161e6532d039b17d304046e4180ab7831830 /include
parentcpufreq: report whether cpufreq supports Frequency Invariance (FI) (diff)
downloadlinux-ecddc3a0d5d752071c627aa1a1d4d7b529ddae67.tar.xz
linux-ecddc3a0d5d752071c627aa1a1d4d7b529ddae67.zip
arch_topology, cpufreq: constify arch_* cpumasks
The passed cpumask arguments to arch_set_freq_scale() and arch_freq_counters_available() are only iterated over, so reflect this in the prototype. This also allows to pass system cpumasks like cpu_online_mask without getting a warning. Signed-off-by: Valentin Schneider <valentin.schneider@arm.com> Signed-off-by: Ionela Voinescu <ionela.voinescu@arm.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/arch_topology.h2
-rw-r--r--include/linux/cpufreq.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/arch_topology.h b/include/linux/arch_topology.h
index 69b1dabe39dc..810c83336257 100644
--- a/include/linux/arch_topology.h
+++ b/include/linux/arch_topology.h
@@ -30,7 +30,7 @@ static inline unsigned long topology_get_freq_scale(int cpu)
return per_cpu(freq_scale, cpu);
}
-bool arch_freq_counters_available(struct cpumask *cpus);
+bool arch_freq_counters_available(const struct cpumask *cpus);
DECLARE_PER_CPU(unsigned long, thermal_pressure);
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index e54767e2a68a..9f779fbdbe7b 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -1011,7 +1011,8 @@ static inline void sched_cpufreq_governor_change(struct cpufreq_policy *policy,
extern void arch_freq_prepare_all(void);
extern unsigned int arch_freq_get_on_cpu(int cpu);
-extern void arch_set_freq_scale(struct cpumask *cpus, unsigned long cur_freq,
+extern void arch_set_freq_scale(const struct cpumask *cpus,
+ unsigned long cur_freq,
unsigned long max_freq);
/* the following are really really optional */