sched/headers: Prepare to remove the <linux/mm_types.h> dependency from <linux/sched.h>

Update code that relied on sched.h including various MM types for them.

This will allow us to remove the <linux/mm_types.h> include from <linux/sched.h>.

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>
This commit is contained in:
Ingo Molnar 2017-02-04 00:16:44 +01:00
parent 2e58f173ab
commit 589ee62844
89 changed files with 125 additions and 25 deletions

View File

@ -15,6 +15,7 @@
#ifdef __KERNEL__
#include <linux/user.h>
#include <linux/mm_types.h>
/*
* Fill in the user structure for an ECOFF core dump.

View File

@ -7,6 +7,8 @@
* Copyright (C) 1996, Linus Torvalds
*/
#include <linux/mm_types.h>
#include <asm/machvec.h>
#include <asm/compiler.h>
#include <asm-generic/mm_hooks.h>

View File

@ -53,6 +53,8 @@
#include <linux/module.h>
#include <linux/bug.h>
#include <linux/mm_types.h>
#include <asm/arcregs.h>
#include <asm/setup.h>
#include <asm/mmu_context.h>

View File

@ -15,7 +15,9 @@
#include <linux/compiler.h>
#include <linux/sched.h>
#include <linux/mm_types.h>
#include <linux/preempt.h>
#include <asm/cacheflush.h>
#include <asm/cachetype.h>
#include <asm/proc-fns.h>

View File

@ -10,6 +10,10 @@
#ifndef _ASMARM_TLBFLUSH_H
#define _ASMARM_TLBFLUSH_H
#ifndef __ASSEMBLY__
# include <linux/mm_types.h>
#endif
#ifdef CONFIG_MMU
#include <asm/glue.h>
@ -644,9 +648,6 @@ static inline void update_mmu_cache(struct vm_area_struct *vma,
#elif defined(CONFIG_SMP) /* !CONFIG_MMU */
#ifndef __ASSEMBLY__
#include <linux/mm_types.h>
static inline void local_flush_tlb_all(void) { }
static inline void local_flush_tlb_mm(struct mm_struct *mm) { }
static inline void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr) { }

View File

@ -1,5 +1,6 @@
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/mm_types.h>
#include <asm/cacheflush.h>
#include <asm/idmap.h>

View File

@ -23,6 +23,7 @@
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/sched.h>
#include <linux/sched/mm.h>
#include <linux/syscalls.h>
#include <linux/perf_event.h>

View File

@ -1,6 +1,7 @@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/mm_types.h>
#include <asm/cputype.h>
#include <asm/idmap.h>

View File

@ -26,6 +26,7 @@
#include <linux/compiler.h>
#include <linux/sched.h>
#include <linux/sched/hotplug.h>
#include <linux/mm_types.h>
#include <asm/cacheflush.h>
#include <asm/cpufeature.h>

View File

@ -33,6 +33,7 @@
#include <linux/sched/debug.h>
#include <linux/sched/task_stack.h>
#include <linux/syscalls.h>
#include <linux/mm_types.h>
#include <asm/atomic.h>
#include <asm/bug.h>

View File

@ -12,6 +12,8 @@
#ifndef __ASM_AVR32_MMU_CONTEXT_H
#define __ASM_AVR32_MMU_CONTEXT_H
#include <linux/mm_types.h>
#include <asm/tlbflush.h>
#include <asm/sysreg.h>
#include <asm-generic/mm_hooks.h>

View File

@ -9,6 +9,8 @@
#include <linux/slab.h>
#include <linux/sched.h>
#include <linux/mm_types.h>
#include <asm/setup.h>
#include <asm/page.h>
#include <asm/pgalloc.h>

View File

@ -6,6 +6,7 @@
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/mm_types.h>
#include <linux/flat.h>
#define FLAT_BFIN_RELOC_TYPE_16_BIT 0

View File

@ -15,6 +15,7 @@
#include <linux/sched/debug.h>
#include <linux/sched/task.h>
#include <linux/sched/task_stack.h>
#include <linux/mm_types.h>
#include <linux/tick.h>
#include <linux/fs.h>
#include <linux/err.h>

View File

@ -19,6 +19,8 @@
#include <linux/spinlock.h>
#include <linux/rtc.h>
#include <linux/slab.h>
#include <linux/mm_types.h>
#include <asm/blackfin.h>
#include <asm/mem_map.h>
#include "blackfin_sram.h"

View File

@ -10,6 +10,8 @@
*
*/
#include <linux/mm_types.h>
#include <asm/tlb.h>
#include <asm/mmu_context.h>
#include <arch/svinto.h>

View File

@ -6,6 +6,7 @@
* Authors: Bjorn Wesen <bjornw@axis.com>
* Tobias Anderberg <tobiasa@axis.com>, CRISv32 port.
*/
#include <linux/mm_types.h>
#include <asm/tlb.h>
#include <asm/mmu_context.h>

View File

@ -9,7 +9,7 @@
#include <asm-generic/pgtable-nopmd.h>
#ifndef __ASSEMBLY__
#include <linux/sched.h>
#include <linux/sched/mm.h>
#include <asm/mmu.h>
#endif
#include <arch/pgtable.h>

View File

@ -9,6 +9,8 @@
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/mm_types.h>
#include <asm/tlb.h>
#define D(x)

View File

@ -17,6 +17,7 @@
#include <linux/types.h>
#include <linux/sched.h>
#include <linux/sched/debug.h>
#include <linux/mm_types.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/init.h>

View File

@ -21,6 +21,8 @@
#ifndef _ASM_MMU_CONTEXT_H
#define _ASM_MMU_CONTEXT_H
#include <linux/mm_types.h>
#include <asm/setup.h>
#include <asm/page.h>
#include <asm/pgalloc.h>

View File

@ -29,6 +29,7 @@
#include <linux/smp.h>
#include <linux/spinlock.h>
#include <linux/cpu.h>
#include <linux/mm_types.h>
#include <asm/time.h> /* timer_interrupt */
#include <asm/hexagon_vm.h>

View File

@ -26,6 +26,7 @@
#include <linux/compiler.h>
#include <linux/percpu.h>
#include <linux/sched.h>
#include <linux/mm_types.h>
#include <linux/spinlock.h>
#include <asm/processor.h>

View File

@ -147,7 +147,7 @@
# ifndef __ASSEMBLY__
#include <linux/sched.h> /* for mm_struct */
#include <linux/sched/mm.h> /* for mm_struct */
#include <linux/bitops.h>
#include <asm/cacheflush.h>
#include <asm/mmu_context.h>

View File

@ -13,6 +13,7 @@
#include <linux/spinlock.h>
#include <linux/threads.h>
#include <linux/sched.h>
#include <linux/mm_types.h>
#include <linux/smp.h>
#include <linux/interrupt.h>
#include <linux/irq.h>

View File

@ -12,6 +12,8 @@
#ifndef __ASSEMBLY__
#include <linux/atomic.h>
#include <linux/mm_types.h>
#include <asm/pgalloc.h>
#include <asm/mmu.h>
#include <asm/tlbflush.h>

View File

@ -16,6 +16,7 @@
#include <linux/user.h>
#include <linux/elfcore.h>
#include <linux/mm_types.h>
/*
* fill in the user structure for an a.out core dump

View File

@ -2,6 +2,7 @@
#define __M68K_MMU_CONTEXT_H
#include <asm-generic/mm_hooks.h>
#include <linux/mm_types.h>
static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
{

View File

@ -9,6 +9,7 @@
#include <asm/cacheflush.h>
#include <linux/io.h>
#include <linux/mm_types.h>
static inline void enter_lazy_tlb(struct mm_struct *mm,
struct task_struct *tsk)

View File

@ -12,6 +12,8 @@
#define _ASM_MICROBLAZE_MMU_CONTEXT_H
#include <linux/atomic.h>
#include <linux/mm_types.h>
#include <asm/bitops.h>
#include <asm/mmu.h>
#include <asm-generic/mm_hooks.h>

View File

@ -31,6 +31,7 @@
#include <linux/types.h>
#include <linux/vmalloc.h>
#include <linux/init.h>
#include <linux/mm_types.h>
#include <asm/pgtable.h>
#include <asm/pgalloc.h>

View File

@ -10,6 +10,8 @@
#include <linux/auxvec.h>
#include <linux/fs.h>
#include <linux/mm_types.h>
#include <uapi/linux/elf.h>
#include <asm/current.h>

View File

@ -13,8 +13,10 @@
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/mm_types.h>
#include <linux/smp.h>
#include <linux/slab.h>
#include <asm/cacheflush.h>
#include <asm/dsemul.h>
#include <asm/hazards.h>

View File

@ -28,7 +28,7 @@
#include <linux/export.h>
#include <linux/time.h>
#include <linux/timex.h>
#include <linux/sched.h>
#include <linux/sched/mm.h>
#include <linux/cpumask.h>
#include <linux/cpu.h>
#include <linux/err.h>

View File

@ -1,5 +1,6 @@
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/mm_types.h>
#include <asm/branch.h>
#include <asm/cacheflush.h>

View File

@ -12,6 +12,7 @@
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/mm_types.h>
#include <asm/cacheflush.h>
#include <asm/io.h>
#include <asm/tlbflush.h>

View File

@ -23,6 +23,8 @@
#define _ASM_MMU_CONTEXT_H
#include <linux/atomic.h>
#include <linux/mm_types.h>
#include <asm/pgalloc.h>
#include <asm/tlbflush.h>
#include <asm-generic/mm_hooks.h>

View File

@ -21,7 +21,7 @@
#include <linux/err.h>
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/sched.h>
#include <linux/sched/mm.h>
#include <linux/sched/task.h>
#include <linux/profile.h>
#include <linux/smp.h>

View File

@ -20,7 +20,7 @@
#include <linux/err.h>
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/sched.h>
#include <linux/sched/mm.h>
#include <linux/profile.h>
#include <linux/smp.h>
#include <asm/tlbflush.h>

View File

@ -13,6 +13,8 @@
#ifndef _ASM_NIOS2_MMU_CONTEXT_H
#define _ASM_NIOS2_MMU_CONTEXT_H
#include <linux/mm_types.h>
#include <asm-generic/mm_hooks.h>
extern void mmu_context_init(void);

View File

@ -17,6 +17,7 @@
#include <linux/sched/debug.h>
#include <linux/sched/task.h>
#include <linux/sched/task_stack.h>
#include <linux/mm_types.h>
#include <linux/tick.h>
#include <linux/uaccess.h>

View File

@ -12,7 +12,7 @@
#undef DEBUG
#include <linux/kernel.h>
#include <linux/sched.h> /* for init_mm */
#include <linux/sched/mm.h> /* for init_mm */
#include <asm/io.h>
#include <asm/machdep.h>

View File

@ -25,7 +25,7 @@
#include <linux/highmem.h>
#include <linux/log2.h>
#include <linux/uaccess.h>
#include <linux/sched.h>
#include <linux/sched/mm.h>
#include <linux/rwsem.h>
#include <linux/vmalloc.h>
#include <linux/hugetlb.h>

View File

@ -17,6 +17,7 @@
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/init.h>
#include <linux/sched/mm.h>
#include <asm/cputable.h>
#include <asm/code-patching.h>
#include <asm/page.h>

View File

@ -23,7 +23,7 @@
#include <linux/spinlock.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/sched/mm.h>
#include <linux/proc_fs.h>
#include <linux/stat.h>
#include <linux/sysctl.h>

View File

@ -8,6 +8,8 @@
*/
#include <linux/sched.h>
#include <linux/mm_types.h>
#include <asm/pgalloc.h>
#include <asm/tlb.h>

View File

@ -10,6 +10,8 @@
*/
#include <linux/sched.h>
#include <linux/mm_types.h>
#include <asm/pgalloc.h>
#include <asm/tlb.h>

View File

@ -8,7 +8,7 @@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#include <linux/sched.h>
#include <linux/sched/mm.h>
#include <linux/memblock.h>
#include <linux/of_fdt.h>

View File

@ -22,6 +22,8 @@
#include <asm/cacheflush.h>
#include <asm/smp.h>
#include <linux/compiler.h>
#include <linux/mm_types.h>
#include <asm/udbg.h>
#include <asm/code-patching.h>

View File

@ -132,7 +132,7 @@ typedef s390_fp_regs compat_elf_fpregset_t;
typedef s390_compat_regs compat_elf_gregset_t;
#include <linux/compat.h>
#include <linux/sched.h> /* for task_struct */
#include <linux/sched/mm.h> /* for task_struct */
#include <asm/mmu_context.h>
#include <asm/vdso.h>

View File

@ -9,6 +9,7 @@
#include <asm/pgalloc.h>
#include <linux/uaccess.h>
#include <linux/mm_types.h>
#include <asm/tlbflush.h>
#include <asm/ctl_reg.h>

View File

@ -10,6 +10,7 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/seq_file.h>
#include <linux/mm_types.h>
#include <linux/delay.h>
#include <linux/cpu.h>
#include <asm/diag.h>

View File

@ -6,7 +6,9 @@
*/
#include <linux/vmalloc.h>
#include <linux/mm_types.h>
#include <linux/err.h>
#include <asm/pgtable.h>
#include <asm/gmap.h>
#include "kvm-s390.h"

View File

@ -15,6 +15,8 @@
#include <linux/gfp.h>
#include <linux/errno.h>
#include <linux/compat.h>
#include <linux/mm_types.h>
#include <asm/asm-offsets.h>
#include <asm/facility.h>
#include <asm/current.h>

View File

@ -3,7 +3,9 @@
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/mm_types.h>
#include <linux/slab.h>
#include <asm-generic/mm_hooks.h>
#include <asm/cacheflush.h>

View File

@ -26,6 +26,7 @@
#include <linux/extable.h>
#include <linux/sched/signal.h>
#include <linux/sched/debug.h>
#include <linux/mm_types.h>
#include <asm/cacheflush.h>
#include <asm/irq.h>

View File

@ -11,6 +11,8 @@
#include <cpu/mmu_context.h>
#include <asm/tlbflush.h>
#include <linux/uaccess.h>
#include <linux/mm_types.h>
#include <asm/io.h>
#include <asm-generic/mm_hooks.h>

View File

@ -6,6 +6,8 @@
#ifndef __ASSEMBLY__
#include <linux/spinlock.h>
#include <linux/mm_types.h>
#include <asm/spitfire.h>
#include <asm-generic/mm_hooks.h>

View File

@ -878,6 +878,9 @@ static inline unsigned long pud_pfn(pud_t pud)
#define pte_offset_map pte_index
#define pte_unmap(pte) do { } while (0)
/* We cannot include <linux/mm_types.h> at this point yet: */
extern struct mm_struct init_mm;
/* Actual page table PTE updates. */
void tlb_batch_add(struct mm_struct *mm, unsigned long vaddr,
pte_t *ptep, pte_t orig, int fullmm,

View File

@ -11,6 +11,7 @@
*/
#include <linux/sched.h>
#include <linux/mm_types.h>
// #include <linux/mm.h>
#include <linux/kbuild.h>

View File

@ -11,6 +11,7 @@
#include <linux/sched.h> /* for jiffies */
#include <linux/sched/debug.h>
#include <linux/mm_types.h>
#include <linux/kernel.h>
#include <linux/signal.h>
#include <linux/smp.h>

View File

@ -6,6 +6,8 @@
#include <linux/kernel.h>
#include <linux/preempt.h>
#include <linux/slab.h>
#include <linux/mm_types.h>
#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/mmu_context.h>

View File

@ -16,6 +16,8 @@
#define _ASM_TILE_MMU_CONTEXT_H
#include <linux/smp.h>
#include <linux/mm_types.h>
#include <asm/setup.h>
#include <asm/page.h>
#include <asm/pgalloc.h>

View File

@ -7,6 +7,8 @@
#define __UM_MMU_CONTEXT_H
#include <linux/sched.h>
#include <linux/mm_types.h>
#include <asm/mmu.h>
extern void uml_setup_stubs(struct mm_struct *mm);

View File

@ -7,7 +7,7 @@
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/ptrace.h>
#include <linux/sched.h>
#include <linux/sched/mm.h>
#include <linux/sched/task.h>
#include <linux/sched/task_stack.h>
#include <linux/slab.h>

View File

@ -5,6 +5,7 @@
#include <linux/sched/signal.h>
#include <linux/sched/task.h>
#include <linux/sched/mm.h>
#include <linux/spinlock.h>
#include <linux/slab.h>
#include <linux/oom.h>

View File

@ -4,8 +4,9 @@
*/
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/sched/mm.h>
#include <linux/sched/task_stack.h>
#include <as-layout.h>
#include <kern.h>
#include <os.h>

View File

@ -28,6 +28,7 @@
#include <linux/kernel.h>
#include <linux/timer.h>
#include <linux/sched/signal.h>
#include <linux/mm_types.h>
#include <linux/syscalls.h>
#include <linux/ratelimit.h>

View File

@ -20,7 +20,7 @@
#include <linux/export.h>
#include <linux/init.h>
#include <linux/kdebug.h>
#include <linux/sched.h>
#include <linux/sched/mm.h>
#include <linux/sched/clock.h>
#include <linux/uaccess.h>
#include <linux/slab.h>

View File

@ -17,6 +17,8 @@
#include <linux/user.h>
#include <linux/elfcore.h>
#include <linux/mm_types.h>
#include <asm/debugreg.h>
/*

View File

@ -2,6 +2,8 @@
#define _ASM_X86_MPX_H
#include <linux/types.h>
#include <linux/mm_types.h>
#include <asm/ptrace.h>
#include <asm/insn.h>

View File

@ -7,6 +7,7 @@
*/
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/mm_types.h>
#include <linux/syscalls.h>
#include <linux/sched/sysctl.h>

View File

@ -6,6 +6,7 @@
*/
#include <linux/sched.h>
#include <linux/sched/mm.h>
#include <linux/uaccess.h>
#include <asm/prctl.h> /* XXX This should get the constants from libc */
#include <os.h>

View File

@ -38,7 +38,7 @@
*
* Jeremy Fitzhardinge <jeremy@xensource.com>, XenSource Inc, 2007
*/
#include <linux/sched.h>
#include <linux/sched/mm.h>
#include <linux/highmem.h>
#include <linux/debugfs.h>
#include <linux/bug.h>

View File

@ -17,6 +17,7 @@
#include <linux/stringify.h>
#include <linux/sched.h>
#include <linux/mm_types.h>
#include <asm/vectors.h>

View File

@ -23,6 +23,8 @@
#include <linux/printk.h>
#include <linux/slab.h>
#include <linux/mm_types.h>
#include "kfd_priv.h"
#include "kfd_mqd_manager.h"
#include "cik_regs.h"

View File

@ -23,6 +23,8 @@
#include <linux/printk.h>
#include <linux/slab.h>
#include <linux/mm_types.h>
#include "kfd_priv.h"
#include "kfd_mqd_manager.h"
#include "vi_structs.h"

View File

@ -37,7 +37,7 @@
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/list.h>
#include <linux/sched.h>
#include <linux/sched/mm.h>
#include <linux/spinlock.h>
#include <linux/ethtool.h>
#include <linux/rtnetlink.h>

View File

@ -37,7 +37,7 @@
#include <linux/idr.h>
#include <linux/completion.h>
#include <linux/netdevice.h>
#include <linux/sched.h>
#include <linux/sched/mm.h>
#include <linux/pci.h>
#include <linux/dma-mapping.h>
#include <linux/inet.h>

View File

@ -21,7 +21,7 @@
#include <linux/init.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/sched.h>
#include <linux/sched/mm.h>
#include <linux/slab.h>
#include <linux/interrupt.h>

View File

@ -12,7 +12,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/sched/mm.h>
#include <linux/magic.h>
#include <linux/binfmts.h>
#include <linux/slab.h>

View File

@ -13,7 +13,7 @@
#include <linux/slab.h>
#include <linux/poll.h>
#include <linux/pagemap.h>
#include <linux/sched.h>
#include <linux/sched/mm.h>
#include <linux/fsnotify.h>
#include "kernfs-internal.h"

View File

@ -40,6 +40,7 @@
#include <linux/bug.h>
#include <linux/rbtree.h>
#include <linux/kernel.h>
#include <linux/mm_types.h>
#include <linux/list.h>
#include <linux/spinlock.h>
#ifdef CONFIG_DRM_DEBUG_MM

View File

@ -15,6 +15,7 @@
#include <linux/sched/autogroup.h>
#include <net/net_namespace.h>
#include <linux/sched/rt.h>
#include <linux/mm_types.h>
#include <asm/thread_info.h>

View File

@ -2,6 +2,7 @@
#define _LINUX_SCHED_MM_H
#include <linux/sched.h>
#include <linux/mm_types.h>
#include <linux/gfp.h>
#endif /* _LINUX_SCHED_MM_H */

View File

@ -11,7 +11,7 @@
*/
#include <linux/proc_fs.h>
#include <linux/sched.h>
#include <linux/sched/mm.h>
#include <linux/seq_file.h>
#include <linux/kallsyms.h>
#include <linux/utsname.h>

View File

@ -20,7 +20,7 @@
* Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra
*/
#include <linux/sched.h>
#include <linux/sched/mm.h>
#include <linux/sched/topology.h>
#include <linux/latencytop.h>

View File

@ -13,7 +13,7 @@
#include <linux/slab.h>
#include <linux/export.h>
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/sched/mm.h>
#include <linux/sched/user.h>
#include <linux/sched/debug.h>
#include <linux/sched/task.h>

View File

@ -10,6 +10,7 @@
* 2 of the Licence, or (at your option) any later version.
*/
#include <linux/sched/signal.h>
#include <linux/sched/mm.h>
/*
* Returns true if the task does not share ->mm with another thread/process.