aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2017-02-02 06:18:24 -0500
committerIngo Molnar <mingo@kernel.org>2017-03-02 19:43:39 -0500
commit4240c8bf877f1145571106a2934c5cea0b51b178 (patch)
tree65fd2ea10226eea7dea9573c9f9dd6e135391bc8
parent7284c6d419b5a6ae9806927f1fd4f0cfd19a16f5 (diff)
sched/headers: Move more mm_struct related functionality from <linux/sched.h> to <linux/sched/mm.h>
Neither the mmap_layout nor the mm_update_next_owner() methods need to be in <linux/sched.h> - move them to the more appropriate <linux/sched/mm.h> header. 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> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--include/linux/sched.h21
-rw-r--r--include/linux/sched/mm.h21
2 files changed, 21 insertions, 21 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index aae79706ec4f..1ddb82be6b50 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -313,19 +313,6 @@ void __noreturn do_task_dead(void);
313 313
314struct nsproxy; 314struct nsproxy;
315 315
316#ifdef CONFIG_MMU
317extern void arch_pick_mmap_layout(struct mm_struct *mm);
318extern unsigned long
319arch_get_unmapped_area(struct file *, unsigned long, unsigned long,
320 unsigned long, unsigned long);
321extern unsigned long
322arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr,
323 unsigned long len, unsigned long pgoff,
324 unsigned long flags);
325#else
326static inline void arch_pick_mmap_layout(struct mm_struct *mm) {}
327#endif
328
329/** 316/**
330 * struct prev_cputime - snaphsot of system and user cputime 317 * struct prev_cputime - snaphsot of system and user cputime
331 * @utime: time spent in user mode 318 * @utime: time spent in user mode
@@ -2280,12 +2267,4 @@ static inline void inc_syscw(struct task_struct *tsk)
2280#define TASK_SIZE_OF(tsk) TASK_SIZE 2267#define TASK_SIZE_OF(tsk) TASK_SIZE
2281#endif 2268#endif
2282 2269
2283#ifdef CONFIG_MEMCG
2284extern void mm_update_next_owner(struct mm_struct *mm);
2285#else
2286static inline void mm_update_next_owner(struct mm_struct *mm)
2287{
2288}
2289#endif /* CONFIG_MEMCG */
2290
2291#endif 2270#endif
diff --git a/include/linux/sched/mm.h b/include/linux/sched/mm.h
index be1ae55f5ab9..93fad9f0f466 100644
--- a/include/linux/sched/mm.h
+++ b/include/linux/sched/mm.h
@@ -100,4 +100,25 @@ extern struct mm_struct *mm_access(struct task_struct *task, unsigned int mode);
100/* Remove the current tasks stale references to the old mm_struct */ 100/* Remove the current tasks stale references to the old mm_struct */
101extern void mm_release(struct task_struct *, struct mm_struct *); 101extern void mm_release(struct task_struct *, struct mm_struct *);
102 102
103#ifdef CONFIG_MEMCG
104extern void mm_update_next_owner(struct mm_struct *mm);
105#else
106static inline void mm_update_next_owner(struct mm_struct *mm)
107{
108}
109#endif /* CONFIG_MEMCG */
110
111#ifdef CONFIG_MMU
112extern void arch_pick_mmap_layout(struct mm_struct *mm);
113extern unsigned long
114arch_get_unmapped_area(struct file *, unsigned long, unsigned long,
115 unsigned long, unsigned long);
116extern unsigned long
117arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr,
118 unsigned long len, unsigned long pgoff,
119 unsigned long flags);
120#else
121static inline void arch_pick_mmap_layout(struct mm_struct *mm) {}
122#endif
123
103#endif /* _LINUX_SCHED_MM_H */ 124#endif /* _LINUX_SCHED_MM_H */