aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched/topology.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2017-02-06 10:01:09 +0100
committerIngo Molnar <mingo@kernel.org>2017-03-03 01:45:41 +0100
commitee6a3d19f15b9b10075481088b8d4537f286d7b4 (patch)
treec9f47bd84824aabcd26106c617821dccaf16051a /include/linux/sched/topology.h
parentsched/headers, hrtimer: Remove the <linux/wait.h> include from <linux/hrtimer.h> (diff)
downloadlinux-dev-ee6a3d19f15b9b10075481088b8d4537f286d7b4.tar.xz
linux-dev-ee6a3d19f15b9b10075481088b8d4537f286d7b4.zip
sched/headers: Remove the <linux/topology.h> include from <linux/sched.h>
It's used only by a single (rarely used) inline function (task_node(p)), which we can move to <linux/sched/topology.h>. ( Add <linux/nodemask.h>, because we rely on that. ) Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to '')
-rw-r--r--include/linux/sched/topology.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/sched/topology.h b/include/linux/sched/topology.h
index 0d6fceff37bb..7d065abc7a47 100644
--- a/include/linux/sched/topology.h
+++ b/include/linux/sched/topology.h
@@ -1,6 +1,8 @@
#ifndef _LINUX_SCHED_TOPOLOGY_H
#define _LINUX_SCHED_TOPOLOGY_H
+#include <linux/topology.h>
+
#include <linux/sched/idle.h>
/*
@@ -216,4 +218,9 @@ static inline bool cpus_share_cache(int this_cpu, int that_cpu)
#endif /* !CONFIG_SMP */
+static inline int task_node(const struct task_struct *p)
+{
+ return cpu_to_node(task_cpu(p));
+}
+
#endif /* _LINUX_SCHED_TOPOLOGY_H */