diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-02-02 12:18:24 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-03-03 01:43:39 +0100 |
commit | 4240c8bf877f1145571106a2934c5cea0b51b178 (patch) | |
tree | 65fd2ea10226eea7dea9573c9f9dd6e135391bc8 /include/linux/sched/mm.h | |
parent | 7284c6d419b5a6ae9806927f1fd4f0cfd19a16f5 (diff) | |
download | linux-4240c8bf877f1145571106a2934c5cea0b51b178.tar.gz linux-4240c8bf877f1145571106a2934c5cea0b51b178.tar.xz |
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>
Diffstat (limited to 'include/linux/sched/mm.h')
-rw-r--r-- | include/linux/sched/mm.h | 21 |
1 files changed, 21 insertions, 0 deletions
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); /* Remove the current tasks stale references to the old mm_struct */ extern void mm_release(struct task_struct *, struct mm_struct *); +#ifdef CONFIG_MEMCG +extern void mm_update_next_owner(struct mm_struct *mm); +#else +static inline void mm_update_next_owner(struct mm_struct *mm) +{ +} +#endif /* CONFIG_MEMCG */ + +#ifdef CONFIG_MMU +extern void arch_pick_mmap_layout(struct mm_struct *mm); +extern unsigned long +arch_get_unmapped_area(struct file *, unsigned long, unsigned long, + unsigned long, unsigned long); +extern unsigned long +arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr, + unsigned long len, unsigned long pgoff, + unsigned long flags); +#else +static inline void arch_pick_mmap_layout(struct mm_struct *mm) {} +#endif + #endif /* _LINUX_SCHED_MM_H */ |