Skip to content

Commit

Permalink
sched/headers: Prepare to remove the <linux/mm_types.h> dependency fr…
Browse files Browse the repository at this point in the history
…om <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 <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
Ingo Molnar committed Mar 2, 2017
1 parent 2e58f17 commit 589ee62
Show file tree
Hide file tree
Showing 89 changed files with 125 additions and 25 deletions.
1 change: 1 addition & 0 deletions arch/alpha/include/asm/a.out-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions arch/alpha/include/asm/mmu_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 2 additions & 0 deletions arch/arc/mm/tlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/include/asm/mmu_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
7 changes: 4 additions & 3 deletions arch/arm/include/asm/tlbflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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) { }
Expand Down
1 change: 1 addition & 0 deletions arch/arm/kernel/suspend.c
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
1 change: 1 addition & 0 deletions arch/arm/kernel/swp_emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
1 change: 1 addition & 0 deletions arch/arm/mm/idmap.c
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/include/asm/mmu_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 2 additions & 0 deletions arch/avr32/include/asm/mmu_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 2 additions & 0 deletions arch/blackfin/include/asm/mmu_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions arch/blackfin/kernel/flat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions arch/blackfin/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 2 additions & 0 deletions arch/blackfin/mm/sram-alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions arch/cris/arch-v10/mm/tlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
*
*/

#include <linux/mm_types.h>

#include <asm/tlb.h>
#include <asm/mmu_context.h>
#include <arch/svinto.h>
Expand Down
1 change: 1 addition & 0 deletions arch/cris/arch-v32/mm/tlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Authors: Bjorn Wesen <[email protected]>
* Tobias Anderberg <[email protected]>, CRISv32 port.
*/
#include <linux/mm_types.h>

#include <asm/tlb.h>
#include <asm/mmu_context.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/cris/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 2 additions & 0 deletions arch/cris/mm/tlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/mm_types.h>

#include <asm/tlb.h>

#define D(x)
Expand Down
1 change: 1 addition & 0 deletions arch/h8300/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 2 additions & 0 deletions arch/hexagon/include/asm/mmu_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions arch/hexagon/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions arch/ia64/include/asm/mmu_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion arch/ia64/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions arch/ia64/sn/kernel/sn2/sn2_smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 2 additions & 0 deletions arch/m32r/include/asm/mmu_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions arch/m68k/include/asm/a.out-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions arch/m68k/include/asm/mmu_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
1 change: 1 addition & 0 deletions arch/metag/include/asm/mmu_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions arch/microblaze/include/asm/mmu_context_mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions arch/microblaze/mm/pgtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 2 additions & 0 deletions arch/mips/include/asm/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 2 additions & 0 deletions arch/mips/include/asm/mmu_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions arch/mips/math-emu/dsemul.c
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
1 change: 1 addition & 0 deletions arch/mips/mm/ioremap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 2 additions & 0 deletions arch/mn10300/include/asm/mmu_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion arch/mn10300/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion arch/mn10300/mm/tlb-smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 2 additions & 0 deletions arch/nios2/include/asm/mmu_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions arch/nios2/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/io-workarounds.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kvm/e500_mmu_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/lib/feature-fixups.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/mm/hash_utils_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Loading

0 comments on commit 589ee62

Please sign in to comment.