[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-5bd0988be12733a42a1a3d50e3e2ddfd79e57518@git.kernel.org>
Date: Tue, 11 Dec 2018 07:32:33 -0800
From: tip-bot for Quentin Perret <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: quentin.perret@....com, tglx@...utronix.de, peterz@...radead.org,
linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
efault@....de, hpa@...or.com, mingo@...nel.org
Subject: [tip:sched/core] sched/topology: Relocate arch_scale_cpu_capacity()
to the internal header
Commit-ID: 5bd0988be12733a42a1a3d50e3e2ddfd79e57518
Gitweb: https://git.kernel.org/tip/5bd0988be12733a42a1a3d50e3e2ddfd79e57518
Author: Quentin Perret <quentin.perret@....com>
AuthorDate: Mon, 3 Dec 2018 09:56:14 +0000
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Tue, 11 Dec 2018 15:16:58 +0100
sched/topology: Relocate arch_scale_cpu_capacity() to the internal header
By default, arch_scale_cpu_capacity() is only visible from within the
kernel/sched folder. Relocate it to include/linux/sched/topology.h to
make it visible to other clients needing to know about the capacity of
CPUs, such as the Energy Model framework.
This also shrinks the <linux/sched/topology.h> public header.
Signed-off-by: Quentin Perret <quentin.perret@....com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Mike Galbraith <efault@....de>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: adharmap@...eaurora.org
Cc: chris.redpath@....com
Cc: currojerez@...eup.net
Cc: dietmar.eggemann@....com
Cc: edubezval@...il.com
Cc: gregkh@...uxfoundation.org
Cc: javi.merino@...nel.org
Cc: joel@...lfernandes.org
Cc: juri.lelli@...hat.com
Cc: morten.rasmussen@....com
Cc: patrick.bellasi@....com
Cc: pkondeti@...eaurora.org
Cc: rjw@...ysocki.net
Cc: skannan@...eaurora.org
Cc: smuckle@...gle.com
Cc: srinivas.pandruvada@...ux.intel.com
Cc: thara.gopinath@...aro.org
Cc: tkjos@...gle.com
Cc: valentin.schneider@....com
Cc: vincent.guittot@...aro.org
Cc: viresh.kumar@...aro.org
Link: https://lkml.kernel.org/r/20181203095628.11858-2-quentin.perret@arm.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
include/linux/sched/topology.h | 16 ++++++++++++++++
kernel/sched/sched.h | 18 ------------------
2 files changed, 16 insertions(+), 18 deletions(-)
diff --git a/include/linux/sched/topology.h b/include/linux/sched/topology.h
index 7fa0bc17cd8c..c31d3a47a47c 100644
--- a/include/linux/sched/topology.h
+++ b/include/linux/sched/topology.h
@@ -201,6 +201,14 @@ extern void set_sched_topology(struct sched_domain_topology_level *tl);
# define SD_INIT_NAME(type)
#endif
+#ifndef arch_scale_cpu_capacity
+static __always_inline
+unsigned long arch_scale_cpu_capacity(struct sched_domain *sd, int cpu)
+{
+ return SCHED_CAPACITY_SCALE;
+}
+#endif
+
#else /* CONFIG_SMP */
struct sched_domain_attr;
@@ -216,6 +224,14 @@ static inline bool cpus_share_cache(int this_cpu, int that_cpu)
return true;
}
+#ifndef arch_scale_cpu_capacity
+static __always_inline
+unsigned long arch_scale_cpu_capacity(void __always_unused *sd, int cpu)
+{
+ return SCHED_CAPACITY_SCALE;
+}
+#endif
+
#endif /* !CONFIG_SMP */
static inline int task_node(const struct task_struct *p)
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index ceb896404869..66067152a831 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -1859,24 +1859,6 @@ unsigned long arch_scale_freq_capacity(int cpu)
}
#endif
-#ifdef CONFIG_SMP
-#ifndef arch_scale_cpu_capacity
-static __always_inline
-unsigned long arch_scale_cpu_capacity(struct sched_domain *sd, int cpu)
-{
- return SCHED_CAPACITY_SCALE;
-}
-#endif
-#else
-#ifndef arch_scale_cpu_capacity
-static __always_inline
-unsigned long arch_scale_cpu_capacity(void __always_unused *sd, int cpu)
-{
- return SCHED_CAPACITY_SCALE;
-}
-#endif
-#endif
-
#ifdef CONFIG_SMP
#ifdef CONFIG_PREEMPT
Powered by blists - more mailing lists