mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 04:31:50 +00:00
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>
This commit is contained in:
parent
283cb90305
commit
ee6a3d19f1
@ -8,6 +8,7 @@
|
||||
*/
|
||||
#include <linux/init.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/topology.h>
|
||||
#include <linux/nodemask.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/processor.h>
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <uapi/linux/sched.h>
|
||||
|
||||
#include <linux/sched/prio.h>
|
||||
#include <linux/nodemask.h>
|
||||
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/plist.h>
|
||||
@ -21,7 +22,6 @@
|
||||
#include <linux/kcov.h>
|
||||
#include <linux/task_io_accounting.h>
|
||||
#include <linux/latencytop.h>
|
||||
#include <linux/topology.h>
|
||||
|
||||
#include <asm/current.h>
|
||||
|
||||
@ -1454,11 +1454,6 @@ static inline unsigned int task_cpu(const struct task_struct *p)
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline int task_node(const struct task_struct *p)
|
||||
{
|
||||
return cpu_to_node(task_cpu(p));
|
||||
}
|
||||
|
||||
extern void set_task_cpu(struct task_struct *p, unsigned int cpu);
|
||||
|
||||
#else
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user