diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-03-03 13:16:38 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-03-03 13:16:38 -0500 |
commit | 1827adb11ad26b2290dc9fe2aaf54976b2439865 (patch) | |
tree | e55db5fd2fa1241a586b5688ba3a88e4eae15d6f | |
parent | 78769912f680fc0a79a67e798a0ae76f07e63a7b (diff) | |
parent | 5eca1c10cbaa9c366c18ca79f81f21c731e3dcc7 (diff) |
Merge branch 'WIP.sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull sched.h split-up from Ingo Molnar:
"The point of these changes is to significantly reduce the
<linux/sched.h> header footprint, to speed up the kernel build and to
have a cleaner header structure.
After these changes the new <linux/sched.h>'s typical preprocessed
size goes down from a previous ~0.68 MB (~22K lines) to ~0.45 MB (~15K
lines), which is around 40% faster to build on typical configs.
Not much changed from the last version (-v2) posted three weeks ago: I
eliminated quirks, backmerged fixes plus I rebased it to an upstream
SHA1 from yesterday that includes most changes queued up in -next plus
all sched.h changes that were pending from Andrew.
I've re-tested the series both on x86 and on cross-arch defconfigs,
and did a bisectability test at a number of random points.
I tried to test as many build configurations as possible, but some
build breakage is probably still left - but it should be mostly
limited to architectures that have no cross-compiler binaries
available on kernel.org, and non-default configurations"
* 'WIP.sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (146 commits)
sched/headers: Clean up <linux/sched.h>
sched/headers: Remove #ifdefs from <linux/sched.h>
sched/headers: Remove the <linux/topology.h> include from <linux/sched.h>
sched/headers, hrtimer: Remove the <linux/wait.h> include from <linux/hrtimer.h>
sched/headers, x86/apic: Remove the <linux/pm.h> header inclusion from <asm/apic.h>
sched/headers, timers: Remove the <linux/sysctl.h> include from <linux/timer.h>
sched/headers: Remove <linux/magic.h> from <linux/sched/task_stack.h>
sched/headers: Remove <linux/sched.h> from <linux/sched/init.h>
sched/core: Remove unused prefetch_stack()
sched/headers: Remove <linux/rculist.h> from <linux/sched.h>
sched/headers: Remove the 'init_pid_ns' prototype from <linux/sched.h>
sched/headers: Remove <linux/signal.h> from <linux/sched.h>
sched/headers: Remove <linux/rwsem.h> from <linux/sched.h>
sched/headers: Remove the runqueue_is_locked() prototype
sched/headers: Remove <linux/sched.h> from <linux/sched/hotplug.h>
sched/headers: Remove <linux/sched.h> from <linux/sched/debug.h>
sched/headers: Remove <linux/sched.h> from <linux/sched/nohz.h>
sched/headers: Remove <linux/sched.h> from <linux/sched/stat.h>
sched/headers: Remove the <linux/gfp.h> include from <linux/sched.h>
sched/headers: Remove <linux/rtmutex.h> from <linux/sched.h>
...
1218 files changed, 5226 insertions, 3575 deletions
diff --git a/arch/alpha/include/asm/a.out-core.h b/arch/alpha/include/asm/a.out-core.h index 9e33e92e524c..1610d078b064 100644 --- a/arch/alpha/include/asm/a.out-core.h +++ b/arch/alpha/include/asm/a.out-core.h | |||
@@ -15,6 +15,7 @@ | |||
15 | #ifdef __KERNEL__ | 15 | #ifdef __KERNEL__ |
16 | 16 | ||
17 | #include <linux/user.h> | 17 | #include <linux/user.h> |
18 | #include <linux/mm_types.h> | ||
18 | 19 | ||
19 | /* | 20 | /* |
20 | * Fill in the user structure for an ECOFF core dump. | 21 | * Fill in the user structure for an ECOFF core dump. |
diff --git a/arch/alpha/include/asm/mmu_context.h b/arch/alpha/include/asm/mmu_context.h index 4c51c05333c6..384bd47b5187 100644 --- a/arch/alpha/include/asm/mmu_context.h +++ b/arch/alpha/include/asm/mmu_context.h | |||
@@ -7,6 +7,8 @@ | |||
7 | * Copyright (C) 1996, Linus Torvalds | 7 | * Copyright (C) 1996, Linus Torvalds |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/mm_types.h> | ||
11 | |||
10 | #include <asm/machvec.h> | 12 | #include <asm/machvec.h> |
11 | #include <asm/compiler.h> | 13 | #include <asm/compiler.h> |
12 | #include <asm-generic/mm_hooks.h> | 14 | #include <asm-generic/mm_hooks.h> |
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index 9d27a7d333dc..0b961093ca5c 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c | |||
@@ -11,7 +11,10 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched/signal.h> |
15 | #include <linux/sched/mm.h> | ||
16 | #include <linux/sched/task_stack.h> | ||
17 | #include <linux/sched/cputime.h> | ||
15 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
16 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
17 | #include <linux/smp.h> | 20 | #include <linux/smp.h> |
diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c index bca963a4aa48..0b9635040721 100644 --- a/arch/alpha/kernel/process.c +++ b/arch/alpha/kernel/process.c | |||
@@ -11,6 +11,9 @@ | |||
11 | #include <linux/errno.h> | 11 | #include <linux/errno.h> |
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/sched/debug.h> | ||
15 | #include <linux/sched/task.h> | ||
16 | #include <linux/sched/task_stack.h> | ||
14 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
15 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
16 | #include <linux/smp.h> | 19 | #include <linux/smp.h> |
diff --git a/arch/alpha/kernel/ptrace.c b/arch/alpha/kernel/ptrace.c index bc4d2cdcf21d..285a82d491ef 100644 --- a/arch/alpha/kernel/ptrace.c +++ b/arch/alpha/kernel/ptrace.c | |||
@@ -6,6 +6,7 @@ | |||
6 | 6 | ||
7 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
8 | #include <linux/sched.h> | 8 | #include <linux/sched.h> |
9 | #include <linux/sched/task_stack.h> | ||
9 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
10 | #include <linux/smp.h> | 11 | #include <linux/smp.h> |
11 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
diff --git a/arch/alpha/kernel/signal.c b/arch/alpha/kernel/signal.c index 17308f925306..8129dd92cadc 100644 --- a/arch/alpha/kernel/signal.c +++ b/arch/alpha/kernel/signal.c | |||
@@ -6,7 +6,8 @@ | |||
6 | * 1997-11-02 Modified for POSIX.1b signals by Richard Henderson | 6 | * 1997-11-02 Modified for POSIX.1b signals by Richard Henderson |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/sched.h> | 9 | #include <linux/sched/signal.h> |
10 | #include <linux/sched/task_stack.h> | ||
10 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
11 | #include <linux/signal.h> | 12 | #include <linux/signal.h> |
12 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c index acb4b146a607..9fc560459ebd 100644 --- a/arch/alpha/kernel/smp.c +++ b/arch/alpha/kernel/smp.c | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/kernel_stat.h> | 15 | #include <linux/kernel_stat.h> |
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/sched.h> | 17 | #include <linux/sched/mm.h> |
18 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
19 | #include <linux/err.h> | 19 | #include <linux/err.h> |
20 | #include <linux/threads.h> | 20 | #include <linux/threads.h> |
diff --git a/arch/alpha/kernel/traps.c b/arch/alpha/kernel/traps.c index af2994206b4b..b137390e87e7 100644 --- a/arch/alpha/kernel/traps.c +++ b/arch/alpha/kernel/traps.c | |||
@@ -10,7 +10,8 @@ | |||
10 | 10 | ||
11 | #include <linux/jiffies.h> | 11 | #include <linux/jiffies.h> |
12 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
13 | #include <linux/sched.h> | 13 | #include <linux/sched/signal.h> |
14 | #include <linux/sched/debug.h> | ||
14 | #include <linux/tty.h> | 15 | #include <linux/tty.h> |
15 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
16 | #include <linux/extable.h> | 17 | #include <linux/extable.h> |
diff --git a/arch/alpha/math-emu/math.c b/arch/alpha/math-emu/math.c index fa5ae0ad8983..d17d705f6545 100644 --- a/arch/alpha/math-emu/math.c +++ b/arch/alpha/math-emu/math.c | |||
@@ -2,6 +2,7 @@ | |||
2 | #include <linux/types.h> | 2 | #include <linux/types.h> |
3 | #include <linux/kernel.h> | 3 | #include <linux/kernel.h> |
4 | #include <linux/sched.h> | 4 | #include <linux/sched.h> |
5 | #include <asm/ptrace.h> | ||
5 | 6 | ||
6 | #include <linux/uaccess.h> | 7 | #include <linux/uaccess.h> |
7 | 8 | ||
diff --git a/arch/alpha/mm/fault.c b/arch/alpha/mm/fault.c index 47948b4dd157..c25e8827e7cd 100644 --- a/arch/alpha/mm/fault.c +++ b/arch/alpha/mm/fault.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * Copyright (C) 1995 Linus Torvalds | 4 | * Copyright (C) 1995 Linus Torvalds |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/sched.h> | 7 | #include <linux/sched/signal.h> |
8 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
9 | #include <linux/mm.h> | 9 | #include <linux/mm.h> |
10 | #include <asm/io.h> | 10 | #include <asm/io.h> |
diff --git a/arch/arc/include/asm/mmu_context.h b/arch/arc/include/asm/mmu_context.h index b0b87f2447f5..64b5ebae1ae8 100644 --- a/arch/arc/include/asm/mmu_context.h +++ b/arch/arc/include/asm/mmu_context.h | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <asm/arcregs.h> | 21 | #include <asm/arcregs.h> |
22 | #include <asm/tlb.h> | 22 | #include <asm/tlb.h> |
23 | #include <linux/sched/mm.h> | ||
23 | 24 | ||
24 | #include <asm-generic/mm_hooks.h> | 25 | #include <asm-generic/mm_hooks.h> |
25 | 26 | ||
diff --git a/arch/arc/kernel/ctx_sw.c b/arch/arc/kernel/ctx_sw.c index 6f4cb0dab1b9..9e1ae9d41925 100644 --- a/arch/arc/kernel/ctx_sw.c +++ b/arch/arc/kernel/ctx_sw.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <asm/asm-offsets.h> | 17 | #include <asm/asm-offsets.h> |
18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
19 | #include <linux/sched/debug.h> | ||
19 | #ifdef CONFIG_ARC_PLAT_EZNPS | 20 | #ifdef CONFIG_ARC_PLAT_EZNPS |
20 | #include <plat/ctop.h> | 21 | #include <plat/ctop.h> |
21 | #endif | 22 | #endif |
diff --git a/arch/arc/kernel/kgdb.c b/arch/arc/kernel/kgdb.c index ecf6a7869375..9a3c34af2ae8 100644 --- a/arch/arc/kernel/kgdb.c +++ b/arch/arc/kernel/kgdb.c | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | #include <linux/kgdb.h> | 11 | #include <linux/kgdb.h> |
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/sched/task_stack.h> | ||
13 | #include <asm/disasm.h> | 14 | #include <asm/disasm.h> |
14 | #include <asm/cacheflush.h> | 15 | #include <asm/cacheflush.h> |
15 | 16 | ||
diff --git a/arch/arc/kernel/process.c b/arch/arc/kernel/process.c index a41a79a4f4fe..2a018de6d6cd 100644 --- a/arch/arc/kernel/process.c +++ b/arch/arc/kernel/process.c | |||
@@ -11,6 +11,9 @@ | |||
11 | #include <linux/errno.h> | 11 | #include <linux/errno.h> |
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/sched/task.h> | ||
15 | #include <linux/sched/task_stack.h> | ||
16 | |||
14 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
15 | #include <linux/fs.h> | 18 | #include <linux/fs.h> |
16 | #include <linux/unistd.h> | 19 | #include <linux/unistd.h> |
diff --git a/arch/arc/kernel/ptrace.c b/arch/arc/kernel/ptrace.c index 4442204fe238..31150060d38b 100644 --- a/arch/arc/kernel/ptrace.c +++ b/arch/arc/kernel/ptrace.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/ptrace.h> | 9 | #include <linux/ptrace.h> |
10 | #include <linux/tracehook.h> | 10 | #include <linux/tracehook.h> |
11 | #include <linux/sched/task_stack.h> | ||
11 | #include <linux/regset.h> | 12 | #include <linux/regset.h> |
12 | #include <linux/unistd.h> | 13 | #include <linux/unistd.h> |
13 | #include <linux/elf.h> | 14 | #include <linux/elf.h> |
diff --git a/arch/arc/kernel/signal.c b/arch/arc/kernel/signal.c index d347bbc086fe..48685445002e 100644 --- a/arch/arc/kernel/signal.c +++ b/arch/arc/kernel/signal.c | |||
@@ -53,6 +53,8 @@ | |||
53 | #include <linux/uaccess.h> | 53 | #include <linux/uaccess.h> |
54 | #include <linux/syscalls.h> | 54 | #include <linux/syscalls.h> |
55 | #include <linux/tracehook.h> | 55 | #include <linux/tracehook.h> |
56 | #include <linux/sched/task_stack.h> | ||
57 | |||
56 | #include <asm/ucontext.h> | 58 | #include <asm/ucontext.h> |
57 | 59 | ||
58 | struct rt_sigframe { | 60 | struct rt_sigframe { |
diff --git a/arch/arc/kernel/smp.c b/arch/arc/kernel/smp.c index b8e8d3944481..f46267153ec2 100644 --- a/arch/arc/kernel/smp.c +++ b/arch/arc/kernel/smp.c | |||
@@ -13,7 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched/mm.h> |
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/profile.h> | 18 | #include <linux/profile.h> |
19 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
diff --git a/arch/arc/kernel/stacktrace.c b/arch/arc/kernel/stacktrace.c index b9192a653b7e..74315f302971 100644 --- a/arch/arc/kernel/stacktrace.c +++ b/arch/arc/kernel/stacktrace.c | |||
@@ -28,6 +28,8 @@ | |||
28 | #include <linux/export.h> | 28 | #include <linux/export.h> |
29 | #include <linux/stacktrace.h> | 29 | #include <linux/stacktrace.h> |
30 | #include <linux/kallsyms.h> | 30 | #include <linux/kallsyms.h> |
31 | #include <linux/sched/debug.h> | ||
32 | |||
31 | #include <asm/arcregs.h> | 33 | #include <asm/arcregs.h> |
32 | #include <asm/unwind.h> | 34 | #include <asm/unwind.h> |
33 | #include <asm/switch_to.h> | 35 | #include <asm/switch_to.h> |
diff --git a/arch/arc/kernel/traps.c b/arch/arc/kernel/traps.c index c927aa84e652..ff83e78d0cfb 100644 --- a/arch/arc/kernel/traps.c +++ b/arch/arc/kernel/traps.c | |||
@@ -13,7 +13,7 @@ | |||
13 | * Rahul Trivedi: Codito Technologies 2004 | 13 | * Rahul Trivedi: Codito Technologies 2004 |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/sched.h> | 16 | #include <linux/sched/signal.h> |
17 | #include <linux/kdebug.h> | 17 | #include <linux/kdebug.h> |
18 | #include <linux/uaccess.h> | 18 | #include <linux/uaccess.h> |
19 | #include <linux/ptrace.h> | 19 | #include <linux/ptrace.h> |
diff --git a/arch/arc/kernel/troubleshoot.c b/arch/arc/kernel/troubleshoot.c index 82f9bc819f4a..f9caf79186d4 100644 --- a/arch/arc/kernel/troubleshoot.c +++ b/arch/arc/kernel/troubleshoot.c | |||
@@ -13,6 +13,9 @@ | |||
13 | #include <linux/fs_struct.h> | 13 | #include <linux/fs_struct.h> |
14 | #include <linux/proc_fs.h> | 14 | #include <linux/proc_fs.h> |
15 | #include <linux/file.h> | 15 | #include <linux/file.h> |
16 | #include <linux/sched/mm.h> | ||
17 | #include <linux/sched/debug.h> | ||
18 | |||
16 | #include <asm/arcregs.h> | 19 | #include <asm/arcregs.h> |
17 | #include <asm/irqflags.h> | 20 | #include <asm/irqflags.h> |
18 | 21 | ||
diff --git a/arch/arc/mm/fault.c b/arch/arc/mm/fault.c index e94e5aa33985..162c97528872 100644 --- a/arch/arc/mm/fault.c +++ b/arch/arc/mm/fault.c | |||
@@ -9,7 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/signal.h> | 10 | #include <linux/signal.h> |
11 | #include <linux/interrupt.h> | 11 | #include <linux/interrupt.h> |
12 | #include <linux/sched.h> | 12 | #include <linux/sched/signal.h> |
13 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
14 | #include <linux/ptrace.h> | 14 | #include <linux/ptrace.h> |
15 | #include <linux/uaccess.h> | 15 | #include <linux/uaccess.h> |
diff --git a/arch/arc/mm/mmap.c b/arch/arc/mm/mmap.c index 2e06d56e987b..3e25e8d6486b 100644 --- a/arch/arc/mm/mmap.c +++ b/arch/arc/mm/mmap.c | |||
@@ -13,7 +13,8 @@ | |||
13 | #include <linux/fs.h> | 13 | #include <linux/fs.h> |
14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
15 | #include <linux/mman.h> | 15 | #include <linux/mman.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched/mm.h> |
17 | |||
17 | #include <asm/cacheflush.h> | 18 | #include <asm/cacheflush.h> |
18 | 19 | ||
19 | #define COLOUR_ALIGN(addr, pgoff) \ | 20 | #define COLOUR_ALIGN(addr, pgoff) \ |
diff --git a/arch/arc/mm/tlb.c b/arch/arc/mm/tlb.c index bdb295e09160..d0126fdfe2d8 100644 --- a/arch/arc/mm/tlb.c +++ b/arch/arc/mm/tlb.c | |||
@@ -53,6 +53,8 @@ | |||
53 | 53 | ||
54 | #include <linux/module.h> | 54 | #include <linux/module.h> |
55 | #include <linux/bug.h> | 55 | #include <linux/bug.h> |
56 | #include <linux/mm_types.h> | ||
57 | |||
56 | #include <asm/arcregs.h> | 58 | #include <asm/arcregs.h> |
57 | #include <asm/setup.h> | 59 | #include <asm/setup.h> |
58 | #include <asm/mmu_context.h> | 60 | #include <asm/mmu_context.h> |
diff --git a/arch/arm/common/bL_switcher.c b/arch/arm/common/bL_switcher.c index 46730017b3c5..57f3b7512636 100644 --- a/arch/arm/common/bL_switcher.c +++ b/arch/arm/common/bL_switcher.c | |||
@@ -13,7 +13,8 @@ | |||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched/signal.h> |
17 | #include <uapi/linux/sched/types.h> | ||
17 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
18 | #include <linux/cpu_pm.h> | 19 | #include <linux/cpu_pm.h> |
19 | #include <linux/cpu.h> | 20 | #include <linux/cpu.h> |
diff --git a/arch/arm/include/asm/mmu_context.h b/arch/arm/include/asm/mmu_context.h index 3cc14dd8587c..7f303295ef19 100644 --- a/arch/arm/include/asm/mmu_context.h +++ b/arch/arm/include/asm/mmu_context.h | |||
@@ -15,7 +15,9 @@ | |||
15 | 15 | ||
16 | #include <linux/compiler.h> | 16 | #include <linux/compiler.h> |
17 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
18 | #include <linux/mm_types.h> | ||
18 | #include <linux/preempt.h> | 19 | #include <linux/preempt.h> |
20 | |||
19 | #include <asm/cacheflush.h> | 21 | #include <asm/cacheflush.h> |
20 | #include <asm/cachetype.h> | 22 | #include <asm/cachetype.h> |
21 | #include <asm/proc-fns.h> | 23 | #include <asm/proc-fns.h> |
diff --git a/arch/arm/include/asm/tlbflush.h b/arch/arm/include/asm/tlbflush.h index def9e570199f..1897b5196fb5 100644 --- a/arch/arm/include/asm/tlbflush.h +++ b/arch/arm/include/asm/tlbflush.h | |||
@@ -10,6 +10,10 @@ | |||
10 | #ifndef _ASMARM_TLBFLUSH_H | 10 | #ifndef _ASMARM_TLBFLUSH_H |
11 | #define _ASMARM_TLBFLUSH_H | 11 | #define _ASMARM_TLBFLUSH_H |
12 | 12 | ||
13 | #ifndef __ASSEMBLY__ | ||
14 | # include <linux/mm_types.h> | ||
15 | #endif | ||
16 | |||
13 | #ifdef CONFIG_MMU | 17 | #ifdef CONFIG_MMU |
14 | 18 | ||
15 | #include <asm/glue.h> | 19 | #include <asm/glue.h> |
@@ -644,9 +648,6 @@ static inline void update_mmu_cache(struct vm_area_struct *vma, | |||
644 | #elif defined(CONFIG_SMP) /* !CONFIG_MMU */ | 648 | #elif defined(CONFIG_SMP) /* !CONFIG_MMU */ |
645 | 649 | ||
646 | #ifndef __ASSEMBLY__ | 650 | #ifndef __ASSEMBLY__ |
647 | |||
648 | #include <linux/mm_types.h> | ||
649 | |||
650 | static inline void local_flush_tlb_all(void) { } | 651 | static inline void local_flush_tlb_all(void) { } |
651 | static inline void local_flush_tlb_mm(struct mm_struct *mm) { } | 652 | static inline void local_flush_tlb_mm(struct mm_struct *mm) { } |
652 | static inline void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr) { } | 653 | static inline void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr) { } |
diff --git a/arch/arm/kernel/perf_regs.c b/arch/arm/kernel/perf_regs.c index 592dda3f21ff..c366b83bf955 100644 --- a/arch/arm/kernel/perf_regs.c +++ b/arch/arm/kernel/perf_regs.c | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <linux/kernel.h> | 3 | #include <linux/kernel.h> |
4 | #include <linux/perf_event.h> | 4 | #include <linux/perf_event.h> |
5 | #include <linux/bug.h> | 5 | #include <linux/bug.h> |
6 | #include <linux/sched/task_stack.h> | ||
6 | #include <asm/perf_regs.h> | 7 | #include <asm/perf_regs.h> |
7 | #include <asm/ptrace.h> | 8 | #include <asm/ptrace.h> |
8 | 9 | ||
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 91d2d5b01414..939e8b58c59d 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -12,6 +12,9 @@ | |||
12 | 12 | ||
13 | #include <linux/export.h> | 13 | #include <linux/export.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
15 | #include <linux/sched/debug.h> | ||
16 | #include <linux/sched/task.h> | ||
17 | #include <linux/sched/task_stack.h> | ||
15 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
16 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
17 | #include <linux/stddef.h> | 20 | #include <linux/stddef.h> |
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c index ae738a6319f6..58e3771e4c5b 100644 --- a/arch/arm/kernel/ptrace.c +++ b/arch/arm/kernel/ptrace.c | |||
@@ -10,7 +10,8 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/sched.h> | 13 | #include <linux/sched/signal.h> |
14 | #include <linux/sched/task_stack.h> | ||
14 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
15 | #include <linux/elf.h> | 16 | #include <linux/elf.h> |
16 | #include <linux/smp.h> | 17 | #include <linux/smp.h> |
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 5a07c5a4b894..572a8df1b766 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -11,7 +11,9 @@ | |||
11 | #include <linux/delay.h> | 11 | #include <linux/delay.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/spinlock.h> | 13 | #include <linux/spinlock.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched/mm.h> |
15 | #include <linux/sched/hotplug.h> | ||
16 | #include <linux/sched/task_stack.h> | ||
15 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
16 | #include <linux/cache.h> | 18 | #include <linux/cache.h> |
17 | #include <linux/profile.h> | 19 | #include <linux/profile.h> |
diff --git a/arch/arm/kernel/stacktrace.c b/arch/arm/kernel/stacktrace.c index 92b72375c4c7..3a2fa203637a 100644 --- a/arch/arm/kernel/stacktrace.c +++ b/arch/arm/kernel/stacktrace.c | |||
@@ -1,5 +1,6 @@ | |||
1 | #include <linux/export.h> | 1 | #include <linux/export.h> |
2 | #include <linux/sched.h> | 2 | #include <linux/sched.h> |
3 | #include <linux/sched/debug.h> | ||
3 | #include <linux/stacktrace.h> | 4 | #include <linux/stacktrace.h> |
4 | 5 | ||
5 | #include <asm/stacktrace.h> | 6 | #include <asm/stacktrace.h> |
diff --git a/arch/arm/kernel/suspend.c b/arch/arm/kernel/suspend.c index 9a2f882a0a2d..ef794c799cb6 100644 --- a/arch/arm/kernel/suspend.c +++ b/arch/arm/kernel/suspend.c | |||
@@ -1,5 +1,6 @@ | |||
1 | #include <linux/init.h> | 1 | #include <linux/init.h> |
2 | #include <linux/slab.h> | 2 | #include <linux/slab.h> |
3 | #include <linux/mm_types.h> | ||
3 | 4 | ||
4 | #include <asm/cacheflush.h> | 5 | #include <asm/cacheflush.h> |
5 | #include <asm/idmap.h> | 6 | #include <asm/idmap.h> |
diff --git a/arch/arm/kernel/swp_emulate.c b/arch/arm/kernel/swp_emulate.c index 853221f81104..3bda08bee674 100644 --- a/arch/arm/kernel/swp_emulate.c +++ b/arch/arm/kernel/swp_emulate.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/proc_fs.h> | 23 | #include <linux/proc_fs.h> |
24 | #include <linux/seq_file.h> | 24 | #include <linux/seq_file.h> |
25 | #include <linux/sched.h> | 25 | #include <linux/sched.h> |
26 | #include <linux/sched/mm.h> | ||
26 | #include <linux/syscalls.h> | 27 | #include <linux/syscalls.h> |
27 | #include <linux/perf_event.h> | 28 | #include <linux/perf_event.h> |
28 | 29 | ||
diff --git a/arch/arm/kernel/sys_oabi-compat.c b/arch/arm/kernel/sys_oabi-compat.c index 5f221acd21ae..b9786f491873 100644 --- a/arch/arm/kernel/sys_oabi-compat.c +++ b/arch/arm/kernel/sys_oabi-compat.c | |||
@@ -76,6 +76,7 @@ | |||
76 | #include <linux/syscalls.h> | 76 | #include <linux/syscalls.h> |
77 | #include <linux/errno.h> | 77 | #include <linux/errno.h> |
78 | #include <linux/fs.h> | 78 | #include <linux/fs.h> |
79 | #include <linux/cred.h> | ||
79 | #include <linux/fcntl.h> | 80 | #include <linux/fcntl.h> |
80 | #include <linux/eventpoll.h> | 81 | #include <linux/eventpoll.h> |
81 | #include <linux/sem.h> | 82 | #include <linux/sem.h> |
diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c index ebf47d91b804..f8a3ab82e77f 100644 --- a/arch/arm/kernel/topology.c +++ b/arch/arm/kernel/topology.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/nodemask.h> | 21 | #include <linux/nodemask.h> |
22 | #include <linux/of.h> | 22 | #include <linux/of.h> |
23 | #include <linux/sched.h> | 23 | #include <linux/sched.h> |
24 | #include <linux/sched/topology.h> | ||
24 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
25 | #include <linux/string.h> | 26 | #include <linux/string.h> |
26 | 27 | ||
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 9688ec0c6ef4..948c648fea00 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -24,7 +24,9 @@ | |||
24 | #include <linux/bug.h> | 24 | #include <linux/bug.h> |
25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
27 | #include <linux/sched.h> | 27 | #include <linux/sched/signal.h> |
28 | #include <linux/sched/debug.h> | ||
29 | #include <linux/sched/task_stack.h> | ||
28 | #include <linux/irq.h> | 30 | #include <linux/irq.h> |
29 | 31 | ||
30 | #include <linux/atomic.h> | 32 | #include <linux/atomic.h> |
diff --git a/arch/arm/mach-bcm/platsmp.c b/arch/arm/mach-bcm/platsmp.c index 582886d0d02f..9e3f275934eb 100644 --- a/arch/arm/mach-bcm/platsmp.c +++ b/arch/arm/mach-bcm/platsmp.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/of.h> | 21 | #include <linux/of.h> |
22 | #include <linux/of_address.h> | 22 | #include <linux/of_address.h> |
23 | #include <linux/sched.h> | 23 | #include <linux/sched.h> |
24 | #include <linux/sched/clock.h> | ||
24 | #include <linux/smp.h> | 25 | #include <linux/smp.h> |
25 | 26 | ||
26 | #include <asm/cacheflush.h> | 27 | #include <asm/cacheflush.h> |
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c index 003a6cb248be..5c46ea6756d7 100644 --- a/arch/arm/mach-omap2/pm-debug.c +++ b/arch/arm/mach-omap2/pm-debug.c | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/sched.h> | 23 | #include <linux/sched.h> |
24 | #include <linux/sched/clock.h> | ||
24 | #include <linux/clk.h> | 25 | #include <linux/clk.h> |
25 | #include <linux/err.h> | 26 | #include <linux/err.h> |
26 | #include <linux/io.h> | 27 | #include <linux/io.h> |
diff --git a/arch/arm/mach-rpc/ecard.c b/arch/arm/mach-rpc/ecard.c index dc67a7fb3831..6b279d037774 100644 --- a/arch/arm/mach-rpc/ecard.c +++ b/arch/arm/mach-rpc/ecard.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
32 | #include <linux/types.h> | 32 | #include <linux/types.h> |
33 | #include <linux/sched.h> | 33 | #include <linux/sched.h> |
34 | #include <linux/sched/mm.h> | ||
34 | #include <linux/interrupt.h> | 35 | #include <linux/interrupt.h> |
35 | #include <linux/completion.h> | 36 | #include <linux/completion.h> |
36 | #include <linux/reboot.h> | 37 | #include <linux/reboot.h> |
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c index 7d5f4c736a16..2c96190e018b 100644 --- a/arch/arm/mm/alignment.c +++ b/arch/arm/mm/alignment.c | |||
@@ -14,12 +14,13 @@ | |||
14 | #include <linux/moduleparam.h> | 14 | #include <linux/moduleparam.h> |
15 | #include <linux/compiler.h> | 15 | #include <linux/compiler.h> |
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/sched/debug.h> | ||
17 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
18 | #include <linux/string.h> | 19 | #include <linux/string.h> |
19 | #include <linux/proc_fs.h> | 20 | #include <linux/proc_fs.h> |
20 | #include <linux/seq_file.h> | 21 | #include <linux/seq_file.h> |
21 | #include <linux/init.h> | 22 | #include <linux/init.h> |
22 | #include <linux/sched.h> | 23 | #include <linux/sched/signal.h> |
23 | #include <linux/uaccess.h> | 24 | #include <linux/uaccess.h> |
24 | 25 | ||
25 | #include <asm/cp15.h> | 26 | #include <asm/cp15.h> |
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index c2b5b9892fd1..ff8b0aa2dfde 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c | |||
@@ -16,7 +16,8 @@ | |||
16 | #include <linux/kprobes.h> | 16 | #include <linux/kprobes.h> |
17 | #include <linux/uaccess.h> | 17 | #include <linux/uaccess.h> |
18 | #include <linux/page-flags.h> | 18 | #include <linux/page-flags.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched/signal.h> |
20 | #include <linux/sched/debug.h> | ||
20 | #include <linux/highmem.h> | 21 | #include <linux/highmem.h> |
21 | #include <linux/perf_event.h> | 22 | #include <linux/perf_event.h> |
22 | 23 | ||
diff --git a/arch/arm/mm/idmap.c b/arch/arm/mm/idmap.c index c1a48f88764e..3e511bec69b8 100644 --- a/arch/arm/mm/idmap.c +++ b/arch/arm/mm/idmap.c | |||
@@ -1,6 +1,7 @@ | |||
1 | #include <linux/module.h> | 1 | #include <linux/module.h> |
2 | #include <linux/kernel.h> | 2 | #include <linux/kernel.h> |
3 | #include <linux/slab.h> | 3 | #include <linux/slab.h> |
4 | #include <linux/mm_types.h> | ||
4 | 5 | ||
5 | #include <asm/cputype.h> | 6 | #include <asm/cputype.h> |
6 | #include <asm/idmap.h> | 7 | #include <asm/idmap.h> |
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index bf4d3bc41a7a..1d8558ff9827 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -13,6 +13,8 @@ | |||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/bootmem.h> | 14 | #include <linux/bootmem.h> |
15 | #include <linux/mman.h> | 15 | #include <linux/mman.h> |
16 | #include <linux/sched/signal.h> | ||
17 | #include <linux/sched/task.h> | ||
16 | #include <linux/export.h> | 18 | #include <linux/export.h> |
17 | #include <linux/nodemask.h> | 19 | #include <linux/nodemask.h> |
18 | #include <linux/initrd.h> | 20 | #include <linux/initrd.h> |
diff --git a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c index 66353caa35b9..2239fde10b80 100644 --- a/arch/arm/mm/mmap.c +++ b/arch/arm/mm/mmap.c | |||
@@ -5,7 +5,8 @@ | |||
5 | #include <linux/mm.h> | 5 | #include <linux/mm.h> |
6 | #include <linux/mman.h> | 6 | #include <linux/mman.h> |
7 | #include <linux/shm.h> | 7 | #include <linux/shm.h> |
8 | #include <linux/sched.h> | 8 | #include <linux/sched/signal.h> |
9 | #include <linux/sched/mm.h> | ||
9 | #include <linux/io.h> | 10 | #include <linux/io.h> |
10 | #include <linux/personality.h> | 11 | #include <linux/personality.h> |
11 | #include <linux/random.h> | 12 | #include <linux/random.h> |
diff --git a/arch/arm/nwfpe/fpmodule.c b/arch/arm/nwfpe/fpmodule.c index ec717c190e2c..1365e8650843 100644 --- a/arch/arm/nwfpe/fpmodule.c +++ b/arch/arm/nwfpe/fpmodule.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <linux/types.h> | 31 | #include <linux/types.h> |
32 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
33 | #include <linux/signal.h> | 33 | #include <linux/signal.h> |
34 | #include <linux/sched.h> | 34 | #include <linux/sched/signal.h> |
35 | #include <linux/init.h> | 35 | #include <linux/init.h> |
36 | 36 | ||
37 | #include <asm/thread_notify.h> | 37 | #include <asm/thread_notify.h> |
diff --git a/arch/arm/probes/kprobes/core.c b/arch/arm/probes/kprobes/core.c index a4ec240ee7ba..b6dc9d838a9a 100644 --- a/arch/arm/probes/kprobes/core.c +++ b/arch/arm/probes/kprobes/core.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/stop_machine.h> | 26 | #include <linux/stop_machine.h> |
27 | #include <linux/sched/debug.h> | ||
27 | #include <linux/stringify.h> | 28 | #include <linux/stringify.h> |
28 | #include <asm/traps.h> | 29 | #include <asm/traps.h> |
29 | #include <asm/opcodes.h> | 30 | #include <asm/opcodes.h> |
diff --git a/arch/arm/probes/kprobes/test-core.c b/arch/arm/probes/kprobes/test-core.c index 9775de22e2ff..c893726aa52d 100644 --- a/arch/arm/probes/kprobes/test-core.c +++ b/arch/arm/probes/kprobes/test-core.c | |||
@@ -203,6 +203,7 @@ | |||
203 | #include <linux/kernel.h> | 203 | #include <linux/kernel.h> |
204 | #include <linux/module.h> | 204 | #include <linux/module.h> |
205 | #include <linux/slab.h> | 205 | #include <linux/slab.h> |
206 | #include <linux/sched/clock.h> | ||
206 | #include <linux/kprobes.h> | 207 | #include <linux/kprobes.h> |
207 | #include <linux/errno.h> | 208 | #include <linux/errno.h> |
208 | #include <linux/stddef.h> | 209 | #include <linux/stddef.h> |
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index 569d5a650a4a..a71a48e71fff 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/notifier.h> | 16 | #include <linux/notifier.h> |
17 | #include <linux/signal.h> | 17 | #include <linux/signal.h> |
18 | #include <linux/sched.h> | 18 | #include <linux/sched/signal.h> |
19 | #include <linux/smp.h> | 19 | #include <linux/smp.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/uaccess.h> | 21 | #include <linux/uaccess.h> |
diff --git a/arch/arm64/include/asm/compat.h b/arch/arm64/include/asm/compat.h index eb8432bb82b8..e39d487bf724 100644 --- a/arch/arm64/include/asm/compat.h +++ b/arch/arm64/include/asm/compat.h | |||
@@ -23,6 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | #include <linux/types.h> | 24 | #include <linux/types.h> |
25 | #include <linux/sched.h> | 25 | #include <linux/sched.h> |
26 | #include <linux/sched/task_stack.h> | ||
26 | 27 | ||
27 | #define COMPAT_USER_HZ 100 | 28 | #define COMPAT_USER_HZ 100 |
28 | #ifdef __AARCH64EB__ | 29 | #ifdef __AARCH64EB__ |
diff --git a/arch/arm64/include/asm/mmu_context.h b/arch/arm64/include/asm/mmu_context.h index 1ef40d82cfd3..3257895a9b5e 100644 --- a/arch/arm64/include/asm/mmu_context.h +++ b/arch/arm64/include/asm/mmu_context.h | |||
@@ -25,6 +25,8 @@ | |||
25 | 25 | ||
26 | #include <linux/compiler.h> | 26 | #include <linux/compiler.h> |
27 | #include <linux/sched.h> | 27 | #include <linux/sched.h> |
28 | #include <linux/sched/hotplug.h> | ||
29 | #include <linux/mm_types.h> | ||
28 | 30 | ||
29 | #include <asm/cacheflush.h> | 31 | #include <asm/cacheflush.h> |
30 | #include <asm/cpufeature.h> | 32 | #include <asm/cpufeature.h> |
diff --git a/arch/arm64/kernel/debug-monitors.c b/arch/arm64/kernel/debug-monitors.c index 2bd426448fc1..32913567da08 100644 --- a/arch/arm64/kernel/debug-monitors.c +++ b/arch/arm64/kernel/debug-monitors.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/kprobes.h> | 26 | #include <linux/kprobes.h> |
27 | #include <linux/stat.h> | 27 | #include <linux/stat.h> |
28 | #include <linux/uaccess.h> | 28 | #include <linux/uaccess.h> |
29 | #include <linux/sched/task_stack.h> | ||
29 | 30 | ||
30 | #include <asm/cpufeature.h> | 31 | #include <asm/cpufeature.h> |
31 | #include <asm/cputype.h> | 32 | #include <asm/cputype.h> |
diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c index b883f1f75216..06da8ea16bbe 100644 --- a/arch/arm64/kernel/fpsimd.c +++ b/arch/arm64/kernel/fpsimd.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <linux/cpu_pm.h> | 21 | #include <linux/cpu_pm.h> |
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/sched.h> | 24 | #include <linux/sched/signal.h> |
25 | #include <linux/signal.h> | 25 | #include <linux/signal.h> |
26 | #include <linux/hardirq.h> | 26 | #include <linux/hardirq.h> |
27 | 27 | ||
diff --git a/arch/arm64/kernel/kgdb.c b/arch/arm64/kernel/kgdb.c index d217c9e95b06..2122cd187f19 100644 --- a/arch/arm64/kernel/kgdb.c +++ b/arch/arm64/kernel/kgdb.c | |||
@@ -24,6 +24,8 @@ | |||
24 | #include <linux/kdebug.h> | 24 | #include <linux/kdebug.h> |
25 | #include <linux/kgdb.h> | 25 | #include <linux/kgdb.h> |
26 | #include <linux/kprobes.h> | 26 | #include <linux/kprobes.h> |
27 | #include <linux/sched/task_stack.h> | ||
28 | |||
27 | #include <asm/debug-monitors.h> | 29 | #include <asm/debug-monitors.h> |
28 | #include <asm/insn.h> | 30 | #include <asm/insn.h> |
29 | #include <asm/traps.h> | 31 | #include <asm/traps.h> |
diff --git a/arch/arm64/kernel/perf_regs.c b/arch/arm64/kernel/perf_regs.c index 3f62b35fb6f1..bd1b74c2436f 100644 --- a/arch/arm64/kernel/perf_regs.c +++ b/arch/arm64/kernel/perf_regs.c | |||
@@ -2,6 +2,7 @@ | |||
2 | #include <linux/kernel.h> | 2 | #include <linux/kernel.h> |
3 | #include <linux/perf_event.h> | 3 | #include <linux/perf_event.h> |
4 | #include <linux/bug.h> | 4 | #include <linux/bug.h> |
5 | #include <linux/sched/task_stack.h> | ||
5 | 6 | ||
6 | #include <asm/compat.h> | 7 | #include <asm/compat.h> |
7 | #include <asm/perf_regs.h> | 8 | #include <asm/perf_regs.h> |
diff --git a/arch/arm64/kernel/probes/kprobes.c b/arch/arm64/kernel/probes/kprobes.c index f0593c92279b..2a07aae5b8a2 100644 --- a/arch/arm64/kernel/probes/kprobes.c +++ b/arch/arm64/kernel/probes/kprobes.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/extable.h> | 22 | #include <linux/extable.h> |
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | #include <linux/stop_machine.h> | 24 | #include <linux/stop_machine.h> |
25 | #include <linux/sched/debug.h> | ||
25 | #include <linux/stringify.h> | 26 | #include <linux/stringify.h> |
26 | #include <asm/traps.h> | 27 | #include <asm/traps.h> |
27 | #include <asm/ptrace.h> | 28 | #include <asm/ptrace.h> |
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index 1ad48f93abdd..043d373b8369 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c | |||
@@ -24,6 +24,9 @@ | |||
24 | #include <linux/efi.h> | 24 | #include <linux/efi.h> |
25 | #include <linux/export.h> | 25 | #include <linux/export.h> |
26 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
27 | #include <linux/sched/debug.h> | ||
28 | #include <linux/sched/task.h> | ||
29 | #include <linux/sched/task_stack.h> | ||
27 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
28 | #include <linux/mm.h> | 31 | #include <linux/mm.h> |
29 | #include <linux/stddef.h> | 32 | #include <linux/stddef.h> |
diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c index a22161ccf447..c142459a88f3 100644 --- a/arch/arm64/kernel/ptrace.c +++ b/arch/arm64/kernel/ptrace.c | |||
@@ -22,7 +22,8 @@ | |||
22 | #include <linux/audit.h> | 22 | #include <linux/audit.h> |
23 | #include <linux/compat.h> | 23 | #include <linux/compat.h> |
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/sched.h> | 25 | #include <linux/sched/signal.h> |
26 | #include <linux/sched/task_stack.h> | ||
26 | #include <linux/mm.h> | 27 | #include <linux/mm.h> |
27 | #include <linux/smp.h> | 28 | #include <linux/smp.h> |
28 | #include <linux/ptrace.h> | 29 | #include <linux/ptrace.h> |
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index 952e2c0dabd5..42274bda0ccb 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/of_fdt.h> | 42 | #include <linux/of_fdt.h> |
43 | #include <linux/efi.h> | 43 | #include <linux/efi.h> |
44 | #include <linux/psci.h> | 44 | #include <linux/psci.h> |
45 | #include <linux/sched/task.h> | ||
45 | #include <linux/mm.h> | 46 | #include <linux/mm.h> |
46 | 47 | ||
47 | #include <asm/acpi.h> | 48 | #include <asm/acpi.h> |
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index 827d52d78b67..ef1caae02110 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c | |||
@@ -21,7 +21,9 @@ | |||
21 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/spinlock.h> | 23 | #include <linux/spinlock.h> |
24 | #include <linux/sched.h> | 24 | #include <linux/sched/mm.h> |
25 | #include <linux/sched/hotplug.h> | ||
26 | #include <linux/sched/task_stack.h> | ||
25 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
26 | #include <linux/cache.h> | 28 | #include <linux/cache.h> |
27 | #include <linux/profile.h> | 29 | #include <linux/profile.h> |
diff --git a/arch/arm64/kernel/stacktrace.c b/arch/arm64/kernel/stacktrace.c index 8a552a33c6ef..feac80c22f61 100644 --- a/arch/arm64/kernel/stacktrace.c +++ b/arch/arm64/kernel/stacktrace.c | |||
@@ -19,6 +19,8 @@ | |||
19 | #include <linux/export.h> | 19 | #include <linux/export.h> |
20 | #include <linux/ftrace.h> | 20 | #include <linux/ftrace.h> |
21 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
22 | #include <linux/sched/debug.h> | ||
23 | #include <linux/sched/task_stack.h> | ||
22 | #include <linux/stacktrace.h> | 24 | #include <linux/stacktrace.h> |
23 | 25 | ||
24 | #include <asm/irq.h> | 26 | #include <asm/irq.h> |
diff --git a/arch/arm64/kernel/sys_compat.c b/arch/arm64/kernel/sys_compat.c index abaf582fc7a8..8b8bbd3eaa52 100644 --- a/arch/arm64/kernel/sys_compat.c +++ b/arch/arm64/kernel/sys_compat.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/compat.h> | 21 | #include <linux/compat.h> |
22 | #include <linux/personality.h> | 22 | #include <linux/personality.h> |
23 | #include <linux/sched.h> | 23 | #include <linux/sched.h> |
24 | #include <linux/sched/signal.h> | ||
24 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
25 | #include <linux/syscalls.h> | 26 | #include <linux/syscalls.h> |
26 | #include <linux/uaccess.h> | 27 | #include <linux/uaccess.h> |
diff --git a/arch/arm64/kernel/topology.c b/arch/arm64/kernel/topology.c index 565dd69888cc..08243533e5ee 100644 --- a/arch/arm64/kernel/topology.c +++ b/arch/arm64/kernel/topology.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/nodemask.h> | 20 | #include <linux/nodemask.h> |
21 | #include <linux/of.h> | 21 | #include <linux/of.h> |
22 | #include <linux/sched.h> | 22 | #include <linux/sched.h> |
23 | #include <linux/sched/topology.h> | ||
23 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
24 | #include <linux/string.h> | 25 | #include <linux/string.h> |
25 | #include <linux/cpufreq.h> | 26 | #include <linux/cpufreq.h> |
diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c index 7d47c2cdfd93..e52be6aa44ee 100644 --- a/arch/arm64/kernel/traps.c +++ b/arch/arm64/kernel/traps.c | |||
@@ -29,8 +29,11 @@ | |||
29 | #include <linux/kexec.h> | 29 | #include <linux/kexec.h> |
30 | #include <linux/delay.h> | 30 | #include <linux/delay.h> |
31 | #include <linux/init.h> | 31 | #include <linux/init.h> |
32 | #include <linux/sched.h> | 32 | #include <linux/sched/signal.h> |
33 | #include <linux/sched/debug.h> | ||
34 | #include <linux/sched/task_stack.h> | ||
33 | #include <linux/syscalls.h> | 35 | #include <linux/syscalls.h> |
36 | #include <linux/mm_types.h> | ||
34 | 37 | ||
35 | #include <asm/atomic.h> | 38 | #include <asm/atomic.h> |
36 | #include <asm/bug.h> | 39 | #include <asm/bug.h> |
diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c index 81283851c9af..4bf899fb451b 100644 --- a/arch/arm64/mm/fault.c +++ b/arch/arm64/mm/fault.c | |||
@@ -26,7 +26,8 @@ | |||
26 | #include <linux/kprobes.h> | 26 | #include <linux/kprobes.h> |
27 | #include <linux/uaccess.h> | 27 | #include <linux/uaccess.h> |
28 | #include <linux/page-flags.h> | 28 | #include <linux/page-flags.h> |
29 | #include <linux/sched.h> | 29 | #include <linux/sched/signal.h> |
30 | #include <linux/sched/debug.h> | ||
30 | #include <linux/highmem.h> | 31 | #include <linux/highmem.h> |
31 | #include <linux/perf_event.h> | 32 | #include <linux/perf_event.h> |
32 | #include <linux/preempt.h> | 33 | #include <linux/preempt.h> |
diff --git a/arch/arm64/mm/kasan_init.c b/arch/arm64/mm/kasan_init.c index 201d918e7575..55d1e9205543 100644 --- a/arch/arm64/mm/kasan_init.c +++ b/arch/arm64/mm/kasan_init.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #define pr_fmt(fmt) "kasan: " fmt | 13 | #define pr_fmt(fmt) "kasan: " fmt |
14 | #include <linux/kasan.h> | 14 | #include <linux/kasan.h> |
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/sched/task.h> | ||
16 | #include <linux/memblock.h> | 17 | #include <linux/memblock.h> |
17 | #include <linux/start_kernel.h> | 18 | #include <linux/start_kernel.h> |
18 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
diff --git a/arch/arm64/mm/mmap.c b/arch/arm64/mm/mmap.c index 01c171723bb3..7b0d55756eb1 100644 --- a/arch/arm64/mm/mmap.c +++ b/arch/arm64/mm/mmap.c | |||
@@ -22,7 +22,8 @@ | |||
22 | #include <linux/mman.h> | 22 | #include <linux/mman.h> |
23 | #include <linux/export.h> | 23 | #include <linux/export.h> |
24 | #include <linux/shm.h> | 24 | #include <linux/shm.h> |
25 | #include <linux/sched.h> | 25 | #include <linux/sched/signal.h> |
26 | #include <linux/sched/mm.h> | ||
26 | #include <linux/io.h> | 27 | #include <linux/io.h> |
27 | #include <linux/personality.h> | 28 | #include <linux/personality.h> |
28 | #include <linux/random.h> | 29 | #include <linux/random.h> |
diff --git a/arch/avr32/include/asm/mmu_context.h b/arch/avr32/include/asm/mmu_context.h index 27ff23407100..cd87abba8db7 100644 --- a/arch/avr32/include/asm/mmu_context.h +++ b/arch/avr32/include/asm/mmu_context.h | |||
@@ -12,6 +12,8 @@ | |||
12 | #ifndef __ASM_AVR32_MMU_CONTEXT_H | 12 | #ifndef __ASM_AVR32_MMU_CONTEXT_H |
13 | #define __ASM_AVR32_MMU_CONTEXT_H | 13 | #define __ASM_AVR32_MMU_CONTEXT_H |
14 | 14 | ||
15 | #include <linux/mm_types.h> | ||
16 | |||
15 | #include <asm/tlbflush.h> | 17 | #include <asm/tlbflush.h> |
16 | #include <asm/sysreg.h> | 18 | #include <asm/sysreg.h> |
17 | #include <asm-generic/mm_hooks.h> | 19 | #include <asm-generic/mm_hooks.h> |
diff --git a/arch/avr32/kernel/nmi_debug.c b/arch/avr32/kernel/nmi_debug.c index 3414b8566c29..25823049bb99 100644 --- a/arch/avr32/kernel/nmi_debug.c +++ b/arch/avr32/kernel/nmi_debug.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/kdebug.h> | 9 | #include <linux/kdebug.h> |
10 | #include <linux/notifier.h> | 10 | #include <linux/notifier.h> |
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <linux/sched/debug.h> | ||
12 | 13 | ||
13 | #include <asm/irq.h> | 14 | #include <asm/irq.h> |
14 | 15 | ||
diff --git a/arch/avr32/kernel/process.c b/arch/avr32/kernel/process.c index 68e5b9dac059..ad0dfccedb79 100644 --- a/arch/avr32/kernel/process.c +++ b/arch/avr32/kernel/process.c | |||
@@ -6,6 +6,9 @@ | |||
6 | * published by the Free Software Foundation. | 6 | * published by the Free Software Foundation. |
7 | */ | 7 | */ |
8 | #include <linux/sched.h> | 8 | #include <linux/sched.h> |
9 | #include <linux/sched/debug.h> | ||
10 | #include <linux/sched/task.h> | ||
11 | #include <linux/sched/task_stack.h> | ||
9 | #include <linux/module.h> | 12 | #include <linux/module.h> |
10 | #include <linux/kallsyms.h> | 13 | #include <linux/kallsyms.h> |
11 | #include <linux/fs.h> | 14 | #include <linux/fs.h> |
diff --git a/arch/avr32/kernel/ptrace.c b/arch/avr32/kernel/ptrace.c index a89b893279bb..41a14e96a1db 100644 --- a/arch/avr32/kernel/ptrace.c +++ b/arch/avr32/kernel/ptrace.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #undef DEBUG | 8 | #undef DEBUG |
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
11 | #include <linux/sched/task_stack.h> | ||
11 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
12 | #include <linux/ptrace.h> | 13 | #include <linux/ptrace.h> |
13 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
diff --git a/arch/avr32/kernel/stacktrace.c b/arch/avr32/kernel/stacktrace.c index c09f0d8dd679..f8cc995cf0e0 100644 --- a/arch/avr32/kernel/stacktrace.c +++ b/arch/avr32/kernel/stacktrace.c | |||
@@ -8,6 +8,7 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
11 | #include <linux/sched/task_stack.h> | ||
11 | #include <linux/stacktrace.h> | 12 | #include <linux/stacktrace.h> |
12 | #include <linux/thread_info.h> | 13 | #include <linux/thread_info.h> |
13 | #include <linux/module.h> | 14 | #include <linux/module.h> |
diff --git a/arch/avr32/kernel/traps.c b/arch/avr32/kernel/traps.c index eb4a3fcfbaff..50b541325025 100644 --- a/arch/avr32/kernel/traps.c +++ b/arch/avr32/kernel/traps.c | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <linux/extable.h> | 14 | #include <linux/extable.h> |
15 | #include <linux/module.h> /* print_modules */ | 15 | #include <linux/module.h> /* print_modules */ |
16 | #include <linux/notifier.h> | 16 | #include <linux/notifier.h> |
17 | #include <linux/sched.h> | 17 | #include <linux/sched/signal.h> |
18 | #include <linux/uaccess.h> | 18 | #include <linux/uaccess.h> |
19 | 19 | ||
20 | #include <asm/addrspace.h> | 20 | #include <asm/addrspace.h> |
diff --git a/arch/blackfin/include/asm/mmu_context.h b/arch/blackfin/include/asm/mmu_context.h index 15b16d3e8de8..0ce6de873b27 100644 --- a/arch/blackfin/include/asm/mmu_context.h +++ b/arch/blackfin/include/asm/mmu_context.h | |||
@@ -9,6 +9,8 @@ | |||
9 | 9 | ||
10 | #include <linux/slab.h> | 10 | #include <linux/slab.h> |
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <linux/mm_types.h> | ||
13 | |||
12 | #include <asm/setup.h> | 14 | #include <asm/setup.h> |
13 | #include <asm/page.h> | 15 | #include <asm/page.h> |
14 | #include <asm/pgalloc.h> | 16 | #include <asm/pgalloc.h> |
diff --git a/arch/blackfin/kernel/dumpstack.c b/arch/blackfin/kernel/dumpstack.c index 95ba6d9e9a3d..3c992c1f8ef2 100644 --- a/arch/blackfin/kernel/dumpstack.c +++ b/arch/blackfin/kernel/dumpstack.c | |||
@@ -10,6 +10,8 @@ | |||
10 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
11 | #include <linux/uaccess.h> | 11 | #include <linux/uaccess.h> |
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/sched/debug.h> | ||
14 | |||
13 | #include <asm/trace.h> | 15 | #include <asm/trace.h> |
14 | 16 | ||
15 | /* | 17 | /* |
diff --git a/arch/blackfin/kernel/early_printk.c b/arch/blackfin/kernel/early_printk.c index 61fbd2de993d..4b89af9243d3 100644 --- a/arch/blackfin/kernel/early_printk.c +++ b/arch/blackfin/kernel/early_printk.c | |||
@@ -8,6 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/sched/debug.h> | ||
11 | #include <linux/init.h> | 12 | #include <linux/init.h> |
12 | #include <linux/serial_core.h> | 13 | #include <linux/serial_core.h> |
13 | #include <linux/console.h> | 14 | #include <linux/console.h> |
diff --git a/arch/blackfin/kernel/flat.c b/arch/blackfin/kernel/flat.c index a88daddbf074..b5b658449616 100644 --- a/arch/blackfin/kernel/flat.c +++ b/arch/blackfin/kernel/flat.c | |||
@@ -6,6 +6,7 @@ | |||
6 | 6 | ||
7 | #include <linux/module.h> | 7 | #include <linux/module.h> |
8 | #include <linux/sched.h> | 8 | #include <linux/sched.h> |
9 | #include <linux/mm_types.h> | ||
9 | #include <linux/flat.h> | 10 | #include <linux/flat.h> |
10 | 11 | ||
11 | #define FLAT_BFIN_RELOC_TYPE_16_BIT 0 | 12 | #define FLAT_BFIN_RELOC_TYPE_16_BIT 0 |
diff --git a/arch/blackfin/kernel/nmi.c b/arch/blackfin/kernel/nmi.c index 9919d29287dc..633c37083e87 100644 --- a/arch/blackfin/kernel/nmi.c +++ b/arch/blackfin/kernel/nmi.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/nmi.h> | 17 | #include <linux/nmi.h> |
18 | #include <linux/smp.h> | 18 | #include <linux/smp.h> |
19 | #include <linux/timer.h> | 19 | #include <linux/timer.h> |
20 | #include <linux/sched/debug.h> | ||
20 | #include <asm/blackfin.h> | 21 | #include <asm/blackfin.h> |
21 | #include <linux/atomic.h> | 22 | #include <linux/atomic.h> |
22 | #include <asm/cacheflush.h> | 23 | #include <asm/cacheflush.h> |
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c index 4aa5545c4fde..89d5162d4ca6 100644 --- a/arch/blackfin/kernel/process.c +++ b/arch/blackfin/kernel/process.c | |||
@@ -12,6 +12,10 @@ | |||
12 | #include <linux/uaccess.h> | 12 | #include <linux/uaccess.h> |
13 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
15 | #include <linux/sched/debug.h> | ||
16 | #include <linux/sched/task.h> | ||
17 | #include <linux/sched/task_stack.h> | ||
18 | #include <linux/mm_types.h> | ||
15 | #include <linux/tick.h> | 19 | #include <linux/tick.h> |
16 | #include <linux/fs.h> | 20 | #include <linux/fs.h> |
17 | #include <linux/err.h> | 21 | #include <linux/err.h> |
diff --git a/arch/blackfin/kernel/ptrace.c b/arch/blackfin/kernel/ptrace.c index 360d99645163..a6827095b99a 100644 --- a/arch/blackfin/kernel/ptrace.c +++ b/arch/blackfin/kernel/ptrace.c | |||
@@ -7,6 +7,7 @@ | |||
7 | 7 | ||
8 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
9 | #include <linux/sched.h> | 9 | #include <linux/sched.h> |
10 | #include <linux/sched/task_stack.h> | ||
10 | #include <linux/mm.h> | 11 | #include <linux/mm.h> |
11 | #include <linux/smp.h> | 12 | #include <linux/smp.h> |
12 | #include <linux/elf.h> | 13 | #include <linux/elf.h> |
diff --git a/arch/blackfin/kernel/signal.c b/arch/blackfin/kernel/signal.c index ea570db598e5..5f5172779204 100644 --- a/arch/blackfin/kernel/signal.c +++ b/arch/blackfin/kernel/signal.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/binfmts.h> | 12 | #include <linux/binfmts.h> |
13 | #include <linux/uaccess.h> | 13 | #include <linux/uaccess.h> |
14 | #include <linux/tracehook.h> | 14 | #include <linux/tracehook.h> |
15 | #include <linux/sched/task_stack.h> | ||
15 | 16 | ||
16 | #include <asm/cacheflush.h> | 17 | #include <asm/cacheflush.h> |
17 | #include <asm/ucontext.h> | 18 | #include <asm/ucontext.h> |
diff --git a/arch/blackfin/kernel/stacktrace.c b/arch/blackfin/kernel/stacktrace.c index 30301e1eace5..17198f3650b6 100644 --- a/arch/blackfin/kernel/stacktrace.c +++ b/arch/blackfin/kernel/stacktrace.c | |||
@@ -6,6 +6,7 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/sched.h> | 8 | #include <linux/sched.h> |
9 | #include <linux/sched/task_stack.h> | ||
9 | #include <linux/stacktrace.h> | 10 | #include <linux/stacktrace.h> |
10 | #include <linux/thread_info.h> | 11 | #include <linux/thread_info.h> |
11 | #include <linux/module.h> | 12 | #include <linux/module.h> |
diff --git a/arch/blackfin/kernel/trace.c b/arch/blackfin/kernel/trace.c index 719dd796c12c..151f22196ab6 100644 --- a/arch/blackfin/kernel/trace.c +++ b/arch/blackfin/kernel/trace.c | |||
@@ -11,7 +11,9 @@ | |||
11 | #include <linux/thread_info.h> | 11 | #include <linux/thread_info.h> |
12 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
13 | #include <linux/oom.h> | 13 | #include <linux/oom.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched/signal.h> |
15 | #include <linux/sched/debug.h> | ||
16 | #include <linux/sched/task.h> | ||
15 | #include <linux/uaccess.h> | 17 | #include <linux/uaccess.h> |
16 | #include <linux/module.h> | 18 | #include <linux/module.h> |
17 | #include <linux/kallsyms.h> | 19 | #include <linux/kallsyms.h> |
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c index 1ed85ddadc0d..a323a40a46e9 100644 --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c | |||
@@ -9,6 +9,8 @@ | |||
9 | #include <linux/bug.h> | 9 | #include <linux/bug.h> |
10 | #include <linux/uaccess.h> | 10 | #include <linux/uaccess.h> |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/sched/signal.h> | ||
13 | #include <linux/sched/debug.h> | ||
12 | #include <asm/traps.h> | 14 | #include <asm/traps.h> |
13 | #include <asm/cplb.h> | 15 | #include <asm/cplb.h> |
14 | #include <asm/blackfin.h> | 16 | #include <asm/blackfin.h> |
diff --git a/arch/blackfin/mach-common/ints-priority.c b/arch/blackfin/mach-common/ints-priority.c index 4986b4fbcee9..13e94bf9d8ba 100644 --- a/arch/blackfin/mach-common/ints-priority.c +++ b/arch/blackfin/mach-common/ints-priority.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/seq_file.h> | 16 | #include <linux/seq_file.h> |
17 | #include <linux/irq.h> | 17 | #include <linux/irq.h> |
18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
19 | #include <linux/sched/debug.h> | ||
19 | #include <linux/syscore_ops.h> | 20 | #include <linux/syscore_ops.h> |
20 | #include <linux/gpio.h> | 21 | #include <linux/gpio.h> |
21 | #include <asm/delay.h> | 22 | #include <asm/delay.h> |
diff --git a/arch/blackfin/mach-common/smp.c b/arch/blackfin/mach-common/smp.c index a2e6db2ce811..b32ddab7966c 100644 --- a/arch/blackfin/mach-common/smp.c +++ b/arch/blackfin/mach-common/smp.c | |||
@@ -11,7 +11,8 @@ | |||
11 | #include <linux/delay.h> | 11 | #include <linux/delay.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/spinlock.h> | 13 | #include <linux/spinlock.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched/mm.h> |
15 | #include <linux/sched/task_stack.h> | ||
15 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
16 | #include <linux/cache.h> | 17 | #include <linux/cache.h> |
17 | #include <linux/clockchips.h> | 18 | #include <linux/clockchips.h> |
diff --git a/arch/blackfin/mm/isram-driver.c b/arch/blackfin/mm/isram-driver.c index 7e2e674ed444..aaa1e64b753b 100644 --- a/arch/blackfin/mm/isram-driver.c +++ b/arch/blackfin/mm/isram-driver.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
15 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/sched/debug.h> | ||
17 | 18 | ||
18 | #include <asm/blackfin.h> | 19 | #include <asm/blackfin.h> |
19 | #include <asm/dma.h> | 20 | #include <asm/dma.h> |
diff --git a/arch/blackfin/mm/sram-alloc.c b/arch/blackfin/mm/sram-alloc.c index 1f3b3ef3e103..d2a96c2c02a3 100644 --- a/arch/blackfin/mm/sram-alloc.c +++ b/arch/blackfin/mm/sram-alloc.c | |||
@@ -19,6 +19,8 @@ | |||
19 | #include <linux/spinlock.h> | 19 | #include <linux/spinlock.h> |
20 | #include <linux/rtc.h> | 20 | #include <linux/rtc.h> |
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | #include <linux/mm_types.h> | ||
23 | |||
22 | #include <asm/blackfin.h> | 24 | #include <asm/blackfin.h> |
23 | #include <asm/mem_map.h> | 25 | #include <asm/mem_map.h> |
24 | #include "blackfin_sram.h" | 26 | #include "blackfin_sram.h" |
diff --git a/arch/c6x/kernel/process.c b/arch/c6x/kernel/process.c index 0ee7686a78f3..c4ecb24c2d5c 100644 --- a/arch/c6x/kernel/process.c +++ b/arch/c6x/kernel/process.c | |||
@@ -17,6 +17,8 @@ | |||
17 | #include <linux/mqueue.h> | 17 | #include <linux/mqueue.h> |
18 | #include <linux/syscalls.h> | 18 | #include <linux/syscalls.h> |
19 | #include <linux/reboot.h> | 19 | #include <linux/reboot.h> |
20 | #include <linux/sched/task.h> | ||
21 | #include <linux/sched/task_stack.h> | ||
20 | 22 | ||
21 | #include <asm/syscalls.h> | 23 | #include <asm/syscalls.h> |
22 | 24 | ||
diff --git a/arch/c6x/kernel/ptrace.c b/arch/c6x/kernel/ptrace.c index 3c494e84444d..a27e1f02ce18 100644 --- a/arch/c6x/kernel/ptrace.c +++ b/arch/c6x/kernel/ptrace.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/tracehook.h> | 14 | #include <linux/tracehook.h> |
15 | #include <linux/regset.h> | 15 | #include <linux/regset.h> |
16 | #include <linux/elf.h> | 16 | #include <linux/elf.h> |
17 | #include <linux/sched/task_stack.h> | ||
17 | 18 | ||
18 | #include <asm/cacheflush.h> | 19 | #include <asm/cacheflush.h> |
19 | 20 | ||
diff --git a/arch/c6x/kernel/traps.c b/arch/c6x/kernel/traps.c index dcc2c2f6d67c..09b8a40d5680 100644 --- a/arch/c6x/kernel/traps.c +++ b/arch/c6x/kernel/traps.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/ptrace.h> | 12 | #include <linux/ptrace.h> |
13 | #include <linux/sched/debug.h> | ||
13 | #include <linux/kallsyms.h> | 14 | #include <linux/kallsyms.h> |
14 | #include <linux/bug.h> | 15 | #include <linux/bug.h> |
15 | 16 | ||
diff --git a/arch/cris/arch-v10/drivers/sync_serial.c b/arch/cris/arch-v10/drivers/sync_serial.c index 9ac75d68f184..cc62572c1b94 100644 --- a/arch/cris/arch-v10/drivers/sync_serial.c +++ b/arch/cris/arch-v10/drivers/sync_serial.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | #include <linux/major.h> | 18 | #include <linux/major.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched/signal.h> |
20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
21 | #include <linux/poll.h> | 21 | #include <linux/poll.h> |
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
diff --git a/arch/cris/arch-v10/kernel/process.c b/arch/cris/arch-v10/kernel/process.c index 96e5afef6b47..e299d30105b5 100644 --- a/arch/cris/arch-v10/kernel/process.c +++ b/arch/cris/arch-v10/kernel/process.c | |||
@@ -11,6 +11,9 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/sched/debug.h> | ||
15 | #include <linux/sched/task.h> | ||
16 | #include <linux/sched/task_stack.h> | ||
14 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
15 | #include <linux/err.h> | 18 | #include <linux/err.h> |
16 | #include <linux/fs.h> | 19 | #include <linux/fs.h> |
diff --git a/arch/cris/arch-v10/kernel/ptrace.c b/arch/cris/arch-v10/kernel/ptrace.c index eca94c7d56e7..c2f2b9b83cc4 100644 --- a/arch/cris/arch-v10/kernel/ptrace.c +++ b/arch/cris/arch-v10/kernel/ptrace.c | |||
@@ -4,6 +4,7 @@ | |||
4 | 4 | ||
5 | #include <linux/kernel.h> | 5 | #include <linux/kernel.h> |
6 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
7 | #include <linux/sched/task_stack.h> | ||
7 | #include <linux/mm.h> | 8 | #include <linux/mm.h> |
8 | #include <linux/smp.h> | 9 | #include <linux/smp.h> |
9 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
diff --git a/arch/cris/arch-v10/kernel/signal.c b/arch/cris/arch-v10/kernel/signal.c index db30c98e4926..bab4a8dd6bfd 100644 --- a/arch/cris/arch-v10/kernel/signal.c +++ b/arch/cris/arch-v10/kernel/signal.c | |||
@@ -14,6 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/sched/task_stack.h> | ||
17 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
18 | #include <linux/smp.h> | 19 | #include <linux/smp.h> |
19 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
diff --git a/arch/cris/arch-v10/kernel/traps.c b/arch/cris/arch-v10/kernel/traps.c index 96d004fe9740..c0a501f29bd8 100644 --- a/arch/cris/arch-v10/kernel/traps.c +++ b/arch/cris/arch-v10/kernel/traps.c | |||
@@ -10,6 +10,8 @@ | |||
10 | 10 | ||
11 | #include <linux/ptrace.h> | 11 | #include <linux/ptrace.h> |
12 | #include <linux/uaccess.h> | 12 | #include <linux/uaccess.h> |
13 | #include <linux/sched/debug.h> | ||
14 | |||
13 | #include <arch/sv_addr_ag.h> | 15 | #include <arch/sv_addr_ag.h> |
14 | #include <arch/system.h> | 16 | #include <arch/system.h> |
15 | 17 | ||
diff --git a/arch/cris/arch-v10/mm/tlb.c b/arch/cris/arch-v10/mm/tlb.c index 21d78c599bab..3225d38bdaea 100644 --- a/arch/cris/arch-v10/mm/tlb.c +++ b/arch/cris/arch-v10/mm/tlb.c | |||
@@ -10,6 +10,8 @@ | |||
10 | * | 10 | * |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/mm_types.h> | ||
14 | |||
13 | #include <asm/tlb.h> | 15 | #include <asm/tlb.h> |
14 | #include <asm/mmu_context.h> | 16 | #include <asm/mmu_context.h> |
15 | #include <arch/svinto.h> | 17 | #include <arch/svinto.h> |
diff --git a/arch/cris/arch-v32/drivers/sync_serial.c b/arch/cris/arch-v32/drivers/sync_serial.c index ef515af1a377..8efcc1a899a8 100644 --- a/arch/cris/arch-v32/drivers/sync_serial.c +++ b/arch/cris/arch-v32/drivers/sync_serial.c | |||
@@ -11,7 +11,7 @@ | |||
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
13 | #include <linux/major.h> | 13 | #include <linux/major.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched/signal.h> |
15 | #include <linux/mutex.h> | 15 | #include <linux/mutex.h> |
16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
17 | #include <linux/poll.h> | 17 | #include <linux/poll.h> |
diff --git a/arch/cris/arch-v32/kernel/process.c b/arch/cris/arch-v32/kernel/process.c index 4d1afa9f9fd3..c530a8fa87ce 100644 --- a/arch/cris/arch-v32/kernel/process.c +++ b/arch/cris/arch-v32/kernel/process.c | |||
@@ -9,6 +9,9 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <linux/sched/debug.h> | ||
13 | #include <linux/sched/task.h> | ||
14 | #include <linux/sched/task_stack.h> | ||
12 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
13 | #include <linux/err.h> | 16 | #include <linux/err.h> |
14 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
diff --git a/arch/cris/arch-v32/kernel/ptrace.c b/arch/cris/arch-v32/kernel/ptrace.c index c366bc05466a..0461e95bbb62 100644 --- a/arch/cris/arch-v32/kernel/ptrace.c +++ b/arch/cris/arch-v32/kernel/ptrace.c | |||
@@ -4,6 +4,7 @@ | |||
4 | 4 | ||
5 | #include <linux/kernel.h> | 5 | #include <linux/kernel.h> |
6 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
7 | #include <linux/sched/task_stack.h> | ||
7 | #include <linux/mm.h> | 8 | #include <linux/mm.h> |
8 | #include <linux/smp.h> | 9 | #include <linux/smp.h> |
9 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
diff --git a/arch/cris/arch-v32/kernel/signal.c b/arch/cris/arch-v32/kernel/signal.c index 816bf2ca93ef..ea2e8e1398e8 100644 --- a/arch/cris/arch-v32/kernel/signal.c +++ b/arch/cris/arch-v32/kernel/signal.c | |||
@@ -3,6 +3,7 @@ | |||
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <linux/sched.h> | 5 | #include <linux/sched.h> |
6 | #include <linux/sched/task_stack.h> | ||
6 | #include <linux/mm.h> | 7 | #include <linux/mm.h> |
7 | #include <linux/slab.h> | 8 | #include <linux/slab.h> |
8 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
diff --git a/arch/cris/arch-v32/kernel/traps.c b/arch/cris/arch-v32/kernel/traps.c index ad6174e217c9..a34256515036 100644 --- a/arch/cris/arch-v32/kernel/traps.c +++ b/arch/cris/arch-v32/kernel/traps.c | |||
@@ -5,6 +5,8 @@ | |||
5 | #include <linux/ptrace.h> | 5 | #include <linux/ptrace.h> |
6 | #include <linux/extable.h> | 6 | #include <linux/extable.h> |
7 | #include <linux/uaccess.h> | 7 | #include <linux/uaccess.h> |
8 | #include <linux/sched/debug.h> | ||
9 | |||
8 | #include <hwregs/supp_reg.h> | 10 | #include <hwregs/supp_reg.h> |
9 | #include <hwregs/intr_vect_defs.h> | 11 | #include <hwregs/intr_vect_defs.h> |
10 | #include <asm/irq.h> | 12 | #include <asm/irq.h> |
diff --git a/arch/cris/arch-v32/mm/tlb.c b/arch/cris/arch-v32/mm/tlb.c index c030d020660a..bc3de5b5e27c 100644 --- a/arch/cris/arch-v32/mm/tlb.c +++ b/arch/cris/arch-v32/mm/tlb.c | |||
@@ -6,6 +6,7 @@ | |||
6 | * Authors: Bjorn Wesen <bjornw@axis.com> | 6 | * Authors: Bjorn Wesen <bjornw@axis.com> |
7 | * Tobias Anderberg <tobiasa@axis.com>, CRISv32 port. | 7 | * Tobias Anderberg <tobiasa@axis.com>, CRISv32 port. |
8 | */ | 8 | */ |
9 | #include <linux/mm_types.h> | ||
9 | 10 | ||
10 | #include <asm/tlb.h> | 11 | #include <asm/tlb.h> |
11 | #include <asm/mmu_context.h> | 12 | #include <asm/mmu_context.h> |
diff --git a/arch/cris/include/asm/pgtable.h b/arch/cris/include/asm/pgtable.h index ceefc314d64d..2a3210ba4c72 100644 --- a/arch/cris/include/asm/pgtable.h +++ b/arch/cris/include/asm/pgtable.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #include <asm-generic/pgtable-nopmd.h> | 9 | #include <asm-generic/pgtable-nopmd.h> |
10 | 10 | ||
11 | #ifndef __ASSEMBLY__ | 11 | #ifndef __ASSEMBLY__ |
12 | #include <linux/sched.h> | 12 | #include <linux/sched/mm.h> |
13 | #include <asm/mmu.h> | 13 | #include <asm/mmu.h> |
14 | #endif | 14 | #endif |
15 | #include <arch/pgtable.h> | 15 | #include <arch/pgtable.h> |
diff --git a/arch/cris/kernel/irq.c b/arch/cris/kernel/irq.c index 694850e8f077..09b864f46f8a 100644 --- a/arch/cris/kernel/irq.c +++ b/arch/cris/kernel/irq.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/ptrace.h> | 23 | #include <linux/ptrace.h> |
24 | #include <linux/irq.h> | 24 | #include <linux/irq.h> |
25 | #include <linux/sched/debug.h> | ||
25 | 26 | ||
26 | #include <linux/kernel_stat.h> | 27 | #include <linux/kernel_stat.h> |
27 | #include <linux/signal.h> | 28 | #include <linux/signal.h> |
diff --git a/arch/cris/kernel/process.c b/arch/cris/kernel/process.c index 50a7dd451456..0bbd3a0c3d70 100644 --- a/arch/cris/kernel/process.c +++ b/arch/cris/kernel/process.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/spinlock.h> | 20 | #include <linux/spinlock.h> |
21 | #include <linux/init_task.h> | 21 | #include <linux/init_task.h> |
22 | #include <linux/sched.h> | 22 | #include <linux/sched.h> |
23 | #include <linux/sched/task.h> | ||
23 | #include <linux/fs.h> | 24 | #include <linux/fs.h> |
24 | #include <linux/user.h> | 25 | #include <linux/user.h> |
25 | #include <linux/elfcore.h> | 26 | #include <linux/elfcore.h> |
diff --git a/arch/cris/kernel/stacktrace.c b/arch/cris/kernel/stacktrace.c index 99838c74456d..f1cc3aaacd8d 100644 --- a/arch/cris/kernel/stacktrace.c +++ b/arch/cris/kernel/stacktrace.c | |||
@@ -1,5 +1,5 @@ | |||
1 | #include <linux/sched.h> | 1 | #include <linux/sched.h> |
2 | #include <linux/stacktrace.h> | 2 | #include <linux/sched/debug.h> |
3 | #include <linux/stacktrace.h> | 3 | #include <linux/stacktrace.h> |
4 | #include <asm/stacktrace.h> | 4 | #include <asm/stacktrace.h> |
5 | 5 | ||
diff --git a/arch/cris/kernel/time.c b/arch/cris/kernel/time.c index 2dda6da71521..bc562cf511a6 100644 --- a/arch/cris/kernel/time.c +++ b/arch/cris/kernel/time.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include <linux/timex.h> | 29 | #include <linux/timex.h> |
30 | #include <linux/init.h> | 30 | #include <linux/init.h> |
31 | #include <linux/profile.h> | 31 | #include <linux/profile.h> |
32 | #include <linux/sched.h> /* just for sched_clock() - funny that */ | 32 | #include <linux/sched/clock.h> |
33 | 33 | ||
34 | 34 | ||
35 | #define D(x) | 35 | #define D(x) |
diff --git a/arch/cris/kernel/traps.c b/arch/cris/kernel/traps.c index b2a312a7afc6..a01636a12a6e 100644 --- a/arch/cris/kernel/traps.c +++ b/arch/cris/kernel/traps.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/utsname.h> | 17 | #include <linux/utsname.h> |
18 | #include <linux/sched/debug.h> | ||
18 | #ifdef CONFIG_KALLSYMS | 19 | #ifdef CONFIG_KALLSYMS |
19 | #include <linux/kallsyms.h> | 20 | #include <linux/kallsyms.h> |
20 | #endif | 21 | #endif |
diff --git a/arch/cris/mm/fault.c b/arch/cris/mm/fault.c index 94183d3639ef..1fca464f1b9e 100644 --- a/arch/cris/mm/fault.c +++ b/arch/cris/mm/fault.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/interrupt.h> | 8 | #include <linux/interrupt.h> |
9 | #include <linux/extable.h> | 9 | #include <linux/extable.h> |
10 | #include <linux/wait.h> | 10 | #include <linux/wait.h> |
11 | #include <linux/sched/signal.h> | ||
11 | #include <linux/uaccess.h> | 12 | #include <linux/uaccess.h> |
12 | #include <arch/system.h> | 13 | #include <arch/system.h> |
13 | 14 | ||
diff --git a/arch/cris/mm/tlb.c b/arch/cris/mm/tlb.c index b7f8de576777..8413741cfa0f 100644 --- a/arch/cris/mm/tlb.c +++ b/arch/cris/mm/tlb.c | |||
@@ -9,6 +9,8 @@ | |||
9 | 9 | ||
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/mm_types.h> | ||
13 | |||
12 | #include <asm/tlb.h> | 14 | #include <asm/tlb.h> |
13 | 15 | ||
14 | #define D(x) | 16 | #define D(x) |
diff --git a/arch/frv/kernel/process.c b/arch/frv/kernel/process.c index b306241c4ef2..5a4c92abc99e 100644 --- a/arch/frv/kernel/process.c +++ b/arch/frv/kernel/process.c | |||
@@ -13,6 +13,9 @@ | |||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
15 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
16 | #include <linux/sched/debug.h> | ||
17 | #include <linux/sched/task.h> | ||
18 | #include <linux/sched/task_stack.h> | ||
16 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
17 | #include <linux/mm.h> | 20 | #include <linux/mm.h> |
18 | #include <linux/smp.h> | 21 | #include <linux/smp.h> |
diff --git a/arch/frv/kernel/traps.c b/arch/frv/kernel/traps.c index 31221fb4348e..ce29991e4219 100644 --- a/arch/frv/kernel/traps.c +++ b/arch/frv/kernel/traps.c | |||
@@ -9,7 +9,8 @@ | |||
9 | * 2 of the License, or (at your option) any later version. | 9 | * 2 of the License, or (at your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/sched.h> | 12 | #include <linux/sched/signal.h> |
13 | #include <linux/sched/debug.h> | ||
13 | #include <linux/signal.h> | 14 | #include <linux/signal.h> |
14 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
15 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
diff --git a/arch/frv/mm/elf-fdpic.c b/arch/frv/mm/elf-fdpic.c index 836f14707a62..da82c25301e7 100644 --- a/arch/frv/mm/elf-fdpic.c +++ b/arch/frv/mm/elf-fdpic.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/sched/mm.h> | ||
13 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
14 | #include <linux/fs.h> | 15 | #include <linux/fs.h> |
15 | #include <linux/elf-fdpic.h> | 16 | #include <linux/elf-fdpic.h> |
diff --git a/arch/frv/mm/init.c b/arch/frv/mm/init.c index 88a159743528..328f0a292316 100644 --- a/arch/frv/mm/init.c +++ b/arch/frv/mm/init.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <linux/signal.h> | 19 | #include <linux/signal.h> |
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/sched/task.h> | ||
21 | #include <linux/pagemap.h> | 22 | #include <linux/pagemap.h> |
22 | #include <linux/gfp.h> | 23 | #include <linux/gfp.h> |
23 | #include <linux/swap.h> | 24 | #include <linux/swap.h> |
diff --git a/arch/frv/mm/mmu-context.c b/arch/frv/mm/mmu-context.c index 3473bde77f56..16946a58f64d 100644 --- a/arch/frv/mm/mmu-context.c +++ b/arch/frv/mm/mmu-context.c | |||
@@ -10,6 +10,8 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/sched/mm.h> | ||
14 | #include <linux/sched/task.h> | ||
13 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
14 | #include <asm/tlbflush.h> | 16 | #include <asm/tlbflush.h> |
15 | 17 | ||
diff --git a/arch/h8300/kernel/process.c b/arch/h8300/kernel/process.c index 891974a11704..0f5db5bb561b 100644 --- a/arch/h8300/kernel/process.c +++ b/arch/h8300/kernel/process.c | |||
@@ -25,6 +25,9 @@ | |||
25 | #include <linux/errno.h> | 25 | #include <linux/errno.h> |
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/sched.h> | 27 | #include <linux/sched.h> |
28 | #include <linux/sched/debug.h> | ||
29 | #include <linux/sched/task.h> | ||
30 | #include <linux/sched/task_stack.h> | ||
28 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
29 | #include <linux/mm.h> | 32 | #include <linux/mm.h> |
30 | #include <linux/smp.h> | 33 | #include <linux/smp.h> |
diff --git a/arch/h8300/kernel/ptrace_s.c b/arch/h8300/kernel/ptrace_s.c index ef5a9c13e76d..c0af930052c0 100644 --- a/arch/h8300/kernel/ptrace_s.c +++ b/arch/h8300/kernel/ptrace_s.c | |||
@@ -10,7 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/linkage.h> | 12 | #include <linux/linkage.h> |
13 | #include <linux/sched.h> | 13 | #include <linux/sched/signal.h> |
14 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
15 | #include <asm/ptrace.h> | 15 | #include <asm/ptrace.h> |
16 | 16 | ||
diff --git a/arch/h8300/kernel/signal.c b/arch/h8300/kernel/signal.c index d784f7117f9a..1e8070d08770 100644 --- a/arch/h8300/kernel/signal.c +++ b/arch/h8300/kernel/signal.c | |||
@@ -25,6 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/sched.h> | 27 | #include <linux/sched.h> |
28 | #include <linux/sched/task_stack.h> | ||
28 | #include <linux/mm.h> | 29 | #include <linux/mm.h> |
29 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
30 | #include <linux/signal.h> | 31 | #include <linux/signal.h> |
diff --git a/arch/h8300/kernel/traps.c b/arch/h8300/kernel/traps.c index 044a36125846..e47a9e0dc278 100644 --- a/arch/h8300/kernel/traps.c +++ b/arch/h8300/kernel/traps.c | |||
@@ -16,6 +16,8 @@ | |||
16 | 16 | ||
17 | #include <linux/types.h> | 17 | #include <linux/types.h> |
18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
19 | #include <linux/sched/debug.h> | ||
20 | #include <linux/mm_types.h> | ||
19 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
20 | #include <linux/errno.h> | 22 | #include <linux/errno.h> |
21 | #include <linux/init.h> | 23 | #include <linux/init.h> |
diff --git a/arch/hexagon/include/asm/mmu_context.h b/arch/hexagon/include/asm/mmu_context.h index d423d2e73c30..d8a071afdd1d 100644 --- a/arch/hexagon/include/asm/mmu_context.h +++ b/arch/hexagon/include/asm/mmu_context.h | |||
@@ -21,6 +21,8 @@ | |||
21 | #ifndef _ASM_MMU_CONTEXT_H | 21 | #ifndef _ASM_MMU_CONTEXT_H |
22 | #define _ASM_MMU_CONTEXT_H | 22 | #define _ASM_MMU_CONTEXT_H |
23 | 23 | ||
24 | #include <linux/mm_types.h> | ||
25 | |||
24 | #include <asm/setup.h> | 26 | #include <asm/setup.h> |
25 | #include <asm/page.h> | 27 | #include <asm/page.h> |
26 | #include <asm/pgalloc.h> | 28 | #include <asm/pgalloc.h> |
diff --git a/arch/hexagon/kernel/kgdb.c b/arch/hexagon/kernel/kgdb.c index 62dece3ad827..16c24b22d0b2 100644 --- a/arch/hexagon/kernel/kgdb.c +++ b/arch/hexagon/kernel/kgdb.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <linux/irq.h> | 21 | #include <linux/irq.h> |
22 | #include <linux/sched.h> | 22 | #include <linux/sched.h> |
23 | #include <linux/sched/task_stack.h> | ||
23 | #include <linux/kdebug.h> | 24 | #include <linux/kdebug.h> |
24 | #include <linux/kgdb.h> | 25 | #include <linux/kgdb.h> |
25 | 26 | ||
diff --git a/arch/hexagon/kernel/process.c b/arch/hexagon/kernel/process.c index d9edfd3fc52a..de715bab7956 100644 --- a/arch/hexagon/kernel/process.c +++ b/arch/hexagon/kernel/process.c | |||
@@ -19,6 +19,9 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
22 | #include <linux/sched/debug.h> | ||
23 | #include <linux/sched/task.h> | ||
24 | #include <linux/sched/task_stack.h> | ||
22 | #include <linux/types.h> | 25 | #include <linux/types.h> |
23 | #include <linux/module.h> | 26 | #include <linux/module.h> |
24 | #include <linux/tick.h> | 27 | #include <linux/tick.h> |
diff --git a/arch/hexagon/kernel/ptrace.c b/arch/hexagon/kernel/ptrace.c index 390a9ad14ca1..ecd75e2e8eb3 100644 --- a/arch/hexagon/kernel/ptrace.c +++ b/arch/hexagon/kernel/ptrace.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/sched.h> | 24 | #include <linux/sched.h> |
25 | #include <linux/sched/task_stack.h> | ||
25 | #include <linux/mm.h> | 26 | #include <linux/mm.h> |
26 | #include <linux/smp.h> | 27 | #include <linux/smp.h> |
27 | #include <linux/errno.h> | 28 | #include <linux/errno.h> |
diff --git a/arch/hexagon/kernel/signal.c b/arch/hexagon/kernel/signal.c index c6b22b9945a7..78aa7304a5c9 100644 --- a/arch/hexagon/kernel/signal.c +++ b/arch/hexagon/kernel/signal.c | |||
@@ -21,6 +21,8 @@ | |||
21 | #include <linux/linkage.h> | 21 | #include <linux/linkage.h> |
22 | #include <linux/syscalls.h> | 22 | #include <linux/syscalls.h> |
23 | #include <linux/tracehook.h> | 23 | #include <linux/tracehook.h> |
24 | #include <linux/sched/task_stack.h> | ||
25 | |||
24 | #include <asm/registers.h> | 26 | #include <asm/registers.h> |
25 | #include <asm/thread_info.h> | 27 | #include <asm/thread_info.h> |
26 | #include <asm/unistd.h> | 28 | #include <asm/unistd.h> |
diff --git a/arch/hexagon/kernel/smp.c b/arch/hexagon/kernel/smp.c index c02a6455839e..5dbc15549e01 100644 --- a/arch/hexagon/kernel/smp.c +++ b/arch/hexagon/kernel/smp.c | |||
@@ -25,10 +25,11 @@ | |||
25 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/percpu.h> | 27 | #include <linux/percpu.h> |
28 | #include <linux/sched.h> | 28 | #include <linux/sched/mm.h> |
29 | #include <linux/smp.h> | 29 | #include <linux/smp.h> |
30 | #include <linux/spinlock.h> | 30 | #include <linux/spinlock.h> |
31 | #include <linux/cpu.h> | 31 | #include <linux/cpu.h> |
32 | #include <linux/mm_types.h> | ||
32 | 33 | ||
33 | #include <asm/time.h> /* timer_interrupt */ | 34 | #include <asm/time.h> /* timer_interrupt */ |
34 | #include <asm/hexagon_vm.h> | 35 | #include <asm/hexagon_vm.h> |
diff --git a/arch/hexagon/kernel/stacktrace.c b/arch/hexagon/kernel/stacktrace.c index f94918b449a8..41866a06adf7 100644 --- a/arch/hexagon/kernel/stacktrace.c +++ b/arch/hexagon/kernel/stacktrace.c | |||
@@ -19,6 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
22 | #include <linux/sched/task_stack.h> | ||
22 | #include <linux/stacktrace.h> | 23 | #include <linux/stacktrace.h> |
23 | #include <linux/thread_info.h> | 24 | #include <linux/thread_info.h> |
24 | #include <linux/module.h> | 25 | #include <linux/module.h> |
diff --git a/arch/hexagon/kernel/traps.c b/arch/hexagon/kernel/traps.c index 110dab152f82..2942a9204a9a 100644 --- a/arch/hexagon/kernel/traps.c +++ b/arch/hexagon/kernel/traps.c | |||
@@ -19,7 +19,9 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/sched.h> | 22 | #include <linux/sched/signal.h> |
23 | #include <linux/sched/debug.h> | ||
24 | #include <linux/sched/task_stack.h> | ||
23 | #include <linux/module.h> | 25 | #include <linux/module.h> |
24 | #include <linux/kallsyms.h> | 26 | #include <linux/kallsyms.h> |
25 | #include <linux/kdebug.h> | 27 | #include <linux/kdebug.h> |
diff --git a/arch/hexagon/kernel/vm_events.c b/arch/hexagon/kernel/vm_events.c index 741aaa917cda..04f57ef22009 100644 --- a/arch/hexagon/kernel/vm_events.c +++ b/arch/hexagon/kernel/vm_events.c | |||
@@ -19,6 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/sched/debug.h> | ||
22 | #include <asm/registers.h> | 23 | #include <asm/registers.h> |
23 | #include <linux/irq.h> | 24 | #include <linux/irq.h> |
24 | #include <linux/hardirq.h> | 25 | #include <linux/hardirq.h> |
diff --git a/arch/hexagon/mm/vm_fault.c b/arch/hexagon/mm/vm_fault.c index 489875fd2be4..3eec33c5cfd7 100644 --- a/arch/hexagon/mm/vm_fault.c +++ b/arch/hexagon/mm/vm_fault.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <asm/traps.h> | 28 | #include <asm/traps.h> |
29 | #include <linux/uaccess.h> | 29 | #include <linux/uaccess.h> |
30 | #include <linux/mm.h> | 30 | #include <linux/mm.h> |
31 | #include <linux/sched/signal.h> | ||
31 | #include <linux/signal.h> | 32 | #include <linux/signal.h> |
32 | #include <linux/extable.h> | 33 | #include <linux/extable.h> |
33 | #include <linux/hardirq.h> | 34 | #include <linux/hardirq.h> |
diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c index 21fd50def270..de8cba121013 100644 --- a/arch/ia64/hp/sim/simserial.c +++ b/arch/ia64/hp/sim/simserial.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/sched/debug.h> | ||
17 | #include <linux/tty.h> | 18 | #include <linux/tty.h> |
18 | #include <linux/tty_flip.h> | 19 | #include <linux/tty_flip.h> |
19 | #include <linux/major.h> | 20 | #include <linux/major.h> |
diff --git a/arch/ia64/include/asm/mmu_context.h b/arch/ia64/include/asm/mmu_context.h index 7f2a456603cb..9b99368633b5 100644 --- a/arch/ia64/include/asm/mmu_context.h +++ b/arch/ia64/include/asm/mmu_context.h | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/compiler.h> | 26 | #include <linux/compiler.h> |
27 | #include <linux/percpu.h> | 27 | #include <linux/percpu.h> |
28 | #include <linux/sched.h> | 28 | #include <linux/sched.h> |
29 | #include <linux/mm_types.h> | ||
29 | #include <linux/spinlock.h> | 30 | #include <linux/spinlock.h> |
30 | 31 | ||
31 | #include <asm/processor.h> | 32 | #include <asm/processor.h> |
diff --git a/arch/ia64/include/asm/pgtable.h b/arch/ia64/include/asm/pgtable.h index 9f3ed9ee8f13..384794e665fc 100644 --- a/arch/ia64/include/asm/pgtable.h +++ b/arch/ia64/include/asm/pgtable.h | |||
@@ -147,7 +147,7 @@ | |||
147 | 147 | ||
148 | # ifndef __ASSEMBLY__ | 148 | # ifndef __ASSEMBLY__ |
149 | 149 | ||
150 | #include <linux/sched.h> /* for mm_struct */ | 150 | #include <linux/sched/mm.h> /* for mm_struct */ |
151 | #include <linux/bitops.h> | 151 | #include <linux/bitops.h> |
152 | #include <asm/cacheflush.h> | 152 | #include <asm/cacheflush.h> |
153 | #include <asm/mmu_context.h> | 153 | #include <asm/mmu_context.h> |
diff --git a/arch/ia64/include/asm/processor.h b/arch/ia64/include/asm/processor.h index 03911a336406..26a63d69c599 100644 --- a/arch/ia64/include/asm/processor.h +++ b/arch/ia64/include/asm/processor.h | |||
@@ -19,8 +19,6 @@ | |||
19 | #include <asm/ptrace.h> | 19 | #include <asm/ptrace.h> |
20 | #include <asm/ustack.h> | 20 | #include <asm/ustack.h> |
21 | 21 | ||
22 | #define ARCH_HAS_PREFETCH_SWITCH_STACK | ||
23 | |||
24 | #define IA64_NUM_PHYS_STACK_REG 96 | 22 | #define IA64_NUM_PHYS_STACK_REG 96 |
25 | #define IA64_NUM_DBG_REGS 8 | 23 | #define IA64_NUM_DBG_REGS 8 |
26 | 24 | ||
diff --git a/arch/ia64/kernel/asm-offsets.c b/arch/ia64/kernel/asm-offsets.c index 60ef83e6db71..8786c8b4f187 100644 --- a/arch/ia64/kernel/asm-offsets.c +++ b/arch/ia64/kernel/asm-offsets.c | |||
@@ -6,7 +6,7 @@ | |||
6 | 6 | ||
7 | #define ASM_OFFSETS_C 1 | 7 | #define ASM_OFFSETS_C 1 |
8 | 8 | ||
9 | #include <linux/sched.h> | 9 | #include <linux/sched/signal.h> |
10 | #include <linux/pid.h> | 10 | #include <linux/pid.h> |
11 | #include <linux/clocksource.h> | 11 | #include <linux/clocksource.h> |
12 | #include <linux/kbuild.h> | 12 | #include <linux/kbuild.h> |
diff --git a/arch/ia64/kernel/brl_emu.c b/arch/ia64/kernel/brl_emu.c index 8682df6263d6..987b11be0021 100644 --- a/arch/ia64/kernel/brl_emu.c +++ b/arch/ia64/kernel/brl_emu.c | |||
@@ -8,7 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/sched.h> | 11 | #include <linux/sched/signal.h> |
12 | #include <linux/uaccess.h> | 12 | #include <linux/uaccess.h> |
13 | #include <asm/processor.h> | 13 | #include <asm/processor.h> |
14 | 14 | ||
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S index 6f27a663177c..e7a716b09350 100644 --- a/arch/ia64/kernel/entry.S +++ b/arch/ia64/kernel/entry.S | |||
@@ -455,29 +455,6 @@ GLOBAL_ENTRY(load_switch_stack) | |||
455 | br.cond.sptk.many b7 | 455 | br.cond.sptk.many b7 |
456 | END(load_switch_stack) | 456 | END(load_switch_stack) |
457 | 457 | ||
458 | GLOBAL_ENTRY(prefetch_stack) | ||
459 | add r14 = -IA64_SWITCH_STACK_SIZE, sp | ||
460 | add r15 = IA64_TASK_THREAD_KSP_OFFSET, in0 | ||
461 | ;; | ||
462 | ld8 r16 = [r15] // load next's stack pointer | ||
463 | lfetch.fault.excl [r14], 128 | ||
464 | ;; | ||
465 | lfetch.fault.excl [r14], 128 | ||
466 | lfetch.fault [r16], 128 | ||
467 | ;; | ||
468 | lfetch.fault.excl [r14], 128 | ||
469 | lfetch.fault [r16], 128 | ||
470 | ;; | ||
471 | lfetch.fault.excl [r14], 128 | ||
472 | lfetch.fault [r16], 128 | ||
473 | ;; | ||
474 | lfetch.fault.excl [r14], 128 | ||
475 | lfetch.fault [r16], 128 | ||
476 | ;; | ||
477 | lfetch.fault [r16], 128 | ||
478 | br.ret.sptk.many rp | ||
479 | END(prefetch_stack) | ||
480 | |||
481 | /* | 458 | /* |
482 | * Invoke a system call, but do some tracing before and after the call. | 459 | * Invoke a system call, but do some tracing before and after the call. |
483 | * We MUST preserve the current register frame throughout this routine | 460 | * We MUST preserve the current register frame throughout this routine |
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c index 9509cc73b9c6..79c7c46d7dc1 100644 --- a/arch/ia64/kernel/mca.c +++ b/arch/ia64/kernel/mca.c | |||
@@ -72,7 +72,9 @@ | |||
72 | #include <linux/jiffies.h> | 72 | #include <linux/jiffies.h> |
73 | #include <linux/types.h> | 73 | #include <linux/types.h> |
74 | #include <linux/init.h> | 74 | #include <linux/init.h> |
75 | #include <linux/sched.h> | 75 | #include <linux/sched/signal.h> |
76 | #include <linux/sched/debug.h> | ||
77 | #include <linux/sched/task.h> | ||
76 | #include <linux/interrupt.h> | 78 | #include <linux/interrupt.h> |
77 | #include <linux/irq.h> | 79 | #include <linux/irq.h> |
78 | #include <linux/bootmem.h> | 80 | #include <linux/bootmem.h> |
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index 677a86826771..09f86ebfcc7b 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -22,6 +22,8 @@ | |||
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/sched.h> | 24 | #include <linux/sched.h> |
25 | #include <linux/sched/task.h> | ||
26 | #include <linux/sched/task_stack.h> | ||
25 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
26 | #include <linux/proc_fs.h> | 28 | #include <linux/proc_fs.h> |
27 | #include <linux/seq_file.h> | 29 | #include <linux/seq_file.h> |
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index 52deab683ba1..d344d0d691aa 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c | |||
@@ -20,6 +20,10 @@ | |||
20 | #include <linux/notifier.h> | 20 | #include <linux/notifier.h> |
21 | #include <linux/personality.h> | 21 | #include <linux/personality.h> |
22 | #include <linux/sched.h> | 22 | #include <linux/sched.h> |
23 | #include <linux/sched/debug.h> | ||
24 | #include <linux/sched/hotplug.h> | ||
25 | #include <linux/sched/task.h> | ||
26 | #include <linux/sched/task_stack.h> | ||
23 | #include <linux/stddef.h> | 27 | #include <linux/stddef.h> |
24 | #include <linux/thread_info.h> | 28 | #include <linux/thread_info.h> |
25 | #include <linux/unistd.h> | 29 | #include <linux/unistd.h> |
diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c index 0b1153e610ea..3f8293378a83 100644 --- a/arch/ia64/kernel/ptrace.c +++ b/arch/ia64/kernel/ptrace.c | |||
@@ -11,6 +11,8 @@ | |||
11 | */ | 11 | */ |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/sched/task.h> | ||
15 | #include <linux/sched/task_stack.h> | ||
14 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
15 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
16 | #include <linux/ptrace.h> | 18 | #include <linux/ptrace.h> |
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index d68322966f33..23e3fd61e335 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c | |||
@@ -29,9 +29,12 @@ | |||
29 | #include <linux/bootmem.h> | 29 | #include <linux/bootmem.h> |
30 | #include <linux/console.h> | 30 | #include <linux/console.h> |
31 | #include <linux/delay.h> | 31 | #include <linux/delay.h> |
32 | #include <linux/cpu.h> | ||
32 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
33 | #include <linux/reboot.h> | 34 | #include <linux/reboot.h> |
34 | #include <linux/sched.h> | 35 | #include <linux/sched/mm.h> |
36 | #include <linux/sched/clock.h> | ||
37 | #include <linux/sched/task_stack.h> | ||
35 | #include <linux/seq_file.h> | 38 | #include <linux/seq_file.h> |
36 | #include <linux/string.h> | 39 | #include <linux/string.h> |
37 | #include <linux/threads.h> | 40 | #include <linux/threads.h> |
diff --git a/arch/ia64/kernel/sys_ia64.c b/arch/ia64/kernel/sys_ia64.c index a09c12230bc5..5ce927c854a6 100644 --- a/arch/ia64/kernel/sys_ia64.c +++ b/arch/ia64/kernel/sys_ia64.c | |||
@@ -10,6 +10,8 @@ | |||
10 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
11 | #include <linux/mman.h> | 11 | #include <linux/mman.h> |
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/sched/mm.h> | ||
14 | #include <linux/sched/task_stack.h> | ||
13 | #include <linux/shm.h> | 15 | #include <linux/shm.h> |
14 | #include <linux/file.h> /* doh, must come after sched.h... */ | 16 | #include <linux/file.h> /* doh, must come after sched.h... */ |
15 | #include <linux/smp.h> | 17 | #include <linux/smp.h> |
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c index faa116822c4c..aa7be020a904 100644 --- a/arch/ia64/kernel/time.c +++ b/arch/ia64/kernel/time.c | |||
@@ -16,12 +16,13 @@ | |||
16 | #include <linux/profile.h> | 16 | #include <linux/profile.h> |
17 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
18 | #include <linux/time.h> | 18 | #include <linux/time.h> |
19 | #include <linux/nmi.h> | ||
19 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
20 | #include <linux/efi.h> | 21 | #include <linux/efi.h> |
21 | #include <linux/timex.h> | 22 | #include <linux/timex.h> |
22 | #include <linux/timekeeper_internal.h> | 23 | #include <linux/timekeeper_internal.h> |
23 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
24 | #include <linux/cputime.h> | 25 | #include <linux/sched/cputime.h> |
25 | 26 | ||
26 | #include <asm/machvec.h> | 27 | #include <asm/machvec.h> |
27 | #include <asm/delay.h> | 28 | #include <asm/delay.h> |
diff --git a/arch/ia64/kernel/traps.c b/arch/ia64/kernel/traps.c index 8981ce98afb3..7b1fe9462158 100644 --- a/arch/ia64/kernel/traps.c +++ b/arch/ia64/kernel/traps.c | |||
@@ -9,7 +9,8 @@ | |||
9 | 9 | ||
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/sched.h> | 12 | #include <linux/sched/signal.h> |
13 | #include <linux/sched/debug.h> | ||
13 | #include <linux/tty.h> | 14 | #include <linux/tty.h> |
14 | #include <linux/vt_kern.h> /* For unblank_screen() */ | 15 | #include <linux/vt_kern.h> /* For unblank_screen() */ |
15 | #include <linux/export.h> | 16 | #include <linux/export.h> |
diff --git a/arch/ia64/kernel/unaligned.c b/arch/ia64/kernel/unaligned.c index 99348d7f2255..a13680ca1e61 100644 --- a/arch/ia64/kernel/unaligned.c +++ b/arch/ia64/kernel/unaligned.c | |||
@@ -15,7 +15,7 @@ | |||
15 | */ | 15 | */ |
16 | #include <linux/jiffies.h> | 16 | #include <linux/jiffies.h> |
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/sched.h> | 18 | #include <linux/sched/signal.h> |
19 | #include <linux/tty.h> | 19 | #include <linux/tty.h> |
20 | #include <linux/extable.h> | 20 | #include <linux/extable.h> |
21 | #include <linux/ratelimit.h> | 21 | #include <linux/ratelimit.h> |
diff --git a/arch/ia64/kernel/uncached.c b/arch/ia64/kernel/uncached.c index f3976da36721..583f7ff6b589 100644 --- a/arch/ia64/kernel/uncached.c +++ b/arch/ia64/kernel/uncached.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/errno.h> | 19 | #include <linux/errno.h> |
20 | #include <linux/string.h> | 20 | #include <linux/string.h> |
21 | #include <linux/efi.h> | 21 | #include <linux/efi.h> |
22 | #include <linux/nmi.h> | ||
22 | #include <linux/genalloc.h> | 23 | #include <linux/genalloc.h> |
23 | #include <linux/gfp.h> | 24 | #include <linux/gfp.h> |
24 | #include <asm/page.h> | 25 | #include <asm/page.h> |
diff --git a/arch/ia64/mm/fault.c b/arch/ia64/mm/fault.c index 7f2feb21753c..15f09cfff335 100644 --- a/arch/ia64/mm/fault.c +++ b/arch/ia64/mm/fault.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * Copyright (C) 1998-2002 Hewlett-Packard Co | 4 | * Copyright (C) 1998-2002 Hewlett-Packard Co |
5 | * David Mosberger-Tang <davidm@hpl.hp.com> | 5 | * David Mosberger-Tang <davidm@hpl.hp.com> |
6 | */ | 6 | */ |
7 | #include <linux/sched.h> | 7 | #include <linux/sched/signal.h> |
8 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
9 | #include <linux/mm.h> | 9 | #include <linux/mm.h> |
10 | #include <linux/extable.h> | 10 | #include <linux/extable.h> |
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c index 06cdaef54b2e..8f3efa682ee8 100644 --- a/arch/ia64/mm/init.c +++ b/arch/ia64/mm/init.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/elf.h> | 12 | #include <linux/elf.h> |
13 | #include <linux/memblock.h> | 13 | #include <linux/memblock.h> |
14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
15 | #include <linux/sched/signal.h> | ||
15 | #include <linux/mmzone.h> | 16 | #include <linux/mmzone.h> |
16 | #include <linux/module.h> | 17 | #include <linux/module.h> |
17 | #include <linux/personality.h> | 18 | #include <linux/personality.h> |
diff --git a/arch/ia64/sn/kernel/sn2/sn2_smp.c b/arch/ia64/sn/kernel/sn2/sn2_smp.c index c98dc965fe82..b73b0ebf8214 100644 --- a/arch/ia64/sn/kernel/sn2/sn2_smp.c +++ b/arch/ia64/sn/kernel/sn2/sn2_smp.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/spinlock.h> | 13 | #include <linux/spinlock.h> |
14 | #include <linux/threads.h> | 14 | #include <linux/threads.h> |
15 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
16 | #include <linux/mm_types.h> | ||
16 | #include <linux/smp.h> | 17 | #include <linux/smp.h> |
17 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
18 | #include <linux/irq.h> | 19 | #include <linux/irq.h> |
diff --git a/arch/m32r/include/asm/mmu_context.h b/arch/m32r/include/asm/mmu_context.h index 9fc78fc44445..1230b7050d8e 100644 --- a/arch/m32r/include/asm/mmu_context.h +++ b/arch/m32r/include/asm/mmu_context.h | |||
@@ -12,6 +12,8 @@ | |||
12 | #ifndef __ASSEMBLY__ | 12 | #ifndef __ASSEMBLY__ |
13 | 13 | ||
14 | #include <linux/atomic.h> | 14 | #include <linux/atomic.h> |
15 | #include <linux/mm_types.h> | ||
16 | |||
15 | #include <asm/pgalloc.h> | 17 | #include <asm/pgalloc.h> |
16 | #include <asm/mmu.h> | 18 | #include <asm/mmu.h> |
17 | #include <asm/tlbflush.h> | 19 | #include <asm/tlbflush.h> |
diff --git a/arch/m32r/kernel/process.c b/arch/m32r/kernel/process.c index e0568bee60c0..d8ffcfec599c 100644 --- a/arch/m32r/kernel/process.c +++ b/arch/m32r/kernel/process.c | |||
@@ -22,6 +22,9 @@ | |||
22 | 22 | ||
23 | #include <linux/fs.h> | 23 | #include <linux/fs.h> |
24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
25 | #include <linux/sched/debug.h> | ||
26 | #include <linux/sched/task.h> | ||
27 | #include <linux/sched/task_stack.h> | ||
25 | #include <linux/module.h> | 28 | #include <linux/module.h> |
26 | #include <linux/ptrace.h> | 29 | #include <linux/ptrace.h> |
27 | #include <linux/unistd.h> | 30 | #include <linux/unistd.h> |
diff --git a/arch/m32r/kernel/ptrace.c b/arch/m32r/kernel/ptrace.c index a68acb9fa515..2d887400e30e 100644 --- a/arch/m32r/kernel/ptrace.c +++ b/arch/m32r/kernel/ptrace.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
19 | #include <linux/sched/task_stack.h> | ||
19 | #include <linux/mm.h> | 20 | #include <linux/mm.h> |
20 | #include <linux/err.h> | 21 | #include <linux/err.h> |
21 | #include <linux/smp.h> | 22 | #include <linux/smp.h> |
diff --git a/arch/m32r/kernel/setup.c b/arch/m32r/kernel/setup.c index b18bc0bd6544..1a9e977287e6 100644 --- a/arch/m32r/kernel/setup.c +++ b/arch/m32r/kernel/setup.c | |||
@@ -11,7 +11,7 @@ | |||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/stddef.h> | 12 | #include <linux/stddef.h> |
13 | #include <linux/fs.h> | 13 | #include <linux/fs.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched/mm.h> |
15 | #include <linux/ioport.h> | 15 | #include <linux/ioport.h> |
16 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
17 | #include <linux/bootmem.h> | 17 | #include <linux/bootmem.h> |
diff --git a/arch/m32r/kernel/smpboot.c b/arch/m32r/kernel/smpboot.c index f98d2f6519d6..a7d04684d2c7 100644 --- a/arch/m32r/kernel/smpboot.c +++ b/arch/m32r/kernel/smpboot.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <linux/kernel.h> | 45 | #include <linux/kernel.h> |
46 | #include <linux/mm.h> | 46 | #include <linux/mm.h> |
47 | #include <linux/sched.h> | 47 | #include <linux/sched.h> |
48 | #include <linux/sched/task.h> | ||
48 | #include <linux/err.h> | 49 | #include <linux/err.h> |
49 | #include <linux/irq.h> | 50 | #include <linux/irq.h> |
50 | #include <linux/bootmem.h> | 51 | #include <linux/bootmem.h> |
diff --git a/arch/m32r/kernel/traps.c b/arch/m32r/kernel/traps.c index c3c5fdfae920..647dd94a0c39 100644 --- a/arch/m32r/kernel/traps.c +++ b/arch/m32r/kernel/traps.c | |||
@@ -14,7 +14,11 @@ | |||
14 | #include <linux/kallsyms.h> | 14 | #include <linux/kallsyms.h> |
15 | #include <linux/stddef.h> | 15 | #include <linux/stddef.h> |
16 | #include <linux/ptrace.h> | 16 | #include <linux/ptrace.h> |
17 | #include <linux/sched/debug.h> | ||
18 | #include <linux/sched/task_stack.h> | ||
17 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
20 | #include <linux/cpu.h> | ||
21 | |||
18 | #include <asm/page.h> | 22 | #include <asm/page.h> |
19 | #include <asm/processor.h> | 23 | #include <asm/processor.h> |
20 | 24 | ||
diff --git a/arch/m68k/include/asm/a.out-core.h b/arch/m68k/include/asm/a.out-core.h index f6bfc1d63ff6..ae91ea6bb303 100644 --- a/arch/m68k/include/asm/a.out-core.h +++ b/arch/m68k/include/asm/a.out-core.h | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <linux/user.h> | 17 | #include <linux/user.h> |
18 | #include <linux/elfcore.h> | 18 | #include <linux/elfcore.h> |
19 | #include <linux/mm_types.h> | ||
19 | 20 | ||
20 | /* | 21 | /* |
21 | * fill in the user structure for an a.out core dump | 22 | * fill in the user structure for an a.out core dump |
diff --git a/arch/m68k/include/asm/mmu_context.h b/arch/m68k/include/asm/mmu_context.h index dc3be991d634..4a6ae6dffa34 100644 --- a/arch/m68k/include/asm/mmu_context.h +++ b/arch/m68k/include/asm/mmu_context.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define __M68K_MMU_CONTEXT_H | 2 | #define __M68K_MMU_CONTEXT_H |
3 | 3 | ||
4 | #include <asm-generic/mm_hooks.h> | 4 | #include <asm-generic/mm_hooks.h> |
5 | #include <linux/mm_types.h> | ||
5 | 6 | ||
6 | static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) | 7 | static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) |
7 | { | 8 | { |
diff --git a/arch/m68k/kernel/process.c b/arch/m68k/kernel/process.c index f0a8e9b332cd..e475c945c8b2 100644 --- a/arch/m68k/kernel/process.c +++ b/arch/m68k/kernel/process.c | |||
@@ -13,6 +13,9 @@ | |||
13 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
16 | #include <linux/sched/debug.h> | ||
17 | #include <linux/sched/task.h> | ||
18 | #include <linux/sched/task_stack.h> | ||
16 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
17 | #include <linux/mm.h> | 20 | #include <linux/mm.h> |
18 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
diff --git a/arch/m68k/kernel/ptrace.c b/arch/m68k/kernel/ptrace.c index 9cd86d7343a6..748c63bd0081 100644 --- a/arch/m68k/kernel/ptrace.c +++ b/arch/m68k/kernel/ptrace.c | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
15 | #include <linux/sched/task_stack.h> | ||
15 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
16 | #include <linux/smp.h> | 17 | #include <linux/smp.h> |
17 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
diff --git a/arch/m68k/kernel/time.c b/arch/m68k/kernel/time.c index 4e5aa2f4f522..87160b4415fb 100644 --- a/arch/m68k/kernel/time.c +++ b/arch/m68k/kernel/time.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/export.h> | 14 | #include <linux/export.h> |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/sched/loadavg.h> | ||
17 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
18 | #include <linux/param.h> | 19 | #include <linux/param.h> |
19 | #include <linux/string.h> | 20 | #include <linux/string.h> |
diff --git a/arch/m68k/kernel/traps.c b/arch/m68k/kernel/traps.c index 558f38402737..a926d2c88898 100644 --- a/arch/m68k/kernel/traps.c +++ b/arch/m68k/kernel/traps.c | |||
@@ -19,6 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
22 | #include <linux/sched/debug.h> | ||
22 | #include <linux/signal.h> | 23 | #include <linux/signal.h> |
23 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
24 | #include <linux/mm.h> | 25 | #include <linux/mm.h> |
diff --git a/arch/m68k/mac/macints.c b/arch/m68k/mac/macints.c index b5cd06df71fd..9637dee90dac 100644 --- a/arch/m68k/mac/macints.c +++ b/arch/m68k/mac/macints.c | |||
@@ -110,6 +110,7 @@ | |||
110 | #include <linux/types.h> | 110 | #include <linux/types.h> |
111 | #include <linux/kernel.h> | 111 | #include <linux/kernel.h> |
112 | #include <linux/sched.h> | 112 | #include <linux/sched.h> |
113 | #include <linux/sched/debug.h> | ||
113 | #include <linux/interrupt.h> | 114 | #include <linux/interrupt.h> |
114 | #include <linux/irq.h> | 115 | #include <linux/irq.h> |
115 | #include <linux/delay.h> | 116 | #include <linux/delay.h> |
diff --git a/arch/m68k/sun3/mmu_emu.c b/arch/m68k/sun3/mmu_emu.c index e9d7fbe4d5ae..7fdc61525e0b 100644 --- a/arch/m68k/sun3/mmu_emu.c +++ b/arch/m68k/sun3/mmu_emu.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/bootmem.h> | 15 | #include <linux/bootmem.h> |
16 | #include <linux/bitops.h> | 16 | #include <linux/bitops.h> |
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/sched/mm.h> | ||
18 | 19 | ||
19 | #include <asm/setup.h> | 20 | #include <asm/setup.h> |
20 | #include <asm/traps.h> | 21 | #include <asm/traps.h> |
diff --git a/arch/metag/include/asm/mmu_context.h b/arch/metag/include/asm/mmu_context.h index ae2a71b5e0be..2e0312748197 100644 --- a/arch/metag/include/asm/mmu_context.h +++ b/arch/metag/include/asm/mmu_context.h | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <asm/cacheflush.h> | 9 | #include <asm/cacheflush.h> |
10 | 10 | ||
11 | #include <linux/io.h> | 11 | #include <linux/io.h> |
12 | #include <linux/mm_types.h> | ||
12 | 13 | ||
13 | static inline void enter_lazy_tlb(struct mm_struct *mm, | 14 | static inline void enter_lazy_tlb(struct mm_struct *mm, |
14 | struct task_struct *tsk) | 15 | struct task_struct *tsk) |
diff --git a/arch/metag/kernel/process.c b/arch/metag/kernel/process.c index 35062796edf2..c4606ce743d2 100644 --- a/arch/metag/kernel/process.c +++ b/arch/metag/kernel/process.c | |||
@@ -8,6 +8,9 @@ | |||
8 | #include <linux/errno.h> | 8 | #include <linux/errno.h> |
9 | #include <linux/export.h> | 9 | #include <linux/export.h> |
10 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
11 | #include <linux/sched/debug.h> | ||
12 | #include <linux/sched/task.h> | ||
13 | #include <linux/sched/task_stack.h> | ||
11 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
12 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
13 | #include <linux/unistd.h> | 16 | #include <linux/unistd.h> |
diff --git a/arch/metag/kernel/ptrace.c b/arch/metag/kernel/ptrace.c index 7563628822bd..5fd16ee5280c 100644 --- a/arch/metag/kernel/ptrace.c +++ b/arch/metag/kernel/ptrace.c | |||
@@ -15,6 +15,8 @@ | |||
15 | #include <linux/tracehook.h> | 15 | #include <linux/tracehook.h> |
16 | #include <linux/elf.h> | 16 | #include <linux/elf.h> |
17 | #include <linux/uaccess.h> | 17 | #include <linux/uaccess.h> |
18 | #include <linux/sched/task_stack.h> | ||
19 | |||
18 | #include <trace/syscall.h> | 20 | #include <trace/syscall.h> |
19 | 21 | ||
20 | #define CREATE_TRACE_POINTS | 22 | #define CREATE_TRACE_POINTS |
diff --git a/arch/metag/kernel/signal.c b/arch/metag/kernel/signal.c index ce49d429c74a..338925d808e6 100644 --- a/arch/metag/kernel/signal.c +++ b/arch/metag/kernel/signal.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/sched.h> | 9 | #include <linux/sched.h> |
10 | #include <linux/sched/task_stack.h> | ||
10 | #include <linux/mm.h> | 11 | #include <linux/mm.h> |
11 | #include <linux/smp.h> | 12 | #include <linux/smp.h> |
12 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
diff --git a/arch/metag/kernel/smp.c b/arch/metag/kernel/smp.c index c622293254e4..232a12bf3f99 100644 --- a/arch/metag/kernel/smp.c +++ b/arch/metag/kernel/smp.c | |||
@@ -12,7 +12,9 @@ | |||
12 | #include <linux/delay.h> | 12 | #include <linux/delay.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/spinlock.h> | 14 | #include <linux/spinlock.h> |
15 | #include <linux/sched.h> | 15 | #include <linux/sched/mm.h> |
16 | #include <linux/sched/hotplug.h> | ||
17 | #include <linux/sched/task_stack.h> | ||
16 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
17 | #include <linux/cache.h> | 19 | #include <linux/cache.h> |
18 | #include <linux/profile.h> | 20 | #include <linux/profile.h> |
diff --git a/arch/metag/kernel/stacktrace.c b/arch/metag/kernel/stacktrace.c index 5510361d5bea..91ffc4b75c33 100644 --- a/arch/metag/kernel/stacktrace.c +++ b/arch/metag/kernel/stacktrace.c | |||
@@ -1,5 +1,7 @@ | |||
1 | #include <linux/export.h> | 1 | #include <linux/export.h> |
2 | #include <linux/sched.h> | 2 | #include <linux/sched.h> |
3 | #include <linux/sched/debug.h> | ||
4 | #include <linux/sched/task_stack.h> | ||
3 | #include <linux/stacktrace.h> | 5 | #include <linux/stacktrace.h> |
4 | 6 | ||
5 | #include <asm/stacktrace.h> | 7 | #include <asm/stacktrace.h> |
diff --git a/arch/metag/kernel/traps.c b/arch/metag/kernel/traps.c index 17b2e2e38d5a..444851e510d5 100644 --- a/arch/metag/kernel/traps.c +++ b/arch/metag/kernel/traps.c | |||
@@ -10,6 +10,9 @@ | |||
10 | 10 | ||
11 | #include <linux/export.h> | 11 | #include <linux/export.h> |
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/sched/debug.h> | ||
14 | #include <linux/sched/task.h> | ||
15 | #include <linux/sched/task_stack.h> | ||
13 | #include <linux/signal.h> | 16 | #include <linux/signal.h> |
14 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
15 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
diff --git a/arch/metag/mm/fault.c b/arch/metag/mm/fault.c index c765b3621b9b..5055477486b6 100644 --- a/arch/metag/mm/fault.c +++ b/arch/metag/mm/fault.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/mm.h> | 8 | #include <linux/mm.h> |
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/ptrace.h> | 10 | #include <linux/ptrace.h> |
11 | #include <linux/sched/debug.h> | ||
11 | #include <linux/interrupt.h> | 12 | #include <linux/interrupt.h> |
12 | #include <linux/uaccess.h> | 13 | #include <linux/uaccess.h> |
13 | 14 | ||
diff --git a/arch/metag/mm/init.c b/arch/metag/mm/init.c index c0ec116b3993..188d4d9fbed4 100644 --- a/arch/metag/mm/init.c +++ b/arch/metag/mm/init.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/percpu.h> | 12 | #include <linux/percpu.h> |
13 | #include <linux/memblock.h> | 13 | #include <linux/memblock.h> |
14 | #include <linux/initrd.h> | 14 | #include <linux/initrd.h> |
15 | #include <linux/sched/task.h> | ||
15 | 16 | ||
16 | #include <asm/setup.h> | 17 | #include <asm/setup.h> |
17 | #include <asm/page.h> | 18 | #include <asm/page.h> |
diff --git a/arch/microblaze/include/asm/mmu_context_mm.h b/arch/microblaze/include/asm/mmu_context_mm.h index d68647746448..99472d2ca340 100644 --- a/arch/microblaze/include/asm/mmu_context_mm.h +++ b/arch/microblaze/include/asm/mmu_context_mm.h | |||
@@ -12,6 +12,8 @@ | |||
12 | #define _ASM_MICROBLAZE_MMU_CONTEXT_H | 12 | #define _ASM_MICROBLAZE_MMU_CONTEXT_H |
13 | 13 | ||
14 | #include <linux/atomic.h> | 14 | #include <linux/atomic.h> |
15 | #include <linux/mm_types.h> | ||
16 | |||
15 | #include <asm/bitops.h> | 17 | #include <asm/bitops.h> |
16 | #include <asm/mmu.h> | 18 | #include <asm/mmu.h> |
17 | #include <asm-generic/mm_hooks.h> | 19 | #include <asm-generic/mm_hooks.h> |
diff --git a/arch/microblaze/kernel/exceptions.c b/arch/microblaze/kernel/exceptions.c index 42dd12a62ff5..e6f338d0496b 100644 --- a/arch/microblaze/kernel/exceptions.c +++ b/arch/microblaze/kernel/exceptions.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/signal.h> | 18 | #include <linux/signal.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/sched/debug.h> | ||
20 | #include <linux/kallsyms.h> | 21 | #include <linux/kallsyms.h> |
21 | 22 | ||
22 | #include <asm/exceptions.h> | 23 | #include <asm/exceptions.h> |
diff --git a/arch/microblaze/kernel/heartbeat.c b/arch/microblaze/kernel/heartbeat.c index 4643e3ab9414..2022130139d2 100644 --- a/arch/microblaze/kernel/heartbeat.c +++ b/arch/microblaze/kernel/heartbeat.c | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <linux/sched/loadavg.h> | ||
12 | #include <linux/io.h> | 13 | #include <linux/io.h> |
13 | 14 | ||
14 | #include <asm/setup.h> | 15 | #include <asm/setup.h> |
diff --git a/arch/microblaze/kernel/process.c b/arch/microblaze/kernel/process.c index b2dd37196b3b..e92a817e645f 100644 --- a/arch/microblaze/kernel/process.c +++ b/arch/microblaze/kernel/process.c | |||
@@ -11,6 +11,9 @@ | |||
11 | #include <linux/cpu.h> | 11 | #include <linux/cpu.h> |
12 | #include <linux/export.h> | 12 | #include <linux/export.h> |
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/sched/debug.h> | ||
15 | #include <linux/sched/task.h> | ||
16 | #include <linux/sched/task_stack.h> | ||
14 | #include <linux/pm.h> | 17 | #include <linux/pm.h> |
15 | #include <linux/tick.h> | 18 | #include <linux/tick.h> |
16 | #include <linux/bitops.h> | 19 | #include <linux/bitops.h> |
diff --git a/arch/microblaze/kernel/ptrace.c b/arch/microblaze/kernel/ptrace.c index 8cfa98cadf3d..badd286882ae 100644 --- a/arch/microblaze/kernel/ptrace.c +++ b/arch/microblaze/kernel/ptrace.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/mm.h> | 28 | #include <linux/mm.h> |
29 | #include <linux/sched.h> | 29 | #include <linux/sched.h> |
30 | #include <linux/sched/task_stack.h> | ||
30 | #include <linux/ptrace.h> | 31 | #include <linux/ptrace.h> |
31 | #include <linux/signal.h> | 32 | #include <linux/signal.h> |
32 | #include <linux/elf.h> | 33 | #include <linux/elf.h> |
diff --git a/arch/microblaze/kernel/timer.c b/arch/microblaze/kernel/timer.c index 1d6fad50fa76..999066192715 100644 --- a/arch/microblaze/kernel/timer.c +++ b/arch/microblaze/kernel/timer.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/interrupt.h> | 12 | #include <linux/interrupt.h> |
13 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
15 | #include <linux/sched/clock.h> | ||
15 | #include <linux/sched_clock.h> | 16 | #include <linux/sched_clock.h> |
16 | #include <linux/clk.h> | 17 | #include <linux/clk.h> |
17 | #include <linux/clockchips.h> | 18 | #include <linux/clockchips.h> |
diff --git a/arch/microblaze/kernel/traps.c b/arch/microblaze/kernel/traps.c index cb619533a192..45bbba9d919f 100644 --- a/arch/microblaze/kernel/traps.c +++ b/arch/microblaze/kernel/traps.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/kallsyms.h> | 13 | #include <linux/kallsyms.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
15 | #include <linux/sched/debug.h> | ||
15 | #include <linux/debug_locks.h> | 16 | #include <linux/debug_locks.h> |
16 | 17 | ||
17 | #include <asm/exceptions.h> | 18 | #include <asm/exceptions.h> |
diff --git a/arch/microblaze/kernel/unwind.c b/arch/microblaze/kernel/unwind.c index 61c04eed14d5..34c270cb11fc 100644 --- a/arch/microblaze/kernel/unwind.c +++ b/arch/microblaze/kernel/unwind.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/kallsyms.h> | 17 | #include <linux/kallsyms.h> |
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/sched/task_stack.h> | ||
20 | #include <linux/stacktrace.h> | 21 | #include <linux/stacktrace.h> |
21 | #include <linux/types.h> | 22 | #include <linux/types.h> |
22 | #include <linux/errno.h> | 23 | #include <linux/errno.h> |
diff --git a/arch/microblaze/mm/pgtable.c b/arch/microblaze/mm/pgtable.c index cc732fe357ad..4c0599239915 100644 --- a/arch/microblaze/mm/pgtable.c +++ b/arch/microblaze/mm/pgtable.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/types.h> | 31 | #include <linux/types.h> |
32 | #include <linux/vmalloc.h> | 32 | #include <linux/vmalloc.h> |
33 | #include <linux/init.h> | 33 | #include <linux/init.h> |
34 | #include <linux/mm_types.h> | ||
34 | 35 | ||
35 | #include <asm/pgtable.h> | 36 | #include <asm/pgtable.h> |
36 | #include <asm/pgalloc.h> | 37 | #include <asm/pgalloc.h> |
diff --git a/arch/mips/cavium-octeon/smp.c b/arch/mips/cavium-octeon/smp.c index 4355a4cf4d74..4b94b7fbafa3 100644 --- a/arch/mips/cavium-octeon/smp.c +++ b/arch/mips/cavium-octeon/smp.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/interrupt.h> | 11 | #include <linux/interrupt.h> |
12 | #include <linux/kernel_stat.h> | 12 | #include <linux/kernel_stat.h> |
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/sched/hotplug.h> | ||
14 | #include <linux/init.h> | 15 | #include <linux/init.h> |
15 | #include <linux/export.h> | 16 | #include <linux/export.h> |
16 | 17 | ||
diff --git a/arch/mips/include/asm/abi.h b/arch/mips/include/asm/abi.h index 940760844e2f..dba7f4b6bebf 100644 --- a/arch/mips/include/asm/abi.h +++ b/arch/mips/include/asm/abi.h | |||
@@ -9,6 +9,8 @@ | |||
9 | #ifndef _ASM_ABI_H | 9 | #ifndef _ASM_ABI_H |
10 | #define _ASM_ABI_H | 10 | #define _ASM_ABI_H |
11 | 11 | ||
12 | #include <linux/signal_types.h> | ||
13 | |||
12 | #include <asm/signal.h> | 14 | #include <asm/signal.h> |
13 | #include <asm/siginfo.h> | 15 | #include <asm/siginfo.h> |
14 | #include <asm/vdso.h> | 16 | #include <asm/vdso.h> |
diff --git a/arch/mips/include/asm/elf.h b/arch/mips/include/asm/elf.h index 7a6c466e5f2a..0eb1a75be105 100644 --- a/arch/mips/include/asm/elf.h +++ b/arch/mips/include/asm/elf.h | |||
@@ -10,6 +10,8 @@ | |||
10 | 10 | ||
11 | #include <linux/auxvec.h> | 11 | #include <linux/auxvec.h> |
12 | #include <linux/fs.h> | 12 | #include <linux/fs.h> |
13 | #include <linux/mm_types.h> | ||
14 | |||
13 | #include <uapi/linux/elf.h> | 15 | #include <uapi/linux/elf.h> |
14 | 16 | ||
15 | #include <asm/current.h> | 17 | #include <asm/current.h> |
diff --git a/arch/mips/include/asm/fpu.h b/arch/mips/include/asm/fpu.h index f06f97bd62df..321752bcbab6 100644 --- a/arch/mips/include/asm/fpu.h +++ b/arch/mips/include/asm/fpu.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #define _ASM_FPU_H | 11 | #define _ASM_FPU_H |
12 | 12 | ||
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/sched/task_stack.h> | ||
14 | #include <linux/thread_info.h> | 15 | #include <linux/thread_info.h> |
15 | #include <linux/bitops.h> | 16 | #include <linux/bitops.h> |
16 | 17 | ||
diff --git a/arch/mips/include/asm/mmu_context.h b/arch/mips/include/asm/mmu_context.h index 2abf94f72c0a..da2004cef2d5 100644 --- a/arch/mips/include/asm/mmu_context.h +++ b/arch/mips/include/asm/mmu_context.h | |||
@@ -13,8 +13,10 @@ | |||
13 | 13 | ||
14 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
15 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
16 | #include <linux/mm_types.h> | ||
16 | #include <linux/smp.h> | 17 | #include <linux/smp.h> |
17 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
19 | |||
18 | #include <asm/cacheflush.h> | 20 | #include <asm/cacheflush.h> |
19 | #include <asm/dsemul.h> | 21 | #include <asm/dsemul.h> |
20 | #include <asm/hazards.h> | 22 | #include <asm/hazards.h> |
diff --git a/arch/mips/kernel/branch.c b/arch/mips/kernel/branch.c index ae037a304ee4..b11facd11c9d 100644 --- a/arch/mips/kernel/branch.c +++ b/arch/mips/kernel/branch.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * Copyright (C) 2001 MIPS Technologies, Inc. | 7 | * Copyright (C) 2001 MIPS Technologies, Inc. |
8 | */ | 8 | */ |
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/sched.h> | 10 | #include <linux/sched/signal.h> |
11 | #include <linux/signal.h> | 11 | #include <linux/signal.h> |
12 | #include <linux/export.h> | 12 | #include <linux/export.h> |
13 | #include <asm/branch.h> | 13 | #include <asm/branch.h> |
diff --git a/arch/mips/kernel/crash.c b/arch/mips/kernel/crash.c index 5a71518be0f1..ca25cd393b1c 100644 --- a/arch/mips/kernel/crash.c +++ b/arch/mips/kernel/crash.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/irq.h> | 8 | #include <linux/irq.h> |
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
11 | #include <linux/sched/task_stack.h> | ||
11 | 12 | ||
12 | /* This keeps a track of which one is crashing cpu. */ | 13 | /* This keeps a track of which one is crashing cpu. */ |
13 | static int crashing_cpu = -1; | 14 | static int crashing_cpu = -1; |
diff --git a/arch/mips/kernel/mips-mt-fpaff.c b/arch/mips/kernel/mips-mt-fpaff.c index 1a0a3b4ecc3e..8cab633e0e5a 100644 --- a/arch/mips/kernel/mips-mt-fpaff.c +++ b/arch/mips/kernel/mips-mt-fpaff.c | |||
@@ -9,6 +9,8 @@ | |||
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <linux/sched/task.h> | ||
13 | #include <linux/cred.h> | ||
12 | #include <linux/security.h> | 14 | #include <linux/security.h> |
13 | #include <linux/types.h> | 15 | #include <linux/types.h> |
14 | #include <linux/uaccess.h> | 16 | #include <linux/uaccess.h> |
diff --git a/arch/mips/kernel/perf_event.c b/arch/mips/kernel/perf_event.c index d64056e0bb56..f298eb2ff6c2 100644 --- a/arch/mips/kernel/perf_event.c +++ b/arch/mips/kernel/perf_event.c | |||
@@ -15,6 +15,7 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/perf_event.h> | 17 | #include <linux/perf_event.h> |
18 | #include <linux/sched/task_stack.h> | ||
18 | 19 | ||
19 | #include <asm/stacktrace.h> | 20 | #include <asm/stacktrace.h> |
20 | 21 | ||
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index 803e255b6fc3..fb6b6b650719 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c | |||
@@ -11,6 +11,9 @@ | |||
11 | */ | 11 | */ |
12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/sched/debug.h> | ||
15 | #include <linux/sched/task.h> | ||
16 | #include <linux/sched/task_stack.h> | ||
14 | #include <linux/tick.h> | 17 | #include <linux/tick.h> |
15 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
16 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c index fdef26382c37..339601267265 100644 --- a/arch/mips/kernel/ptrace.c +++ b/arch/mips/kernel/ptrace.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/elf.h> | 19 | #include <linux/elf.h> |
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
22 | #include <linux/sched/task_stack.h> | ||
22 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
23 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
24 | #include <linux/ptrace.h> | 25 | #include <linux/ptrace.h> |
diff --git a/arch/mips/kernel/ptrace32.c b/arch/mips/kernel/ptrace32.c index 4f0998525626..40e212d6b26b 100644 --- a/arch/mips/kernel/ptrace32.c +++ b/arch/mips/kernel/ptrace32.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/compat.h> | 18 | #include <linux/compat.h> |
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/sched/task_stack.h> | ||
21 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
22 | #include <linux/errno.h> | 23 | #include <linux/errno.h> |
23 | #include <linux/ptrace.h> | 24 | #include <linux/ptrace.h> |
diff --git a/arch/mips/kernel/rtlx.c b/arch/mips/kernel/rtlx.c index c5c4fd54d797..b80dd8b17a76 100644 --- a/arch/mips/kernel/rtlx.c +++ b/arch/mips/kernel/rtlx.c | |||
@@ -12,6 +12,8 @@ | |||
12 | #include <linux/syscalls.h> | 12 | #include <linux/syscalls.h> |
13 | #include <linux/moduleloader.h> | 13 | #include <linux/moduleloader.h> |
14 | #include <linux/atomic.h> | 14 | #include <linux/atomic.h> |
15 | #include <linux/sched/signal.h> | ||
16 | |||
15 | #include <asm/mipsmtregs.h> | 17 | #include <asm/mipsmtregs.h> |
16 | #include <asm/mips_mt.h> | 18 | #include <asm/mips_mt.h> |
17 | #include <asm/processor.h> | 19 | #include <asm/processor.h> |
diff --git a/arch/mips/kernel/signal_o32.c b/arch/mips/kernel/signal_o32.c index 5e169fc5ca5c..2b3572fb5f1b 100644 --- a/arch/mips/kernel/signal_o32.c +++ b/arch/mips/kernel/signal_o32.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/compiler.h> | 11 | #include <linux/compiler.h> |
12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
13 | #include <linux/signal.h> | 13 | #include <linux/signal.h> |
14 | #include <linux/sched/signal.h> | ||
14 | #include <linux/uaccess.h> | 15 | #include <linux/uaccess.h> |
15 | 16 | ||
16 | #include <asm/abi.h> | 17 | #include <asm/abi.h> |
diff --git a/arch/mips/kernel/smp-bmips.c b/arch/mips/kernel/smp-bmips.c index 16e37a28f876..3daa2cae50b0 100644 --- a/arch/mips/kernel/smp-bmips.c +++ b/arch/mips/kernel/smp-bmips.c | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/sched/hotplug.h> | ||
13 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
14 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
15 | #include <linux/smp.h> | 16 | #include <linux/smp.h> |
diff --git a/arch/mips/kernel/smp-cps.c b/arch/mips/kernel/smp-cps.c index a2544c2394e4..6d45f05538c8 100644 --- a/arch/mips/kernel/smp-cps.c +++ b/arch/mips/kernel/smp-cps.c | |||
@@ -11,7 +11,8 @@ | |||
11 | #include <linux/delay.h> | 11 | #include <linux/delay.h> |
12 | #include <linux/io.h> | 12 | #include <linux/io.h> |
13 | #include <linux/irqchip/mips-gic.h> | 13 | #include <linux/irqchip/mips-gic.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched/task_stack.h> |
15 | #include <linux/sched/hotplug.h> | ||
15 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
16 | #include <linux/smp.h> | 17 | #include <linux/smp.h> |
17 | #include <linux/types.h> | 18 | #include <linux/types.h> |
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c index 8c60a296294c..6e71130549ea 100644 --- a/arch/mips/kernel/smp.c +++ b/arch/mips/kernel/smp.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <linux/export.h> | 28 | #include <linux/export.h> |
29 | #include <linux/time.h> | 29 | #include <linux/time.h> |
30 | #include <linux/timex.h> | 30 | #include <linux/timex.h> |
31 | #include <linux/sched.h> | 31 | #include <linux/sched/mm.h> |
32 | #include <linux/cpumask.h> | 32 | #include <linux/cpumask.h> |
33 | #include <linux/cpu.h> | 33 | #include <linux/cpu.h> |
34 | #include <linux/err.h> | 34 | #include <linux/err.h> |
diff --git a/arch/mips/kernel/stacktrace.c b/arch/mips/kernel/stacktrace.c index 506021f62549..7c7c902249f2 100644 --- a/arch/mips/kernel/stacktrace.c +++ b/arch/mips/kernel/stacktrace.c | |||
@@ -4,6 +4,8 @@ | |||
4 | * Copyright (C) 2006 Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 4 | * Copyright (C) 2006 Atsushi Nemoto <anemo@mba.ocn.ne.jp> |
5 | */ | 5 | */ |
6 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
7 | #include <linux/sched/debug.h> | ||
8 | #include <linux/sched/task_stack.h> | ||
7 | #include <linux/stacktrace.h> | 9 | #include <linux/stacktrace.h> |
8 | #include <linux/export.h> | 10 | #include <linux/export.h> |
9 | #include <asm/stacktrace.h> | 11 | #include <asm/stacktrace.h> |
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c index c86ddbaa4598..f1d17ece4181 100644 --- a/arch/mips/kernel/syscall.c +++ b/arch/mips/kernel/syscall.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/uaccess.h> | 26 | #include <linux/uaccess.h> |
27 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
28 | #include <linux/elf.h> | 28 | #include <linux/elf.h> |
29 | #include <linux/sched/task_stack.h> | ||
29 | 30 | ||
30 | #include <asm/asm.h> | 31 | #include <asm/asm.h> |
31 | #include <asm/branch.h> | 32 | #include <asm/branch.h> |
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 49c6df20672a..c7d17cfb32f6 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -23,7 +23,8 @@ | |||
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/extable.h> | 24 | #include <linux/extable.h> |
25 | #include <linux/mm.h> | 25 | #include <linux/mm.h> |
26 | #include <linux/sched.h> | 26 | #include <linux/sched/mm.h> |
27 | #include <linux/sched/debug.h> | ||
27 | #include <linux/smp.h> | 28 | #include <linux/smp.h> |
28 | #include <linux/spinlock.h> | 29 | #include <linux/spinlock.h> |
29 | #include <linux/kallsyms.h> | 30 | #include <linux/kallsyms.h> |
diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c index ed81e5ac1426..15a1b1716c2e 100644 --- a/arch/mips/kvm/mips.c +++ b/arch/mips/kvm/mips.c | |||
@@ -16,8 +16,10 @@ | |||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/uaccess.h> | 17 | #include <linux/uaccess.h> |
18 | #include <linux/vmalloc.h> | 18 | #include <linux/vmalloc.h> |
19 | #include <linux/sched/signal.h> | ||
19 | #include <linux/fs.h> | 20 | #include <linux/fs.h> |
20 | #include <linux/bootmem.h> | 21 | #include <linux/bootmem.h> |
22 | |||
21 | #include <asm/fpu.h> | 23 | #include <asm/fpu.h> |
22 | #include <asm/page.h> | 24 | #include <asm/page.h> |
23 | #include <asm/cacheflush.h> | 25 | #include <asm/cacheflush.h> |
diff --git a/arch/mips/loongson64/loongson-3/smp.c b/arch/mips/loongson64/loongson-3/smp.c index cfcf240cedbe..64659fc73940 100644 --- a/arch/mips/loongson64/loongson-3/smp.c +++ b/arch/mips/loongson64/loongson-3/smp.c | |||
@@ -17,6 +17,8 @@ | |||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/cpu.h> | 18 | #include <linux/cpu.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/sched/hotplug.h> | ||
21 | #include <linux/sched/task_stack.h> | ||
20 | #include <linux/smp.h> | 22 | #include <linux/smp.h> |
21 | #include <linux/cpufreq.h> | 23 | #include <linux/cpufreq.h> |
22 | #include <asm/processor.h> | 24 | #include <asm/processor.h> |
diff --git a/arch/mips/math-emu/dsemul.c b/arch/mips/math-emu/dsemul.c index c4469ff4a996..b6bfd3625369 100644 --- a/arch/mips/math-emu/dsemul.c +++ b/arch/mips/math-emu/dsemul.c | |||
@@ -1,5 +1,7 @@ | |||
1 | #include <linux/err.h> | 1 | #include <linux/err.h> |
2 | #include <linux/slab.h> | 2 | #include <linux/slab.h> |
3 | #include <linux/mm_types.h> | ||
4 | #include <linux/sched/task.h> | ||
3 | 5 | ||
4 | #include <asm/branch.h> | 6 | #include <asm/branch.h> |
5 | #include <asm/cacheflush.h> | 7 | #include <asm/cacheflush.h> |
diff --git a/arch/mips/mm/ioremap.c b/arch/mips/mm/ioremap.c index 1f189627440f..1986e09fb457 100644 --- a/arch/mips/mm/ioremap.c +++ b/arch/mips/mm/ioremap.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
14 | #include <linux/vmalloc.h> | 14 | #include <linux/vmalloc.h> |
15 | #include <linux/mm_types.h> | ||
15 | #include <asm/cacheflush.h> | 16 | #include <asm/cacheflush.h> |
16 | #include <asm/io.h> | 17 | #include <asm/io.h> |
17 | #include <asm/tlbflush.h> | 18 | #include <asm/tlbflush.h> |
diff --git a/arch/mips/mm/mmap.c b/arch/mips/mm/mmap.c index d6d92c02308d..64dd8bdd92c3 100644 --- a/arch/mips/mm/mmap.c +++ b/arch/mips/mm/mmap.c | |||
@@ -13,7 +13,8 @@ | |||
13 | #include <linux/export.h> | 13 | #include <linux/export.h> |
14 | #include <linux/personality.h> | 14 | #include <linux/personality.h> |
15 | #include <linux/random.h> | 15 | #include <linux/random.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched/signal.h> |
17 | #include <linux/sched/mm.h> | ||
17 | 18 | ||
18 | unsigned long shm_align_mask = PAGE_SIZE - 1; /* Sane caches */ | 19 | unsigned long shm_align_mask = PAGE_SIZE - 1; /* Sane caches */ |
19 | EXPORT_SYMBOL(shm_align_mask); | 20 | EXPORT_SYMBOL(shm_align_mask); |
diff --git a/arch/mips/paravirt/paravirt-smp.c b/arch/mips/paravirt/paravirt-smp.c index f8d3e081b2eb..72eb1a56c645 100644 --- a/arch/mips/paravirt/paravirt-smp.c +++ b/arch/mips/paravirt/paravirt-smp.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/cpumask.h> | 10 | #include <linux/cpumask.h> |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/sched/task_stack.h> | ||
13 | 14 | ||
14 | #include <asm/mipsregs.h> | 15 | #include <asm/mipsregs.h> |
15 | #include <asm/setup.h> | 16 | #include <asm/setup.h> |
diff --git a/arch/mips/sgi-ip22/ip22-berr.c b/arch/mips/sgi-ip22/ip22-berr.c index 3f6ccd53c15d..ff8e1935c873 100644 --- a/arch/mips/sgi-ip22/ip22-berr.c +++ b/arch/mips/sgi-ip22/ip22-berr.c | |||
@@ -6,7 +6,7 @@ | |||
6 | 6 | ||
7 | #include <linux/init.h> | 7 | #include <linux/init.h> |
8 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
9 | #include <linux/sched.h> | 9 | #include <linux/sched/signal.h> |
10 | 10 | ||
11 | #include <asm/addrspace.h> | 11 | #include <asm/addrspace.h> |
12 | #include <asm/traps.h> | 12 | #include <asm/traps.h> |
diff --git a/arch/mips/sgi-ip22/ip22-reset.c b/arch/mips/sgi-ip22/ip22-reset.c index a36f6b87548a..03a39ac5ead9 100644 --- a/arch/mips/sgi-ip22/ip22-reset.c +++ b/arch/mips/sgi-ip22/ip22-reset.c | |||
@@ -10,7 +10,7 @@ | |||
10 | #include <linux/rtc/ds1286.h> | 10 | #include <linux/rtc/ds1286.h> |
11 | #include <linux/interrupt.h> | 11 | #include <linux/interrupt.h> |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/sched.h> | 13 | #include <linux/sched/signal.h> |
14 | #include <linux/notifier.h> | 14 | #include <linux/notifier.h> |
15 | #include <linux/pm.h> | 15 | #include <linux/pm.h> |
16 | #include <linux/timer.h> | 16 | #include <linux/timer.h> |
diff --git a/arch/mips/sgi-ip22/ip28-berr.c b/arch/mips/sgi-ip22/ip28-berr.c index 9960a8302eac..1f2a5bc4779e 100644 --- a/arch/mips/sgi-ip22/ip28-berr.c +++ b/arch/mips/sgi-ip22/ip28-berr.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/init.h> | 8 | #include <linux/init.h> |
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
11 | #include <linux/sched/debug.h> | ||
11 | #include <linux/seq_file.h> | 12 | #include <linux/seq_file.h> |
12 | 13 | ||
13 | #include <asm/addrspace.h> | 14 | #include <asm/addrspace.h> |
diff --git a/arch/mips/sgi-ip27/ip27-berr.c b/arch/mips/sgi-ip27/ip27-berr.c index f8919b6a24c8..d12879eb2b1f 100644 --- a/arch/mips/sgi-ip27/ip27-berr.c +++ b/arch/mips/sgi-ip27/ip27-berr.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/signal.h> /* for SIGBUS */ | 12 | #include <linux/signal.h> /* for SIGBUS */ |
13 | #include <linux/sched.h> /* schow_regs(), force_sig() */ | 13 | #include <linux/sched.h> /* schow_regs(), force_sig() */ |
14 | #include <linux/sched/debug.h> | ||
14 | 15 | ||
15 | #include <asm/sn/addrs.h> | 16 | #include <asm/sn/addrs.h> |
16 | #include <asm/sn/arch.h> | 17 | #include <asm/sn/arch.h> |
diff --git a/arch/mips/sgi-ip27/ip27-smp.c b/arch/mips/sgi-ip27/ip27-smp.c index f9ae6a8fa7c7..f5ed45e8f442 100644 --- a/arch/mips/sgi-ip27/ip27-smp.c +++ b/arch/mips/sgi-ip27/ip27-smp.c | |||
@@ -8,6 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | #include <linux/init.h> | 9 | #include <linux/init.h> |
10 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
11 | #include <linux/topology.h> | ||
11 | #include <linux/nodemask.h> | 12 | #include <linux/nodemask.h> |
12 | #include <asm/page.h> | 13 | #include <asm/page.h> |
13 | #include <asm/processor.h> | 14 | #include <asm/processor.h> |
diff --git a/arch/mips/sgi-ip32/ip32-berr.c b/arch/mips/sgi-ip32/ip32-berr.c index ba8f46d80ab8..57d8c7486fe6 100644 --- a/arch/mips/sgi-ip32/ip32-berr.c +++ b/arch/mips/sgi-ip32/ip32-berr.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/sched/debug.h> | ||
13 | #include <asm/traps.h> | 14 | #include <asm/traps.h> |
14 | #include <linux/uaccess.h> | 15 | #include <linux/uaccess.h> |
15 | #include <asm/addrspace.h> | 16 | #include <asm/addrspace.h> |
diff --git a/arch/mips/sgi-ip32/ip32-irq.c b/arch/mips/sgi-ip32/ip32-irq.c index 838d8589a1c0..a6a0ff7f5aed 100644 --- a/arch/mips/sgi-ip32/ip32-irq.c +++ b/arch/mips/sgi-ip32/ip32-irq.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
19 | #include <linux/random.h> | 19 | #include <linux/random.h> |
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/sched/debug.h> | ||
21 | 22 | ||
22 | #include <asm/irq_cpu.h> | 23 | #include <asm/irq_cpu.h> |
23 | #include <asm/mipsregs.h> | 24 | #include <asm/mipsregs.h> |
diff --git a/arch/mips/sibyte/bcm1480/smp.c b/arch/mips/sibyte/bcm1480/smp.c index 4c71aea25663..d0e94ffcc1b8 100644 --- a/arch/mips/sibyte/bcm1480/smp.c +++ b/arch/mips/sibyte/bcm1480/smp.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/smp.h> | 21 | #include <linux/smp.h> |
22 | #include <linux/kernel_stat.h> | 22 | #include <linux/kernel_stat.h> |
23 | #include <linux/sched.h> | 23 | #include <linux/sched.h> |
24 | #include <linux/sched/task_stack.h> | ||
24 | 25 | ||
25 | #include <asm/mmu_context.h> | 26 | #include <asm/mmu_context.h> |
26 | #include <asm/io.h> | 27 | #include <asm/io.h> |
diff --git a/arch/mips/sibyte/sb1250/smp.c b/arch/mips/sibyte/sb1250/smp.c index 1cf66f5ff23d..0a4a2c3982d8 100644 --- a/arch/mips/sibyte/sb1250/smp.c +++ b/arch/mips/sibyte/sb1250/smp.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
22 | #include <linux/smp.h> | 22 | #include <linux/smp.h> |
23 | #include <linux/kernel_stat.h> | 23 | #include <linux/kernel_stat.h> |
24 | #include <linux/sched.h> | 24 | #include <linux/sched/task_stack.h> |
25 | 25 | ||
26 | #include <asm/mmu_context.h> | 26 | #include <asm/mmu_context.h> |
27 | #include <asm/io.h> | 27 | #include <asm/io.h> |
diff --git a/arch/mn10300/include/asm/mmu_context.h b/arch/mn10300/include/asm/mmu_context.h index 75dbe696f830..d2034f5e6eda 100644 --- a/arch/mn10300/include/asm/mmu_context.h +++ b/arch/mn10300/include/asm/mmu_context.h | |||
@@ -23,6 +23,8 @@ | |||
23 | #define _ASM_MMU_CONTEXT_H | 23 | #define _ASM_MMU_CONTEXT_H |
24 | 24 | ||
25 | #include <linux/atomic.h> | 25 | #include <linux/atomic.h> |
26 | #include <linux/mm_types.h> | ||
27 | |||
26 | #include <asm/pgalloc.h> | 28 | #include <asm/pgalloc.h> |
27 | #include <asm/tlbflush.h> | 29 | #include <asm/tlbflush.h> |
28 | #include <asm-generic/mm_hooks.h> | 30 | #include <asm-generic/mm_hooks.h> |
diff --git a/arch/mn10300/kernel/fpu.c b/arch/mn10300/kernel/fpu.c index 2578b7ae7dd5..50ce7b447fed 100644 --- a/arch/mn10300/kernel/fpu.c +++ b/arch/mn10300/kernel/fpu.c | |||
@@ -9,6 +9,8 @@ | |||
9 | * 2 of the Licence, or (at your option) any later version. | 9 | * 2 of the Licence, or (at your option) any later version. |
10 | */ | 10 | */ |
11 | #include <linux/uaccess.h> | 11 | #include <linux/uaccess.h> |
12 | #include <linux/sched/signal.h> | ||
13 | |||
12 | #include <asm/fpu.h> | 14 | #include <asm/fpu.h> |
13 | #include <asm/elf.h> | 15 | #include <asm/elf.h> |
14 | #include <asm/exceptions.h> | 16 | #include <asm/exceptions.h> |
diff --git a/arch/mn10300/kernel/process.c b/arch/mn10300/kernel/process.c index e5def2217f72..c9fa42619c6a 100644 --- a/arch/mn10300/kernel/process.c +++ b/arch/mn10300/kernel/process.c | |||
@@ -11,6 +11,9 @@ | |||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/sched/debug.h> | ||
15 | #include <linux/sched/task.h> | ||
16 | #include <linux/sched/task_stack.h> | ||
14 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
15 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
16 | #include <linux/smp.h> | 19 | #include <linux/smp.h> |
diff --git a/arch/mn10300/kernel/ptrace.c b/arch/mn10300/kernel/ptrace.c index 976020f469c1..8009876a7ac4 100644 --- a/arch/mn10300/kernel/ptrace.c +++ b/arch/mn10300/kernel/ptrace.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/sched/task_stack.h> | ||
14 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
15 | #include <linux/smp.h> | 16 | #include <linux/smp.h> |
16 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
diff --git a/arch/mn10300/kernel/smp.c b/arch/mn10300/kernel/smp.c index e65b5cc2fa67..35d2c3fe6f76 100644 --- a/arch/mn10300/kernel/smp.c +++ b/arch/mn10300/kernel/smp.c | |||
@@ -21,7 +21,8 @@ | |||
21 | #include <linux/err.h> | 21 | #include <linux/err.h> |
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/sched.h> | 24 | #include <linux/sched/mm.h> |
25 | #include <linux/sched/task.h> | ||
25 | #include <linux/profile.h> | 26 | #include <linux/profile.h> |
26 | #include <linux/smp.h> | 27 | #include <linux/smp.h> |
27 | #include <linux/cpu.h> | 28 | #include <linux/cpu.h> |
diff --git a/arch/mn10300/kernel/time.c b/arch/mn10300/kernel/time.c index 67c6416a58f8..06b83b17c5f1 100644 --- a/arch/mn10300/kernel/time.c +++ b/arch/mn10300/kernel/time.c | |||
@@ -10,6 +10,7 @@ | |||
10 | * 2 of the Licence, or (at your option) any later version. | 10 | * 2 of the Licence, or (at your option) any later version. |
11 | */ | 11 | */ |
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/sched/clock.h> | ||
13 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
14 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
15 | #include <linux/time.h> | 16 | #include <linux/time.h> |
diff --git a/arch/mn10300/kernel/traps.c b/arch/mn10300/kernel/traps.c index a7a987c7954f..800fd0801969 100644 --- a/arch/mn10300/kernel/traps.c +++ b/arch/mn10300/kernel/traps.c | |||
@@ -10,6 +10,7 @@ | |||
10 | * 2 of the Licence, or (at your option) any later version. | 10 | * 2 of the Licence, or (at your option) any later version. |
11 | */ | 11 | */ |
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/sched/debug.h> | ||
13 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
14 | #include <linux/string.h> | 15 | #include <linux/string.h> |
15 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
diff --git a/arch/mn10300/mm/tlb-smp.c b/arch/mn10300/mm/tlb-smp.c index 9a39ea9031d4..085f2bb691ac 100644 --- a/arch/mn10300/mm/tlb-smp.c +++ b/arch/mn10300/mm/tlb-smp.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/err.h> | 20 | #include <linux/err.h> |
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
23 | #include <linux/sched.h> | 23 | #include <linux/sched/mm.h> |
24 | #include <linux/profile.h> | 24 | #include <linux/profile.h> |
25 | #include <linux/smp.h> | 25 | #include <linux/smp.h> |
26 | #include <asm/tlbflush.h> | 26 | #include <asm/tlbflush.h> |
diff --git a/arch/nios2/include/asm/mmu_context.h b/arch/nios2/include/asm/mmu_context.h index 294b4b1f81d4..78ab3dacf579 100644 --- a/arch/nios2/include/asm/mmu_context.h +++ b/arch/nios2/include/asm/mmu_context.h | |||
@@ -13,6 +13,8 @@ | |||
13 | #ifndef _ASM_NIOS2_MMU_CONTEXT_H | 13 | #ifndef _ASM_NIOS2_MMU_CONTEXT_H |
14 | #define _ASM_NIOS2_MMU_CONTEXT_H | 14 | #define _ASM_NIOS2_MMU_CONTEXT_H |
15 | 15 | ||
16 | #include <linux/mm_types.h> | ||
17 | |||
16 | #include <asm-generic/mm_hooks.h> | 18 | #include <asm-generic/mm_hooks.h> |
17 | 19 | ||
18 | extern void mmu_context_init(void); | 20 | extern void mmu_context_init(void); |
diff --git a/arch/nios2/kernel/process.c b/arch/nios2/kernel/process.c index 2f8c74f93e70..509e7855e8dc 100644 --- a/arch/nios2/kernel/process.c +++ b/arch/nios2/kernel/process.c | |||
@@ -14,6 +14,10 @@ | |||
14 | 14 | ||
15 | #include <linux/export.h> | 15 | #include <linux/export.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/sched/debug.h> | ||
18 | #include <linux/sched/task.h> | ||
19 | #include <linux/sched/task_stack.h> | ||
20 | #include <linux/mm_types.h> | ||
17 | #include <linux/tick.h> | 21 | #include <linux/tick.h> |
18 | #include <linux/uaccess.h> | 22 | #include <linux/uaccess.h> |
19 | 23 | ||
diff --git a/arch/nios2/kernel/ptrace.c b/arch/nios2/kernel/ptrace.c index 681dda92eff1..de97bcb7dd44 100644 --- a/arch/nios2/kernel/ptrace.c +++ b/arch/nios2/kernel/ptrace.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/ptrace.h> | 14 | #include <linux/ptrace.h> |
15 | #include <linux/regset.h> | 15 | #include <linux/regset.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/sched/task_stack.h> | ||
17 | #include <linux/tracehook.h> | 18 | #include <linux/tracehook.h> |
18 | #include <linux/uaccess.h> | 19 | #include <linux/uaccess.h> |
19 | #include <linux/user.h> | 20 | #include <linux/user.h> |
diff --git a/arch/nios2/kernel/setup.c b/arch/nios2/kernel/setup.c index a3fa80d1aacc..6e57ffa5db27 100644 --- a/arch/nios2/kernel/setup.c +++ b/arch/nios2/kernel/setup.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/sched/task.h> | ||
17 | #include <linux/console.h> | 18 | #include <linux/console.h> |
18 | #include <linux/bootmem.h> | 19 | #include <linux/bootmem.h> |
19 | #include <linux/initrd.h> | 20 | #include <linux/initrd.h> |
diff --git a/arch/nios2/kernel/traps.c b/arch/nios2/kernel/traps.c index 72ed30a93c85..8184e7d6b385 100644 --- a/arch/nios2/kernel/traps.c +++ b/arch/nios2/kernel/traps.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/sched/debug.h> | ||
14 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
15 | #include <linux/signal.h> | 16 | #include <linux/signal.h> |
16 | #include <linux/export.h> | 17 | #include <linux/export.h> |
diff --git a/arch/nios2/mm/fault.c b/arch/nios2/mm/fault.c index e7a14e1e0d6b..b804dd06ea1c 100644 --- a/arch/nios2/mm/fault.c +++ b/arch/nios2/mm/fault.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/signal.h> | 14 | #include <linux/signal.h> |
15 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
16 | #include <linux/sched/debug.h> | ||
16 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
17 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
18 | #include <linux/errno.h> | 19 | #include <linux/errno.h> |
diff --git a/arch/openrisc/kernel/process.c b/arch/openrisc/kernel/process.c index 6e9d1cb519f2..828a29110459 100644 --- a/arch/openrisc/kernel/process.c +++ b/arch/openrisc/kernel/process.c | |||
@@ -22,6 +22,9 @@ | |||
22 | 22 | ||
23 | #include <linux/errno.h> | 23 | #include <linux/errno.h> |
24 | #include <linux/sched.h> | 24 | #include <linux/sched.h> |
25 | #include <linux/sched/debug.h> | ||
26 | #include <linux/sched/task.h> | ||
27 | #include <linux/sched/task_stack.h> | ||
25 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
26 | #include <linux/module.h> | 29 | #include <linux/module.h> |
27 | #include <linux/mm.h> | 30 | #include <linux/mm.h> |
diff --git a/arch/openrisc/kernel/ptrace.c b/arch/openrisc/kernel/ptrace.c index 228288887d74..eb97a8e7c8aa 100644 --- a/arch/openrisc/kernel/ptrace.c +++ b/arch/openrisc/kernel/ptrace.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/sched/task_stack.h> | ||
21 | #include <linux/string.h> | 22 | #include <linux/string.h> |
22 | 23 | ||
23 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
diff --git a/arch/openrisc/kernel/traps.c b/arch/openrisc/kernel/traps.c index 7e81ad258bca..803e9e756f77 100644 --- a/arch/openrisc/kernel/traps.c +++ b/arch/openrisc/kernel/traps.c | |||
@@ -22,6 +22,8 @@ | |||
22 | 22 | ||
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/sched.h> | 24 | #include <linux/sched.h> |
25 | #include <linux/sched/debug.h> | ||
26 | #include <linux/sched/task_stack.h> | ||
25 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
26 | #include <linux/extable.h> | 28 | #include <linux/extable.h> |
27 | #include <linux/kmod.h> | 29 | #include <linux/kmod.h> |
diff --git a/arch/openrisc/mm/fault.c b/arch/openrisc/mm/fault.c index 53592a639744..e310ab499385 100644 --- a/arch/openrisc/mm/fault.c +++ b/arch/openrisc/mm/fault.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/extable.h> | 20 | #include <linux/extable.h> |
21 | #include <linux/sched.h> | 21 | #include <linux/sched/signal.h> |
22 | 22 | ||
23 | #include <linux/uaccess.h> | 23 | #include <linux/uaccess.h> |
24 | #include <asm/siginfo.h> | 24 | #include <asm/siginfo.h> |
diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c index 977f0a4f5ecf..7820b864de1a 100644 --- a/arch/parisc/kernel/cache.c +++ b/arch/parisc/kernel/cache.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/seq_file.h> | 18 | #include <linux/seq_file.h> |
19 | #include <linux/pagemap.h> | 19 | #include <linux/pagemap.h> |
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/sched/mm.h> | ||
21 | #include <asm/pdc.h> | 22 | #include <asm/pdc.h> |
22 | #include <asm/cache.h> | 23 | #include <asm/cache.h> |
23 | #include <asm/cacheflush.h> | 24 | #include <asm/cacheflush.h> |
diff --git a/arch/parisc/kernel/pa7300lc.c b/arch/parisc/kernel/pa7300lc.c index 8a89780223aa..9b245fc67560 100644 --- a/arch/parisc/kernel/pa7300lc.c +++ b/arch/parisc/kernel/pa7300lc.c | |||
@@ -5,6 +5,7 @@ | |||
5 | * Copyright (C) 2000 Philipp Rumpf */ | 5 | * Copyright (C) 2000 Philipp Rumpf */ |
6 | 6 | ||
7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
8 | #include <linux/sched/debug.h> | ||
8 | #include <linux/smp.h> | 9 | #include <linux/smp.h> |
9 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
10 | #include <asm/io.h> | 11 | #include <asm/io.h> |
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index ea6603ee8d24..06f7ca7fe70b 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c | |||
@@ -43,6 +43,9 @@ | |||
43 | #include <linux/personality.h> | 43 | #include <linux/personality.h> |
44 | #include <linux/ptrace.h> | 44 | #include <linux/ptrace.h> |
45 | #include <linux/sched.h> | 45 | #include <linux/sched.h> |
46 | #include <linux/sched/debug.h> | ||
47 | #include <linux/sched/task.h> | ||
48 | #include <linux/sched/task_stack.h> | ||
46 | #include <linux/slab.h> | 49 | #include <linux/slab.h> |
47 | #include <linux/stddef.h> | 50 | #include <linux/stddef.h> |
48 | #include <linux/unistd.h> | 51 | #include <linux/unistd.h> |
diff --git a/arch/parisc/kernel/setup.c b/arch/parisc/kernel/setup.c index 068ed3607bac..dee6f9d6a153 100644 --- a/arch/parisc/kernel/setup.c +++ b/arch/parisc/kernel/setup.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/proc_fs.h> | 37 | #include <linux/proc_fs.h> |
38 | #include <linux/export.h> | 38 | #include <linux/export.h> |
39 | #include <linux/sched.h> | 39 | #include <linux/sched.h> |
40 | #include <linux/sched/clock.h> | ||
40 | 41 | ||
41 | #include <asm/processor.h> | 42 | #include <asm/processor.h> |
42 | #include <asm/sections.h> | 43 | #include <asm/sections.h> |
diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c index e58925ac64d1..9e03296641d7 100644 --- a/arch/parisc/kernel/signal.c +++ b/arch/parisc/kernel/signal.c | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
16 | #include <linux/sched/debug.h> | ||
16 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
17 | #include <linux/smp.h> | 18 | #include <linux/smp.h> |
18 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c index 67b452b41ff6..63365106ea19 100644 --- a/arch/parisc/kernel/smp.c +++ b/arch/parisc/kernel/smp.c | |||
@@ -21,7 +21,7 @@ | |||
21 | 21 | ||
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/sched.h> | 24 | #include <linux/sched/mm.h> |
25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
26 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
27 | #include <linux/smp.h> | 27 | #include <linux/smp.h> |
diff --git a/arch/parisc/kernel/sys_parisc.c b/arch/parisc/kernel/sys_parisc.c index bf3294171230..e5288638a1d9 100644 --- a/arch/parisc/kernel/sys_parisc.c +++ b/arch/parisc/kernel/sys_parisc.c | |||
@@ -30,6 +30,8 @@ | |||
30 | #include <linux/linkage.h> | 30 | #include <linux/linkage.h> |
31 | #include <linux/mm.h> | 31 | #include <linux/mm.h> |
32 | #include <linux/mman.h> | 32 | #include <linux/mman.h> |
33 | #include <linux/sched/signal.h> | ||
34 | #include <linux/sched/mm.h> | ||
33 | #include <linux/shm.h> | 35 | #include <linux/shm.h> |
34 | #include <linux/syscalls.h> | 36 | #include <linux/syscalls.h> |
35 | #include <linux/utsname.h> | 37 | #include <linux/utsname.h> |
diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c index 1e22f981cd81..89421df70160 100644 --- a/arch/parisc/kernel/time.c +++ b/arch/parisc/kernel/time.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/rtc.h> | 15 | #include <linux/rtc.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/sched/clock.h> | ||
17 | #include <linux/sched_clock.h> | 18 | #include <linux/sched_clock.h> |
18 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
19 | #include <linux/param.h> | 20 | #include <linux/param.h> |
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c index 378df9207406..991654c88eec 100644 --- a/arch/parisc/kernel/traps.c +++ b/arch/parisc/kernel/traps.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/sched/debug.h> | ||
14 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
15 | #include <linux/string.h> | 16 | #include <linux/string.h> |
16 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
diff --git a/arch/parisc/kernel/unaligned.c b/arch/parisc/kernel/unaligned.c index 0a21067ac0a3..e36f7b75ab07 100644 --- a/arch/parisc/kernel/unaligned.c +++ b/arch/parisc/kernel/unaligned.c | |||
@@ -23,7 +23,8 @@ | |||
23 | #include <linux/jiffies.h> | 23 | #include <linux/jiffies.h> |
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/sched.h> | 26 | #include <linux/sched/signal.h> |
27 | #include <linux/sched/debug.h> | ||
27 | #include <linux/signal.h> | 28 | #include <linux/signal.h> |
28 | #include <linux/ratelimit.h> | 29 | #include <linux/ratelimit.h> |
29 | #include <linux/uaccess.h> | 30 | #include <linux/uaccess.h> |
diff --git a/arch/parisc/math-emu/driver.c b/arch/parisc/math-emu/driver.c index 09ef4136c693..2fb59d2e2b29 100644 --- a/arch/parisc/math-emu/driver.c +++ b/arch/parisc/math-emu/driver.c | |||
@@ -27,7 +27,8 @@ | |||
27 | * Copyright (C) 2001 Hewlett-Packard <bame@debian.org> | 27 | * Copyright (C) 2001 Hewlett-Packard <bame@debian.org> |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/sched.h> | 30 | #include <linux/sched/signal.h> |
31 | |||
31 | #include "float.h" | 32 | #include "float.h" |
32 | #include "math-emu.h" | 33 | #include "math-emu.h" |
33 | 34 | ||
diff --git a/arch/parisc/mm/fault.c b/arch/parisc/mm/fault.c index 1a0b4f63f0e9..c3cac4ddfe9c 100644 --- a/arch/parisc/mm/fault.c +++ b/arch/parisc/mm/fault.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
14 | #include <linux/ptrace.h> | 14 | #include <linux/ptrace.h> |
15 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
16 | #include <linux/sched/debug.h> | ||
16 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
17 | #include <linux/extable.h> | 18 | #include <linux/extable.h> |
18 | #include <linux/uaccess.h> | 19 | #include <linux/uaccess.h> |
diff --git a/arch/parisc/mm/hugetlbpage.c b/arch/parisc/mm/hugetlbpage.c index 5d6eea925cf4..aa50ac090e9b 100644 --- a/arch/parisc/mm/hugetlbpage.c +++ b/arch/parisc/mm/hugetlbpage.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/fs.h> | 9 | #include <linux/fs.h> |
10 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
11 | #include <linux/sched/mm.h> | ||
11 | #include <linux/hugetlb.h> | 12 | #include <linux/hugetlb.h> |
12 | #include <linux/pagemap.h> | 13 | #include <linux/pagemap.h> |
13 | #include <linux/sysctl.h> | 14 | #include <linux/sysctl.h> |
diff --git a/arch/powerpc/kernel/io-workarounds.c b/arch/powerpc/kernel/io-workarounds.c index 5f8613ceb97f..a582e0d42525 100644 --- a/arch/powerpc/kernel/io-workarounds.c +++ b/arch/powerpc/kernel/io-workarounds.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #undef DEBUG | 12 | #undef DEBUG |
13 | 13 | ||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/sched.h> /* for init_mm */ | 15 | #include <linux/sched/mm.h> /* for init_mm */ |
16 | 16 | ||
17 | #include <asm/io.h> | 17 | #include <asm/io.h> |
18 | #include <asm/machdep.h> | 18 | #include <asm/machdep.h> |
diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c index fa20060ff7a5..dfc479df9634 100644 --- a/arch/powerpc/kernel/paca.c +++ b/arch/powerpc/kernel/paca.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/smp.h> | 10 | #include <linux/smp.h> |
11 | #include <linux/export.h> | 11 | #include <linux/export.h> |
12 | #include <linux/memblock.h> | 12 | #include <linux/memblock.h> |
13 | #include <linux/sched/task.h> | ||
13 | 14 | ||
14 | #include <asm/lppaca.h> | 15 | #include <asm/lppaca.h> |
15 | #include <asm/paca.h> | 16 | #include <asm/paca.h> |
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 4379a079b3c2..d645da302bf2 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -16,6 +16,9 @@ | |||
16 | 16 | ||
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
19 | #include <linux/sched/debug.h> | ||
20 | #include <linux/sched/task.h> | ||
21 | #include <linux/sched/task_stack.h> | ||
19 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
20 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
21 | #include <linux/smp.h> | 24 | #include <linux/smp.h> |
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 573fb3a461b5..46f89e66a273 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c | |||
@@ -19,7 +19,8 @@ | |||
19 | 19 | ||
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/export.h> | 21 | #include <linux/export.h> |
22 | #include <linux/sched.h> | 22 | #include <linux/sched/mm.h> |
23 | #include <linux/sched/topology.h> | ||
23 | #include <linux/smp.h> | 24 | #include <linux/smp.h> |
24 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
25 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
@@ -795,7 +796,7 @@ void __init smp_cpus_done(unsigned int max_cpus) | |||
795 | * se we pin us down to CPU 0 for a short while | 796 | * se we pin us down to CPU 0 for a short while |
796 | */ | 797 | */ |
797 | alloc_cpumask_var(&old_mask, GFP_NOWAIT); | 798 | alloc_cpumask_var(&old_mask, GFP_NOWAIT); |
798 | cpumask_copy(old_mask, tsk_cpus_allowed(current)); | 799 | cpumask_copy(old_mask, ¤t->cpus_allowed); |
799 | set_cpus_allowed_ptr(current, cpumask_of(boot_cpuid)); | 800 | set_cpus_allowed_ptr(current, cpumask_of(boot_cpuid)); |
800 | 801 | ||
801 | if (smp_ops && smp_ops->setup_cpu) | 802 | if (smp_ops && smp_ops->setup_cpu) |
diff --git a/arch/powerpc/kernel/stacktrace.c b/arch/powerpc/kernel/stacktrace.c index 4f24606afc3f..66711958493c 100644 --- a/arch/powerpc/kernel/stacktrace.c +++ b/arch/powerpc/kernel/stacktrace.c | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include <linux/export.h> | 13 | #include <linux/export.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
15 | #include <linux/sched/debug.h> | ||
15 | #include <linux/stacktrace.h> | 16 | #include <linux/stacktrace.h> |
16 | #include <asm/ptrace.h> | 17 | #include <asm/ptrace.h> |
17 | #include <asm/processor.h> | 18 | #include <asm/processor.h> |
diff --git a/arch/powerpc/kernel/swsusp_64.c b/arch/powerpc/kernel/swsusp_64.c index 0e899e47c325..51db012808f5 100644 --- a/arch/powerpc/kernel/swsusp_64.c +++ b/arch/powerpc/kernel/swsusp_64.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/irq.h> | 10 | #include <linux/irq.h> |
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <linux/interrupt.h> | 12 | #include <linux/interrupt.h> |
13 | #include <linux/nmi.h> | ||
13 | 14 | ||
14 | void do_after_copyback(void) | 15 | void do_after_copyback(void) |
15 | { | 16 | { |
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index bc84a8d47b9e..07b90725855e 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/errno.h> | 34 | #include <linux/errno.h> |
35 | #include <linux/export.h> | 35 | #include <linux/export.h> |
36 | #include <linux/sched.h> | 36 | #include <linux/sched.h> |
37 | #include <linux/sched/clock.h> | ||
37 | #include <linux/kernel.h> | 38 | #include <linux/kernel.h> |
38 | #include <linux/param.h> | 39 | #include <linux/param.h> |
39 | #include <linux/string.h> | 40 | #include <linux/string.h> |
@@ -57,7 +58,7 @@ | |||
57 | #include <linux/clk-provider.h> | 58 | #include <linux/clk-provider.h> |
58 | #include <linux/suspend.h> | 59 | #include <linux/suspend.h> |
59 | #include <linux/rtc.h> | 60 | #include <linux/rtc.h> |
60 | #include <linux/cputime.h> | 61 | #include <linux/sched/cputime.h> |
61 | #include <asm/trace.h> | 62 | #include <asm/trace.h> |
62 | 63 | ||
63 | #include <asm/io.h> | 64 | #include <asm/io.h> |
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index e6cc56b61d01..ff365f9de27a 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c | |||
@@ -17,6 +17,7 @@ | |||
17 | 17 | ||
18 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/sched/debug.h> | ||
20 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
21 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
22 | #include <linux/stddef.h> | 23 | #include <linux/stddef.h> |
diff --git a/arch/powerpc/kvm/book3s_64_vio.c b/arch/powerpc/kvm/book3s_64_vio.c index ab9d14c0e460..3e26cd4979f9 100644 --- a/arch/powerpc/kvm/book3s_64_vio.c +++ b/arch/powerpc/kvm/book3s_64_vio.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/highmem.h> | 24 | #include <linux/highmem.h> |
25 | #include <linux/gfp.h> | 25 | #include <linux/gfp.h> |
26 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
27 | #include <linux/sched/signal.h> | ||
27 | #include <linux/hugetlb.h> | 28 | #include <linux/hugetlb.h> |
28 | #include <linux/list.h> | 29 | #include <linux/list.h> |
29 | #include <linux/anon_inodes.h> | 30 | #include <linux/anon_inodes.h> |
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index 1e107ece4e37..1ec86d9e2a82 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c | |||
@@ -22,7 +22,8 @@ | |||
22 | #include <linux/err.h> | 22 | #include <linux/err.h> |
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | #include <linux/preempt.h> | 24 | #include <linux/preempt.h> |
25 | #include <linux/sched.h> | 25 | #include <linux/sched/signal.h> |
26 | #include <linux/sched/stat.h> | ||
26 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
27 | #include <linux/export.h> | 28 | #include <linux/export.h> |
28 | #include <linux/fs.h> | 29 | #include <linux/fs.h> |
diff --git a/arch/powerpc/kvm/book3s_mmu_hpte.c b/arch/powerpc/kvm/book3s_mmu_hpte.c index 5a1ab1250a05..905a934c1ef4 100644 --- a/arch/powerpc/kvm/book3s_mmu_hpte.c +++ b/arch/powerpc/kvm/book3s_mmu_hpte.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/kvm_host.h> | 21 | #include <linux/kvm_host.h> |
22 | #include <linux/hash.h> | 22 | #include <linux/hash.h> |
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | #include <linux/rculist.h> | ||
24 | 25 | ||
25 | #include <asm/kvm_ppc.h> | 26 | #include <asm/kvm_ppc.h> |
26 | #include <asm/kvm_book3s.h> | 27 | #include <asm/kvm_book3s.h> |
diff --git a/arch/powerpc/kvm/e500_mmu_host.c b/arch/powerpc/kvm/e500_mmu_host.c index b0333cc737dd..0fda4230f6c0 100644 --- a/arch/powerpc/kvm/e500_mmu_host.c +++ b/arch/powerpc/kvm/e500_mmu_host.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <linux/highmem.h> | 25 | #include <linux/highmem.h> |
26 | #include <linux/log2.h> | 26 | #include <linux/log2.h> |
27 | #include <linux/uaccess.h> | 27 | #include <linux/uaccess.h> |
28 | #include <linux/sched.h> | 28 | #include <linux/sched/mm.h> |
29 | #include <linux/rwsem.h> | 29 | #include <linux/rwsem.h> |
30 | #include <linux/vmalloc.h> | 30 | #include <linux/vmalloc.h> |
31 | #include <linux/hugetlb.h> | 31 | #include <linux/hugetlb.h> |
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 2b38d824e9e5..95c91a9de351 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/kvm_host.h> | 23 | #include <linux/kvm_host.h> |
24 | #include <linux/vmalloc.h> | 24 | #include <linux/vmalloc.h> |
25 | #include <linux/hrtimer.h> | 25 | #include <linux/hrtimer.h> |
26 | #include <linux/sched/signal.h> | ||
26 | #include <linux/fs.h> | 27 | #include <linux/fs.h> |
27 | #include <linux/slab.h> | 28 | #include <linux/slab.h> |
28 | #include <linux/file.h> | 29 | #include <linux/file.h> |
diff --git a/arch/powerpc/lib/feature-fixups.c b/arch/powerpc/lib/feature-fixups.c index 043415f0bdb1..f3917705c686 100644 --- a/arch/powerpc/lib/feature-fixups.c +++ b/arch/powerpc/lib/feature-fixups.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/string.h> | 18 | #include <linux/string.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/sched/mm.h> | ||
20 | #include <asm/cputable.h> | 21 | #include <asm/cputable.h> |
21 | #include <asm/code-patching.h> | 22 | #include <asm/code-patching.h> |
22 | #include <asm/page.h> | 23 | #include <asm/page.h> |
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c index 8dc758658972..51def8a515be 100644 --- a/arch/powerpc/mm/fault.c +++ b/arch/powerpc/mm/fault.c | |||
@@ -17,6 +17,7 @@ | |||
17 | 17 | ||
18 | #include <linux/signal.h> | 18 | #include <linux/signal.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/sched/task_stack.h> | ||
20 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
21 | #include <linux/errno.h> | 22 | #include <linux/errno.h> |
22 | #include <linux/string.h> | 23 | #include <linux/string.h> |
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index 12d679df50bd..c554768b1fa2 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
@@ -23,7 +23,7 @@ | |||
23 | 23 | ||
24 | #include <linux/spinlock.h> | 24 | #include <linux/spinlock.h> |
25 | #include <linux/errno.h> | 25 | #include <linux/errno.h> |
26 | #include <linux/sched.h> | 26 | #include <linux/sched/mm.h> |
27 | #include <linux/proc_fs.h> | 27 | #include <linux/proc_fs.h> |
28 | #include <linux/stat.h> | 28 | #include <linux/stat.h> |
29 | #include <linux/sysctl.h> | 29 | #include <linux/sysctl.h> |
diff --git a/arch/powerpc/mm/mmap.c b/arch/powerpc/mm/mmap.c index 2f1e44362198..a5d9ef59debe 100644 --- a/arch/powerpc/mm/mmap.c +++ b/arch/powerpc/mm/mmap.c | |||
@@ -25,7 +25,8 @@ | |||
25 | #include <linux/personality.h> | 25 | #include <linux/personality.h> |
26 | #include <linux/mm.h> | 26 | #include <linux/mm.h> |
27 | #include <linux/random.h> | 27 | #include <linux/random.h> |
28 | #include <linux/sched.h> | 28 | #include <linux/sched/signal.h> |
29 | #include <linux/sched/mm.h> | ||
29 | #include <linux/elf-randomize.h> | 30 | #include <linux/elf-randomize.h> |
30 | #include <linux/security.h> | 31 | #include <linux/security.h> |
31 | #include <linux/mman.h> | 32 | #include <linux/mman.h> |
diff --git a/arch/powerpc/mm/mmu_context_iommu.c b/arch/powerpc/mm/mmu_context_iommu.c index 7de7124ac91b..497130c5c742 100644 --- a/arch/powerpc/mm/mmu_context_iommu.c +++ b/arch/powerpc/mm/mmu_context_iommu.c | |||
@@ -10,7 +10,7 @@ | |||
10 | * | 10 | * |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/sched.h> | 13 | #include <linux/sched/signal.h> |
14 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
15 | #include <linux/rculist.h> | 15 | #include <linux/rculist.h> |
16 | #include <linux/vmalloc.h> | 16 | #include <linux/vmalloc.h> |
diff --git a/arch/powerpc/mm/pgtable-book3s64.c b/arch/powerpc/mm/pgtable-book3s64.c index b798ff674fab..5fcb3dd74c13 100644 --- a/arch/powerpc/mm/pgtable-book3s64.c +++ b/arch/powerpc/mm/pgtable-book3s64.c | |||
@@ -8,6 +8,8 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
11 | #include <linux/mm_types.h> | ||
12 | |||
11 | #include <asm/pgalloc.h> | 13 | #include <asm/pgalloc.h> |
12 | #include <asm/tlb.h> | 14 | #include <asm/tlb.h> |
13 | 15 | ||
diff --git a/arch/powerpc/mm/pgtable-hash64.c b/arch/powerpc/mm/pgtable-hash64.c index c23e286a6b8f..8b85a14b08ea 100644 --- a/arch/powerpc/mm/pgtable-hash64.c +++ b/arch/powerpc/mm/pgtable-hash64.c | |||
@@ -10,6 +10,8 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/mm_types.h> | ||
14 | |||
13 | #include <asm/pgalloc.h> | 15 | #include <asm/pgalloc.h> |
14 | #include <asm/tlb.h> | 16 | #include <asm/tlb.h> |
15 | 17 | ||
diff --git a/arch/powerpc/mm/pgtable-radix.c b/arch/powerpc/mm/pgtable-radix.c index feeda90cd06d..2a590a98e652 100644 --- a/arch/powerpc/mm/pgtable-radix.c +++ b/arch/powerpc/mm/pgtable-radix.c | |||
@@ -8,7 +8,7 @@ | |||
8 | * as published by the Free Software Foundation; either version | 8 | * as published by the Free Software Foundation; either version |
9 | * 2 of the License, or (at your option) any later version. | 9 | * 2 of the License, or (at your option) any later version. |
10 | */ | 10 | */ |
11 | #include <linux/sched.h> | 11 | #include <linux/sched/mm.h> |
12 | #include <linux/memblock.h> | 12 | #include <linux/memblock.h> |
13 | #include <linux/of_fdt.h> | 13 | #include <linux/of_fdt.h> |
14 | 14 | ||
diff --git a/arch/powerpc/mm/slb.c b/arch/powerpc/mm/slb.c index 48fc28bab544..5e01b2ece1d0 100644 --- a/arch/powerpc/mm/slb.c +++ b/arch/powerpc/mm/slb.c | |||
@@ -22,6 +22,8 @@ | |||
22 | #include <asm/cacheflush.h> | 22 | #include <asm/cacheflush.h> |
23 | #include <asm/smp.h> | 23 | #include <asm/smp.h> |
24 | #include <linux/compiler.h> | 24 | #include <linux/compiler.h> |
25 | #include <linux/mm_types.h> | ||
26 | |||
25 | #include <asm/udbg.h> | 27 | #include <asm/udbg.h> |
26 | #include <asm/code-patching.h> | 28 | #include <asm/code-patching.h> |
27 | 29 | ||
diff --git a/arch/powerpc/perf/perf_regs.c b/arch/powerpc/perf/perf_regs.c index d24a8a3668fa..cbd82fde5770 100644 --- a/arch/powerpc/perf/perf_regs.c +++ b/arch/powerpc/perf/perf_regs.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/sched/task_stack.h> | ||
13 | #include <linux/perf_event.h> | 14 | #include <linux/perf_event.h> |
14 | #include <linux/bug.h> | 15 | #include <linux/bug.h> |
15 | #include <linux/stddef.h> | 16 | #include <linux/stddef.h> |
diff --git a/arch/powerpc/platforms/83xx/suspend.c b/arch/powerpc/platforms/83xx/suspend.c index 08f92f6ed228..978b85bb3233 100644 --- a/arch/powerpc/platforms/83xx/suspend.c +++ b/arch/powerpc/platforms/83xx/suspend.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/ioport.h> | 15 | #include <linux/ioport.h> |
16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
17 | #include <linux/wait.h> | 17 | #include <linux/wait.h> |
18 | #include <linux/sched/signal.h> | ||
18 | #include <linux/kthread.h> | 19 | #include <linux/kthread.h> |
19 | #include <linux/freezer.h> | 20 | #include <linux/freezer.h> |
20 | #include <linux/suspend.h> | 21 | #include <linux/suspend.h> |
diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c index a83a6d26090d..078097a0b09d 100644 --- a/arch/powerpc/platforms/85xx/smp.c +++ b/arch/powerpc/platforms/85xx/smp.c | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include <linux/stddef.h> | 13 | #include <linux/stddef.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/sched/hotplug.h> | ||
15 | #include <linux/init.h> | 16 | #include <linux/init.h> |
16 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
17 | #include <linux/of.h> | 18 | #include <linux/of.h> |
diff --git a/arch/powerpc/platforms/cell/cpufreq_spudemand.c b/arch/powerpc/platforms/cell/cpufreq_spudemand.c index 88301e53f085..882944c36ef5 100644 --- a/arch/powerpc/platforms/cell/cpufreq_spudemand.c +++ b/arch/powerpc/platforms/cell/cpufreq_spudemand.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <linux/cpufreq.h> | 23 | #include <linux/cpufreq.h> |
24 | #include <linux/sched.h> | 24 | #include <linux/sched.h> |
25 | #include <linux/sched/loadavg.h> | ||
25 | #include <linux/module.h> | 26 | #include <linux/module.h> |
26 | #include <linux/timer.h> | 27 | #include <linux/timer.h> |
27 | #include <linux/workqueue.h> | 28 | #include <linux/workqueue.h> |
diff --git a/arch/powerpc/platforms/cell/spufs/context.c b/arch/powerpc/platforms/cell/spufs/context.c index 3b4152faeb1f..b500b17254a0 100644 --- a/arch/powerpc/platforms/cell/spufs/context.c +++ b/arch/powerpc/platforms/cell/spufs/context.c | |||
@@ -25,6 +25,8 @@ | |||
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/atomic.h> | 26 | #include <linux/atomic.h> |
27 | #include <linux/sched.h> | 27 | #include <linux/sched.h> |
28 | #include <linux/sched/mm.h> | ||
29 | |||
28 | #include <asm/spu.h> | 30 | #include <asm/spu.h> |
29 | #include <asm/spu_csa.h> | 31 | #include <asm/spu_csa.h> |
30 | #include "spufs.h" | 32 | #include "spufs.h" |
diff --git a/arch/powerpc/platforms/cell/spufs/fault.c b/arch/powerpc/platforms/cell/spufs/fault.c index e29e4d5afa2d..870c0a82d560 100644 --- a/arch/powerpc/platforms/cell/spufs/fault.c +++ b/arch/powerpc/platforms/cell/spufs/fault.c | |||
@@ -19,7 +19,7 @@ | |||
19 | * along with this program; if not, write to the Free Software | 19 | * along with this program; if not, write to the Free Software |
20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
21 | */ | 21 | */ |
22 | #include <linux/sched.h> | 22 | #include <linux/sched/signal.h> |
23 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
24 | 24 | ||
25 | #include <asm/spu.h> | 25 | #include <asm/spu.h> |
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index 460f5f31d5cb..1fbb5da17dd2 100644 --- a/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c | |||
@@ -23,7 +23,8 @@ | |||
23 | #undef DEBUG | 23 | #undef DEBUG |
24 | 24 | ||
25 | #include <linux/errno.h> | 25 | #include <linux/errno.h> |
26 | #include <linux/sched.h> | 26 | #include <linux/sched/signal.h> |
27 | #include <linux/sched/loadavg.h> | ||
27 | #include <linux/sched/rt.h> | 28 | #include <linux/sched/rt.h> |
28 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
29 | #include <linux/mm.h> | 30 | #include <linux/mm.h> |
@@ -140,7 +141,7 @@ void __spu_update_sched_info(struct spu_context *ctx) | |||
140 | * runqueue. The context will be rescheduled on the proper node | 141 | * runqueue. The context will be rescheduled on the proper node |
141 | * if it is timesliced or preempted. | 142 | * if it is timesliced or preempted. |
142 | */ | 143 | */ |
143 | cpumask_copy(&ctx->cpus_allowed, tsk_cpus_allowed(current)); | 144 | cpumask_copy(&ctx->cpus_allowed, ¤t->cpus_allowed); |
144 | 145 | ||
145 | /* Save the current cpu id for spu interrupt routing. */ | 146 | /* Save the current cpu id for spu interrupt routing. */ |
146 | ctx->last_ran = raw_smp_processor_id(); | 147 | ctx->last_ran = raw_smp_processor_id(); |
diff --git a/arch/powerpc/platforms/cell/spufs/spufs.h b/arch/powerpc/platforms/cell/spufs/spufs.h index aac733966092..5e59f80e95db 100644 --- a/arch/powerpc/platforms/cell/spufs/spufs.h +++ b/arch/powerpc/platforms/cell/spufs/spufs.h | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/spinlock.h> | 27 | #include <linux/spinlock.h> |
28 | #include <linux/fs.h> | 28 | #include <linux/fs.h> |
29 | #include <linux/cpumask.h> | 29 | #include <linux/cpumask.h> |
30 | #include <linux/sched/signal.h> | ||
30 | 31 | ||
31 | #include <asm/spu.h> | 32 | #include <asm/spu.h> |
32 | #include <asm/spu_csa.h> | 33 | #include <asm/spu_csa.h> |
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c index c9eb7d6540ea..746ca7321b03 100644 --- a/arch/powerpc/platforms/powermac/smp.c +++ b/arch/powerpc/platforms/powermac/smp.c | |||
@@ -23,6 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/sched.h> | 25 | #include <linux/sched.h> |
26 | #include <linux/sched/hotplug.h> | ||
26 | #include <linux/smp.h> | 27 | #include <linux/smp.h> |
27 | #include <linux/interrupt.h> | 28 | #include <linux/interrupt.h> |
28 | #include <linux/kernel_stat.h> | 29 | #include <linux/kernel_stat.h> |
diff --git a/arch/powerpc/platforms/powernv/smp.c b/arch/powerpc/platforms/powernv/smp.c index e39e6c428af1..8b67e1eefb5c 100644 --- a/arch/powerpc/platforms/powernv/smp.c +++ b/arch/powerpc/platforms/powernv/smp.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
15 | #include <linux/sched/hotplug.h> | ||
15 | #include <linux/smp.h> | 16 | #include <linux/smp.h> |
16 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
17 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c index a1b63e00b2f7..7bc0e91f8715 100644 --- a/arch/powerpc/platforms/pseries/hotplug-cpu.c +++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | #include <linux/sched.h> /* for idle_task_exit */ | 26 | #include <linux/sched.h> /* for idle_task_exit */ |
27 | #include <linux/sched/hotplug.h> | ||
27 | #include <linux/cpu.h> | 28 | #include <linux/cpu.h> |
28 | #include <linux/of.h> | 29 | #include <linux/of.h> |
29 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index 26fa03fc9f3c..16321ad9e70c 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c | |||
@@ -13,7 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched/signal.h> |
17 | #include <linux/smp.h> | 17 | #include <linux/smp.h> |
18 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
19 | #include <linux/reboot.h> | 19 | #include <linux/reboot.h> |
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c index 5a8dfa22da7c..ef3fb1b9201f 100644 --- a/arch/s390/appldata/appldata_base.c +++ b/arch/s390/appldata/appldata_base.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | 12 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt |
13 | 13 | ||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/sched/stat.h> | ||
15 | #include <linux/init.h> | 16 | #include <linux/init.h> |
16 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
17 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
diff --git a/arch/s390/appldata/appldata_os.c b/arch/s390/appldata/appldata_os.c index 08b9e942a262..45b3178200ab 100644 --- a/arch/s390/appldata/appldata_os.c +++ b/arch/s390/appldata/appldata_os.c | |||
@@ -17,6 +17,8 @@ | |||
17 | #include <linux/kernel_stat.h> | 17 | #include <linux/kernel_stat.h> |
18 | #include <linux/netdevice.h> | 18 | #include <linux/netdevice.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/sched/loadavg.h> | ||
21 | #include <linux/sched/stat.h> | ||
20 | #include <asm/appldata.h> | 22 | #include <asm/appldata.h> |
21 | #include <asm/smp.h> | 23 | #include <asm/smp.h> |
22 | 24 | ||
diff --git a/arch/s390/crypto/prng.c b/arch/s390/crypto/prng.c index 85b7f5efe06a..5a3ec04a7082 100644 --- a/arch/s390/crypto/prng.c +++ b/arch/s390/crypto/prng.c | |||
@@ -20,6 +20,8 @@ | |||
20 | #include <linux/cpufeature.h> | 20 | #include <linux/cpufeature.h> |
21 | #include <linux/random.h> | 21 | #include <linux/random.h> |
22 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
23 | #include <linux/sched/signal.h> | ||
24 | |||
23 | #include <asm/debug.h> | 25 | #include <asm/debug.h> |
24 | #include <linux/uaccess.h> | 26 | #include <linux/uaccess.h> |
25 | #include <asm/timex.h> | 27 | #include <asm/timex.h> |
diff --git a/arch/s390/include/asm/compat.h b/arch/s390/include/asm/compat.h index 352f7bdaf11f..0ddd37e6c29d 100644 --- a/arch/s390/include/asm/compat.h +++ b/arch/s390/include/asm/compat.h | |||
@@ -5,6 +5,7 @@ | |||
5 | */ | 5 | */ |
6 | #include <linux/types.h> | 6 | #include <linux/types.h> |
7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
8 | #include <linux/sched/task_stack.h> | ||
8 | #include <linux/thread_info.h> | 9 | #include <linux/thread_info.h> |
9 | 10 | ||
10 | #define __TYPE_IS_PTR(t) (!__builtin_types_compatible_p(typeof(0?(t)0:0ULL), u64)) | 11 | #define __TYPE_IS_PTR(t) (!__builtin_types_compatible_p(typeof(0?(t)0:0ULL), u64)) |
diff --git a/arch/s390/include/asm/elf.h b/arch/s390/include/asm/elf.h index 83aaefed2a7b..1d48880b3cc1 100644 --- a/arch/s390/include/asm/elf.h +++ b/arch/s390/include/asm/elf.h | |||
@@ -132,7 +132,7 @@ typedef s390_fp_regs compat_elf_fpregset_t; | |||
132 | typedef s390_compat_regs compat_elf_gregset_t; | 132 | typedef s390_compat_regs compat_elf_gregset_t; |
133 | 133 | ||
134 | #include <linux/compat.h> | 134 | #include <linux/compat.h> |
135 | #include <linux/sched.h> /* for task_struct */ | 135 | #include <linux/sched/mm.h> /* for task_struct */ |
136 | #include <asm/mmu_context.h> | 136 | #include <asm/mmu_context.h> |
137 | 137 | ||
138 | #include <asm/vdso.h> | 138 | #include <asm/vdso.h> |
diff --git a/arch/s390/include/asm/kprobes.h b/arch/s390/include/asm/kprobes.h index 84c0f9086483..1293c4066cfc 100644 --- a/arch/s390/include/asm/kprobes.h +++ b/arch/s390/include/asm/kprobes.h | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/types.h> | 35 | #include <linux/types.h> |
36 | #include <linux/ptrace.h> | 36 | #include <linux/ptrace.h> |
37 | #include <linux/percpu.h> | 37 | #include <linux/percpu.h> |
38 | #include <linux/sched/task_stack.h> | ||
38 | 39 | ||
39 | #define __ARCH_WANT_KPROBES_INSN_SLOT | 40 | #define __ARCH_WANT_KPROBES_INSN_SLOT |
40 | 41 | ||
diff --git a/arch/s390/include/asm/mmu_context.h b/arch/s390/include/asm/mmu_context.h index 9b828c073176..6e31d87fb669 100644 --- a/arch/s390/include/asm/mmu_context.h +++ b/arch/s390/include/asm/mmu_context.h | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <asm/pgalloc.h> | 10 | #include <asm/pgalloc.h> |
11 | #include <linux/uaccess.h> | 11 | #include <linux/uaccess.h> |
12 | #include <linux/mm_types.h> | ||
12 | #include <asm/tlbflush.h> | 13 | #include <asm/tlbflush.h> |
13 | #include <asm/ctl_reg.h> | 14 | #include <asm/ctl_reg.h> |
14 | 15 | ||
diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c index 362350cc485c..c620049c61f2 100644 --- a/arch/s390/kernel/compat_signal.c +++ b/arch/s390/kernel/compat_signal.c | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | #include <linux/compat.h> | 11 | #include <linux/compat.h> |
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/sched/task_stack.h> | ||
13 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
14 | #include <linux/smp.h> | 15 | #include <linux/smp.h> |
15 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
diff --git a/arch/s390/kernel/dumpstack.c b/arch/s390/kernel/dumpstack.c index 55d4fe174fd9..829e1c53005c 100644 --- a/arch/s390/kernel/dumpstack.c +++ b/arch/s390/kernel/dumpstack.c | |||
@@ -14,6 +14,8 @@ | |||
14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/sched/debug.h> | ||
18 | #include <linux/sched/task_stack.h> | ||
17 | #include <asm/processor.h> | 19 | #include <asm/processor.h> |
18 | #include <asm/debug.h> | 20 | #include <asm/debug.h> |
19 | #include <asm/dis.h> | 21 | #include <asm/dis.h> |
diff --git a/arch/s390/kernel/idle.c b/arch/s390/kernel/idle.c index fb07a70820af..9340b2a07935 100644 --- a/arch/s390/kernel/idle.c +++ b/arch/s390/kernel/idle.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <linux/notifier.h> | 12 | #include <linux/notifier.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/cpu.h> | 14 | #include <linux/cpu.h> |
15 | #include <linux/cputime.h> | 15 | #include <linux/sched/cputime.h> |
16 | #include <asm/nmi.h> | 16 | #include <asm/nmi.h> |
17 | #include <asm/smp.h> | 17 | #include <asm/smp.h> |
18 | #include "entry.h" | 18 | #include "entry.h" |
diff --git a/arch/s390/kernel/nmi.c b/arch/s390/kernel/nmi.c index 80c093e0c6f1..9bf8327154ee 100644 --- a/arch/s390/kernel/nmi.c +++ b/arch/s390/kernel/nmi.c | |||
@@ -13,6 +13,9 @@ | |||
13 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
14 | #include <linux/hardirq.h> | 14 | #include <linux/hardirq.h> |
15 | #include <linux/time.h> | 15 | #include <linux/time.h> |
16 | #include <linux/module.h> | ||
17 | #include <linux/sched/signal.h> | ||
18 | |||
16 | #include <linux/export.h> | 19 | #include <linux/export.h> |
17 | #include <asm/lowcore.h> | 20 | #include <asm/lowcore.h> |
18 | #include <asm/smp.h> | 21 | #include <asm/smp.h> |
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index 54281660582c..20cd339e11ae 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c | |||
@@ -11,6 +11,9 @@ | |||
11 | #include <linux/compiler.h> | 11 | #include <linux/compiler.h> |
12 | #include <linux/cpu.h> | 12 | #include <linux/cpu.h> |
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/sched/debug.h> | ||
15 | #include <linux/sched/task.h> | ||
16 | #include <linux/sched/task_stack.h> | ||
14 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
15 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
16 | #include <linux/elfcore.h> | 19 | #include <linux/elfcore.h> |
diff --git a/arch/s390/kernel/processor.c b/arch/s390/kernel/processor.c index bc2b60dcb178..928b929a6261 100644 --- a/arch/s390/kernel/processor.c +++ b/arch/s390/kernel/processor.c | |||
@@ -8,10 +8,13 @@ | |||
8 | 8 | ||
9 | #include <linux/cpufeature.h> | 9 | #include <linux/cpufeature.h> |
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/sched/mm.h> | ||
11 | #include <linux/init.h> | 12 | #include <linux/init.h> |
12 | #include <linux/seq_file.h> | 13 | #include <linux/seq_file.h> |
14 | #include <linux/mm_types.h> | ||
13 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
14 | #include <linux/cpu.h> | 16 | #include <linux/cpu.h> |
17 | |||
15 | #include <asm/diag.h> | 18 | #include <asm/diag.h> |
16 | #include <asm/facility.h> | 19 | #include <asm/facility.h> |
17 | #include <asm/elf.h> | 20 | #include <asm/elf.h> |
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c index 12020b55887b..c14df0a1ec3c 100644 --- a/arch/s390/kernel/ptrace.c +++ b/arch/s390/kernel/ptrace.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
11 | #include <linux/sched/task_stack.h> | ||
11 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
12 | #include <linux/smp.h> | 13 | #include <linux/smp.h> |
13 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
diff --git a/arch/s390/kernel/runtime_instr.c b/arch/s390/kernel/runtime_instr.c index fffa0e5462af..429d3a782f1c 100644 --- a/arch/s390/kernel/runtime_instr.c +++ b/arch/s390/kernel/runtime_instr.c | |||
@@ -11,6 +11,8 @@ | |||
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
13 | #include <linux/kernel_stat.h> | 13 | #include <linux/kernel_stat.h> |
14 | #include <linux/sched/task_stack.h> | ||
15 | |||
14 | #include <asm/runtime_instr.h> | 16 | #include <asm/runtime_instr.h> |
15 | #include <asm/cpu_mf.h> | 17 | #include <asm/cpu_mf.h> |
16 | #include <asm/irq.h> | 18 | #include <asm/irq.h> |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index e4d811f17971..911dc0b49be0 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -18,6 +18,8 @@ | |||
18 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
19 | #include <linux/export.h> | 19 | #include <linux/export.h> |
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/sched/task.h> | ||
22 | #include <linux/cpu.h> | ||
21 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
22 | #include <linux/memblock.h> | 24 | #include <linux/memblock.h> |
23 | #include <linux/mm.h> | 25 | #include <linux/mm.h> |
diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c index 62a4c263e887..289dd50f9744 100644 --- a/arch/s390/kernel/signal.c +++ b/arch/s390/kernel/signal.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/sched/task_stack.h> | ||
13 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
14 | #include <linux/smp.h> | 15 | #include <linux/smp.h> |
15 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index d0a74d7ce433..47a973b5b4f1 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -31,6 +31,8 @@ | |||
31 | #include <linux/irqflags.h> | 31 | #include <linux/irqflags.h> |
32 | #include <linux/cpu.h> | 32 | #include <linux/cpu.h> |
33 | #include <linux/slab.h> | 33 | #include <linux/slab.h> |
34 | #include <linux/sched/hotplug.h> | ||
35 | #include <linux/sched/task_stack.h> | ||
34 | #include <linux/crash_dump.h> | 36 | #include <linux/crash_dump.h> |
35 | #include <linux/memblock.h> | 37 | #include <linux/memblock.h> |
36 | #include <asm/asm-offsets.h> | 38 | #include <asm/asm-offsets.h> |
diff --git a/arch/s390/kernel/stacktrace.c b/arch/s390/kernel/stacktrace.c index 0085b2d8ed7d..e66687dc6144 100644 --- a/arch/s390/kernel/stacktrace.c +++ b/arch/s390/kernel/stacktrace.c | |||
@@ -6,6 +6,7 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/sched.h> | 8 | #include <linux/sched.h> |
9 | #include <linux/sched/debug.h> | ||
9 | #include <linux/stacktrace.h> | 10 | #include <linux/stacktrace.h> |
10 | #include <linux/kallsyms.h> | 11 | #include <linux/kallsyms.h> |
11 | #include <linux/export.h> | 12 | #include <linux/export.h> |
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index de66abb479c9..c31da46bc037 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
19 | #include <linux/export.h> | 19 | #include <linux/export.h> |
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/sched/clock.h> | ||
21 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
22 | #include <linux/param.h> | 23 | #include <linux/param.h> |
23 | #include <linux/string.h> | 24 | #include <linux/string.h> |
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c index 2cd5f4f1013c..17660e800e74 100644 --- a/arch/s390/kernel/topology.c +++ b/arch/s390/kernel/topology.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/export.h> | 13 | #include <linux/export.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
16 | #include <linux/sched/topology.h> | ||
16 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
17 | #include <linux/init.h> | 18 | #include <linux/init.h> |
18 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c index 283ad7840335..f787b9d8f54c 100644 --- a/arch/s390/kernel/traps.c +++ b/arch/s390/kernel/traps.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/extable.h> | 17 | #include <linux/extable.h> |
18 | #include <linux/ptrace.h> | 18 | #include <linux/ptrace.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/sched/debug.h> | ||
20 | #include <linux/mm.h> | 21 | #include <linux/mm.h> |
21 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
22 | #include <linux/uaccess.h> | 23 | #include <linux/uaccess.h> |
diff --git a/arch/s390/kernel/uprobes.c b/arch/s390/kernel/uprobes.c index 66956c09d5bf..314e0ee3016a 100644 --- a/arch/s390/kernel/uprobes.c +++ b/arch/s390/kernel/uprobes.c | |||
@@ -9,6 +9,8 @@ | |||
9 | #include <linux/uprobes.h> | 9 | #include <linux/uprobes.h> |
10 | #include <linux/compat.h> | 10 | #include <linux/compat.h> |
11 | #include <linux/kdebug.h> | 11 | #include <linux/kdebug.h> |
12 | #include <linux/sched/task_stack.h> | ||
13 | |||
12 | #include <asm/switch_to.h> | 14 | #include <asm/switch_to.h> |
13 | #include <asm/facility.h> | 15 | #include <asm/facility.h> |
14 | #include <asm/kprobes.h> | 16 | #include <asm/kprobes.h> |
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c index 31bd96e81167..c14fc9029912 100644 --- a/arch/s390/kernel/vtime.c +++ b/arch/s390/kernel/vtime.c | |||
@@ -6,7 +6,7 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/kernel_stat.h> | 8 | #include <linux/kernel_stat.h> |
9 | #include <linux/cputime.h> | 9 | #include <linux/sched/cputime.h> |
10 | #include <linux/export.h> | 10 | #include <linux/export.h> |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/timex.h> | 12 | #include <linux/timex.h> |
diff --git a/arch/s390/kvm/gaccess.c b/arch/s390/kvm/gaccess.c index 4492c9363178..d55c829a5944 100644 --- a/arch/s390/kvm/gaccess.c +++ b/arch/s390/kvm/gaccess.c | |||
@@ -6,7 +6,9 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/vmalloc.h> | 8 | #include <linux/vmalloc.h> |
9 | #include <linux/mm_types.h> | ||
9 | #include <linux/err.h> | 10 | #include <linux/err.h> |
11 | |||
10 | #include <asm/pgtable.h> | 12 | #include <asm/pgtable.h> |
11 | #include <asm/gmap.h> | 13 | #include <asm/gmap.h> |
12 | #include "kvm-s390.h" | 14 | #include "kvm-s390.h" |
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index f5694838234d..fd6cd05bb6a7 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
@@ -29,6 +29,8 @@ | |||
29 | #include <linux/timer.h> | 29 | #include <linux/timer.h> |
30 | #include <linux/vmalloc.h> | 30 | #include <linux/vmalloc.h> |
31 | #include <linux/bitmap.h> | 31 | #include <linux/bitmap.h> |
32 | #include <linux/sched/signal.h> | ||
33 | |||
32 | #include <asm/asm-offsets.h> | 34 | #include <asm/asm-offsets.h> |
33 | #include <asm/lowcore.h> | 35 | #include <asm/lowcore.h> |
34 | #include <asm/stp.h> | 36 | #include <asm/stp.h> |
diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c index fb4b494cde9b..64b6a309f2c4 100644 --- a/arch/s390/kvm/priv.c +++ b/arch/s390/kvm/priv.c | |||
@@ -15,6 +15,8 @@ | |||
15 | #include <linux/gfp.h> | 15 | #include <linux/gfp.h> |
16 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
17 | #include <linux/compat.h> | 17 | #include <linux/compat.h> |
18 | #include <linux/mm_types.h> | ||
19 | |||
18 | #include <asm/asm-offsets.h> | 20 | #include <asm/asm-offsets.h> |
19 | #include <asm/facility.h> | 21 | #include <asm/facility.h> |
20 | #include <asm/current.h> | 22 | #include <asm/current.h> |
diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c index 38556e395915..5491be39776b 100644 --- a/arch/s390/kvm/vsie.c +++ b/arch/s390/kvm/vsie.c | |||
@@ -14,6 +14,8 @@ | |||
14 | #include <linux/bug.h> | 14 | #include <linux/bug.h> |
15 | #include <linux/list.h> | 15 | #include <linux/list.h> |
16 | #include <linux/bitmap.h> | 16 | #include <linux/bitmap.h> |
17 | #include <linux/sched/signal.h> | ||
18 | |||
17 | #include <asm/gmap.h> | 19 | #include <asm/gmap.h> |
18 | #include <asm/mmu_context.h> | 20 | #include <asm/mmu_context.h> |
19 | #include <asm/sclp.h> | 21 | #include <asm/sclp.h> |
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index bb5560eb2435..5845d3028ffc 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/perf_event.h> | 12 | #include <linux/perf_event.h> |
13 | #include <linux/signal.h> | 13 | #include <linux/signal.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
15 | #include <linux/sched/debug.h> | ||
15 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
16 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
17 | #include <linux/string.h> | 18 | #include <linux/string.h> |
diff --git a/arch/s390/mm/mmap.c b/arch/s390/mm/mmap.c index 7ae1282d5be9..50618614881f 100644 --- a/arch/s390/mm/mmap.c +++ b/arch/s390/mm/mmap.c | |||
@@ -26,6 +26,8 @@ | |||
26 | #include <linux/personality.h> | 26 | #include <linux/personality.h> |
27 | #include <linux/mm.h> | 27 | #include <linux/mm.h> |
28 | #include <linux/mman.h> | 28 | #include <linux/mman.h> |
29 | #include <linux/sched/signal.h> | ||
30 | #include <linux/sched/mm.h> | ||
29 | #include <linux/random.h> | 31 | #include <linux/random.h> |
30 | #include <linux/compat.h> | 32 | #include <linux/compat.h> |
31 | #include <linux/security.h> | 33 | #include <linux/security.h> |
diff --git a/arch/score/include/asm/mmu_context.h b/arch/score/include/asm/mmu_context.h index 2644577c96e8..073f95d350de 100644 --- a/arch/score/include/asm/mmu_context.h +++ b/arch/score/include/asm/mmu_context.h | |||
@@ -3,7 +3,9 @@ | |||
3 | 3 | ||
4 | #include <linux/errno.h> | 4 | #include <linux/errno.h> |
5 | #include <linux/sched.h> | 5 | #include <linux/sched.h> |
6 | #include <linux/mm_types.h> | ||
6 | #include <linux/slab.h> | 7 | #include <linux/slab.h> |
8 | |||
7 | #include <asm-generic/mm_hooks.h> | 9 | #include <asm-generic/mm_hooks.h> |
8 | 10 | ||
9 | #include <asm/cacheflush.h> | 11 | #include <asm/cacheflush.h> |
diff --git a/arch/score/kernel/process.c b/arch/score/kernel/process.c index aae9480706c2..eb64d7a677cb 100644 --- a/arch/score/kernel/process.c +++ b/arch/score/kernel/process.c | |||
@@ -28,6 +28,8 @@ | |||
28 | #include <linux/elfcore.h> | 28 | #include <linux/elfcore.h> |
29 | #include <linux/pm.h> | 29 | #include <linux/pm.h> |
30 | #include <linux/rcupdate.h> | 30 | #include <linux/rcupdate.h> |
31 | #include <linux/sched/task.h> | ||
32 | #include <linux/sched/task_stack.h> | ||
31 | 33 | ||
32 | void (*pm_power_off)(void); | 34 | void (*pm_power_off)(void); |
33 | EXPORT_SYMBOL(pm_power_off); | 35 | EXPORT_SYMBOL(pm_power_off); |
diff --git a/arch/score/kernel/ptrace.c b/arch/score/kernel/ptrace.c index 8b75e54816c1..d8455e60bce0 100644 --- a/arch/score/kernel/ptrace.c +++ b/arch/score/kernel/ptrace.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/mm.h> | 28 | #include <linux/mm.h> |
29 | #include <linux/ptrace.h> | 29 | #include <linux/ptrace.h> |
30 | #include <linux/regset.h> | 30 | #include <linux/regset.h> |
31 | #include <linux/sched/task_stack.h> | ||
31 | 32 | ||
32 | #include <linux/uaccess.h> | 33 | #include <linux/uaccess.h> |
33 | 34 | ||
diff --git a/arch/score/kernel/traps.c b/arch/score/kernel/traps.c index 569ac02f68df..e359ec675869 100644 --- a/arch/score/kernel/traps.c +++ b/arch/score/kernel/traps.c | |||
@@ -24,7 +24,10 @@ | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/extable.h> | 26 | #include <linux/extable.h> |
27 | #include <linux/sched.h> | 27 | #include <linux/sched/mm.h> |
28 | #include <linux/sched/signal.h> | ||
29 | #include <linux/sched/debug.h> | ||
30 | #include <linux/mm_types.h> | ||
28 | 31 | ||
29 | #include <asm/cacheflush.h> | 32 | #include <asm/cacheflush.h> |
30 | #include <asm/irq.h> | 33 | #include <asm/irq.h> |
diff --git a/arch/sh/drivers/heartbeat.c b/arch/sh/drivers/heartbeat.c index 49bace446a1a..c6d96049a0bb 100644 --- a/arch/sh/drivers/heartbeat.c +++ b/arch/sh/drivers/heartbeat.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/sched.h> | 23 | #include <linux/sched.h> |
24 | #include <linux/sched/loadavg.h> | ||
24 | #include <linux/timer.h> | 25 | #include <linux/timer.h> |
25 | #include <linux/io.h> | 26 | #include <linux/io.h> |
26 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
diff --git a/arch/sh/include/asm/fpu.h b/arch/sh/include/asm/fpu.h index 09fc2bc8a790..50921c7cc3f0 100644 --- a/arch/sh/include/asm/fpu.h +++ b/arch/sh/include/asm/fpu.h | |||
@@ -3,6 +3,8 @@ | |||
3 | 3 | ||
4 | #ifndef __ASSEMBLY__ | 4 | #ifndef __ASSEMBLY__ |
5 | 5 | ||
6 | #include <asm/ptrace.h> | ||
7 | |||
6 | struct task_struct; | 8 | struct task_struct; |
7 | 9 | ||
8 | #ifdef CONFIG_SH_FPU | 10 | #ifdef CONFIG_SH_FPU |
diff --git a/arch/sh/include/asm/mmu_context.h b/arch/sh/include/asm/mmu_context.h index 35ffdd081d26..eb6ac3c10c44 100644 --- a/arch/sh/include/asm/mmu_context.h +++ b/arch/sh/include/asm/mmu_context.h | |||
@@ -11,6 +11,8 @@ | |||
11 | #include <cpu/mmu_context.h> | 11 | #include <cpu/mmu_context.h> |
12 | #include <asm/tlbflush.h> | 12 | #include <asm/tlbflush.h> |
13 | #include <linux/uaccess.h> | 13 | #include <linux/uaccess.h> |
14 | #include <linux/mm_types.h> | ||
15 | |||
14 | #include <asm/io.h> | 16 | #include <asm/io.h> |
15 | #include <asm-generic/mm_hooks.h> | 17 | #include <asm-generic/mm_hooks.h> |
16 | 18 | ||
diff --git a/arch/sh/kernel/cpu/fpu.c b/arch/sh/kernel/cpu/fpu.c index 4e332244ea75..547c73478459 100644 --- a/arch/sh/kernel/cpu/fpu.c +++ b/arch/sh/kernel/cpu/fpu.c | |||
@@ -1,8 +1,11 @@ | |||
1 | #include <linux/sched.h> | 1 | #include <linux/sched/signal.h> |
2 | #include <linux/sched/task.h> | ||
3 | #include <linux/sched/task_stack.h> | ||
2 | #include <linux/slab.h> | 4 | #include <linux/slab.h> |
3 | #include <asm/processor.h> | 5 | #include <asm/processor.h> |
4 | #include <asm/fpu.h> | 6 | #include <asm/fpu.h> |
5 | #include <asm/traps.h> | 7 | #include <asm/traps.h> |
8 | #include <asm/ptrace.h> | ||
6 | 9 | ||
7 | int init_fpu(struct task_struct *tsk) | 10 | int init_fpu(struct task_struct *tsk) |
8 | { | 11 | { |
diff --git a/arch/sh/kernel/cpu/sh2a/fpu.c b/arch/sh/kernel/cpu/sh2a/fpu.c index 98bbaa447c93..352f894bece1 100644 --- a/arch/sh/kernel/cpu/sh2a/fpu.c +++ b/arch/sh/kernel/cpu/sh2a/fpu.c | |||
@@ -9,7 +9,7 @@ | |||
9 | * | 9 | * |
10 | * FIXME! These routines can be optimized in big endian case. | 10 | * FIXME! These routines can be optimized in big endian case. |
11 | */ | 11 | */ |
12 | #include <linux/sched.h> | 12 | #include <linux/sched/signal.h> |
13 | #include <linux/signal.h> | 13 | #include <linux/signal.h> |
14 | #include <asm/processor.h> | 14 | #include <asm/processor.h> |
15 | #include <asm/io.h> | 15 | #include <asm/io.h> |
diff --git a/arch/sh/kernel/cpu/sh4/fpu.c b/arch/sh/kernel/cpu/sh4/fpu.c index 69ab4d3c8d41..95fd2dcb83da 100644 --- a/arch/sh/kernel/cpu/sh4/fpu.c +++ b/arch/sh/kernel/cpu/sh4/fpu.c | |||
@@ -10,8 +10,7 @@ | |||
10 | * | 10 | * |
11 | * FIXME! These routines have not been tested for big endian case. | 11 | * FIXME! These routines have not been tested for big endian case. |
12 | */ | 12 | */ |
13 | #include <linux/sched.h> | 13 | #include <linux/sched/signal.h> |
14 | #include <linux/signal.h> | ||
15 | #include <linux/io.h> | 14 | #include <linux/io.h> |
16 | #include <cpu/fpu.h> | 15 | #include <cpu/fpu.h> |
17 | #include <asm/processor.h> | 16 | #include <asm/processor.h> |
diff --git a/arch/sh/kernel/disassemble.c b/arch/sh/kernel/disassemble.c index 64d5d8dded7c..015fee58014b 100644 --- a/arch/sh/kernel/disassemble.c +++ b/arch/sh/kernel/disassemble.c | |||
@@ -12,6 +12,8 @@ | |||
12 | #include <linux/string.h> | 12 | #include <linux/string.h> |
13 | #include <linux/uaccess.h> | 13 | #include <linux/uaccess.h> |
14 | 14 | ||
15 | #include <asm/ptrace.h> | ||
16 | |||
15 | /* | 17 | /* |
16 | * Format of an instruction in memory. | 18 | * Format of an instruction in memory. |
17 | */ | 19 | */ |
diff --git a/arch/sh/kernel/dumpstack.c b/arch/sh/kernel/dumpstack.c index 8dfe645bcc4b..b564b1eae4ae 100644 --- a/arch/sh/kernel/dumpstack.c +++ b/arch/sh/kernel/dumpstack.c | |||
@@ -11,6 +11,8 @@ | |||
11 | #include <linux/kallsyms.h> | 11 | #include <linux/kallsyms.h> |
12 | #include <linux/ftrace.h> | 12 | #include <linux/ftrace.h> |
13 | #include <linux/debug_locks.h> | 13 | #include <linux/debug_locks.h> |
14 | #include <linux/sched/debug.h> | ||
15 | #include <linux/sched/task_stack.h> | ||
14 | #include <linux/kdebug.h> | 16 | #include <linux/kdebug.h> |
15 | #include <linux/export.h> | 17 | #include <linux/export.h> |
16 | #include <linux/uaccess.h> | 18 | #include <linux/uaccess.h> |
diff --git a/arch/sh/kernel/hw_breakpoint.c b/arch/sh/kernel/hw_breakpoint.c index 2197fc584186..afe965712a69 100644 --- a/arch/sh/kernel/hw_breakpoint.c +++ b/arch/sh/kernel/hw_breakpoint.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/perf_event.h> | 13 | #include <linux/perf_event.h> |
14 | #include <linux/sched/signal.h> | ||
14 | #include <linux/hw_breakpoint.h> | 15 | #include <linux/hw_breakpoint.h> |
15 | #include <linux/percpu.h> | 16 | #include <linux/percpu.h> |
16 | #include <linux/kallsyms.h> | 17 | #include <linux/kallsyms.h> |
diff --git a/arch/sh/kernel/kgdb.c b/arch/sh/kernel/kgdb.c index adad46e41a1d..4f04c6638a4d 100644 --- a/arch/sh/kernel/kgdb.c +++ b/arch/sh/kernel/kgdb.c | |||
@@ -14,6 +14,8 @@ | |||
14 | #include <linux/irq.h> | 14 | #include <linux/irq.h> |
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/sched/task_stack.h> | ||
18 | |||
17 | #include <asm/cacheflush.h> | 19 | #include <asm/cacheflush.h> |
18 | #include <asm/traps.h> | 20 | #include <asm/traps.h> |
19 | 21 | ||
diff --git a/arch/sh/kernel/nmi_debug.c b/arch/sh/kernel/nmi_debug.c index ff0abbd1e652..730d928f0d12 100644 --- a/arch/sh/kernel/nmi_debug.c +++ b/arch/sh/kernel/nmi_debug.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/kdebug.h> | 9 | #include <linux/kdebug.h> |
10 | #include <linux/notifier.h> | 10 | #include <linux/notifier.h> |
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <linux/sched/debug.h> | ||
12 | #include <linux/hardirq.h> | 13 | #include <linux/hardirq.h> |
13 | 14 | ||
14 | enum nmi_action { | 15 | enum nmi_action { |
diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c index 53bc6c4c84ec..f8a695a223dd 100644 --- a/arch/sh/kernel/process.c +++ b/arch/sh/kernel/process.c | |||
@@ -1,10 +1,12 @@ | |||
1 | #include <linux/mm.h> | 1 | #include <linux/mm.h> |
2 | #include <linux/kernel.h> | 2 | #include <linux/kernel.h> |
3 | #include <linux/slab.h> | 3 | #include <linux/slab.h> |
4 | #include <linux/sched.h> | 4 | #include <linux/sched/signal.h> |
5 | #include <linux/sched/task_stack.h> | ||
5 | #include <linux/export.h> | 6 | #include <linux/export.h> |
6 | #include <linux/stackprotector.h> | 7 | #include <linux/stackprotector.h> |
7 | #include <asm/fpu.h> | 8 | #include <asm/fpu.h> |
9 | #include <asm/ptrace.h> | ||
8 | 10 | ||
9 | struct kmem_cache *task_xstate_cachep = NULL; | 11 | struct kmem_cache *task_xstate_cachep = NULL; |
10 | unsigned int xstate_size; | 12 | unsigned int xstate_size; |
diff --git a/arch/sh/kernel/process_32.c b/arch/sh/kernel/process_32.c index 51741850a715..2c7bdf8cb934 100644 --- a/arch/sh/kernel/process_32.c +++ b/arch/sh/kernel/process_32.c | |||
@@ -15,6 +15,9 @@ | |||
15 | */ | 15 | */ |
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | #include <linux/sched/debug.h> | ||
19 | #include <linux/sched/task.h> | ||
20 | #include <linux/sched/task_stack.h> | ||
18 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
19 | #include <linux/elfcore.h> | 22 | #include <linux/elfcore.h> |
20 | #include <linux/kallsyms.h> | 23 | #include <linux/kallsyms.h> |
diff --git a/arch/sh/kernel/process_64.c b/arch/sh/kernel/process_64.c index e0b271bffd6a..ee2abe96f9f3 100644 --- a/arch/sh/kernel/process_64.c +++ b/arch/sh/kernel/process_64.c | |||
@@ -25,6 +25,9 @@ | |||
25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/io.h> | 27 | #include <linux/io.h> |
28 | #include <linux/sched/debug.h> | ||
29 | #include <linux/sched/task.h> | ||
30 | #include <linux/sched/task_stack.h> | ||
28 | #include <asm/syscalls.h> | 31 | #include <asm/syscalls.h> |
29 | #include <linux/uaccess.h> | 32 | #include <linux/uaccess.h> |
30 | #include <asm/pgtable.h> | 33 | #include <asm/pgtable.h> |
diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c index 1aabfd356b35..5fc3ff606210 100644 --- a/arch/sh/kernel/ptrace_32.c +++ b/arch/sh/kernel/ptrace_32.c | |||
@@ -12,6 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
15 | #include <linux/sched/task_stack.h> | ||
15 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
16 | #include <linux/smp.h> | 17 | #include <linux/smp.h> |
17 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
diff --git a/arch/sh/kernel/ptrace_64.c b/arch/sh/kernel/ptrace_64.c index c49d0d05a215..1e0656d9e7af 100644 --- a/arch/sh/kernel/ptrace_64.c +++ b/arch/sh/kernel/ptrace_64.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/rwsem.h> | 19 | #include <linux/rwsem.h> |
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/sched/task_stack.h> | ||
21 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
22 | #include <linux/smp.h> | 23 | #include <linux/smp.h> |
23 | #include <linux/bitops.h> | 24 | #include <linux/bitops.h> |
diff --git a/arch/sh/kernel/signal_32.c b/arch/sh/kernel/signal_32.c index 5128d3001ee5..08bce11badc6 100644 --- a/arch/sh/kernel/signal_32.c +++ b/arch/sh/kernel/signal_32.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <linux/sched/task_stack.h> | ||
12 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
13 | #include <linux/smp.h> | 14 | #include <linux/smp.h> |
14 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
diff --git a/arch/sh/kernel/smp.c b/arch/sh/kernel/smp.c index edc4769b047e..c483422ea4d0 100644 --- a/arch/sh/kernel/smp.c +++ b/arch/sh/kernel/smp.c | |||
@@ -20,7 +20,8 @@ | |||
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/cpu.h> | 21 | #include <linux/cpu.h> |
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/sched.h> | 23 | #include <linux/sched/mm.h> |
24 | #include <linux/sched/hotplug.h> | ||
24 | #include <linux/atomic.h> | 25 | #include <linux/atomic.h> |
25 | #include <linux/clockchips.h> | 26 | #include <linux/clockchips.h> |
26 | #include <asm/processor.h> | 27 | #include <asm/processor.h> |
diff --git a/arch/sh/kernel/stacktrace.c b/arch/sh/kernel/stacktrace.c index bf989e063a0c..7a73d2763e1b 100644 --- a/arch/sh/kernel/stacktrace.c +++ b/arch/sh/kernel/stacktrace.c | |||
@@ -10,6 +10,7 @@ | |||
10 | * for more details. | 10 | * for more details. |
11 | */ | 11 | */ |
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/sched/debug.h> | ||
13 | #include <linux/stacktrace.h> | 14 | #include <linux/stacktrace.h> |
14 | #include <linux/thread_info.h> | 15 | #include <linux/thread_info.h> |
15 | #include <linux/module.h> | 16 | #include <linux/module.h> |
diff --git a/arch/sh/kernel/sys_sh32.c b/arch/sh/kernel/sys_sh32.c index d5287d76809c..a2e1231a90a3 100644 --- a/arch/sh/kernel/sys_sh32.c +++ b/arch/sh/kernel/sys_sh32.c | |||
@@ -1,5 +1,6 @@ | |||
1 | #include <linux/errno.h> | 1 | #include <linux/errno.h> |
2 | #include <linux/sched.h> | 2 | #include <linux/sched.h> |
3 | #include <linux/sched/task_stack.h> | ||
3 | #include <linux/mm.h> | 4 | #include <linux/mm.h> |
4 | #include <linux/smp.h> | 5 | #include <linux/smp.h> |
5 | #include <linux/sem.h> | 6 | #include <linux/sem.h> |
diff --git a/arch/sh/kernel/traps.c b/arch/sh/kernel/traps.c index 9513fa7840aa..b32d1c3a4655 100644 --- a/arch/sh/kernel/traps.c +++ b/arch/sh/kernel/traps.c | |||
@@ -4,10 +4,14 @@ | |||
4 | #include <linux/kdebug.h> | 4 | #include <linux/kdebug.h> |
5 | #include <linux/signal.h> | 5 | #include <linux/signal.h> |
6 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
7 | #include <linux/sched/debug.h> | ||
8 | #include <linux/sched/task_stack.h> | ||
7 | #include <linux/uaccess.h> | 9 | #include <linux/uaccess.h> |
8 | #include <linux/hardirq.h> | 10 | #include <linux/hardirq.h> |
9 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
10 | #include <linux/kexec.h> | 12 | #include <linux/kexec.h> |
13 | #include <linux/sched/signal.h> | ||
14 | |||
11 | #include <linux/extable.h> | 15 | #include <linux/extable.h> |
12 | #include <linux/module.h> /* print_modules */ | 16 | #include <linux/module.h> /* print_modules */ |
13 | #include <asm/unwinder.h> | 17 | #include <asm/unwinder.h> |
diff --git a/arch/sh/kernel/traps_32.c b/arch/sh/kernel/traps_32.c index ff639342a8be..57cff00cad17 100644 --- a/arch/sh/kernel/traps_32.c +++ b/arch/sh/kernel/traps_32.c | |||
@@ -25,6 +25,8 @@ | |||
25 | #include <linux/sysfs.h> | 25 | #include <linux/sysfs.h> |
26 | #include <linux/uaccess.h> | 26 | #include <linux/uaccess.h> |
27 | #include <linux/perf_event.h> | 27 | #include <linux/perf_event.h> |
28 | #include <linux/sched/task_stack.h> | ||
29 | |||
28 | #include <asm/alignment.h> | 30 | #include <asm/alignment.h> |
29 | #include <asm/fpu.h> | 31 | #include <asm/fpu.h> |
30 | #include <asm/kprobes.h> | 32 | #include <asm/kprobes.h> |
diff --git a/arch/sh/kernel/traps_64.c b/arch/sh/kernel/traps_64.c index 00835edb6e20..014fb08cf133 100644 --- a/arch/sh/kernel/traps_64.c +++ b/arch/sh/kernel/traps_64.c | |||
@@ -10,6 +10,7 @@ | |||
10 | * for more details. | 10 | * for more details. |
11 | */ | 11 | */ |
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/sched/debug.h> | ||
13 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
14 | #include <linux/string.h> | 15 | #include <linux/string.h> |
15 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
diff --git a/arch/sh/math-emu/math.c b/arch/sh/math-emu/math.c index 5078cb809750..c86f4360c6ce 100644 --- a/arch/sh/math-emu/math.c +++ b/arch/sh/math-emu/math.c | |||
@@ -10,7 +10,7 @@ | |||
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/errno.h> | 11 | #include <linux/errno.h> |
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | #include <linux/sched.h> | 13 | #include <linux/sched/signal.h> |
14 | #include <linux/signal.h> | 14 | #include <linux/signal.h> |
15 | #include <linux/perf_event.h> | 15 | #include <linux/perf_event.h> |
16 | 16 | ||
diff --git a/arch/sh/mm/asids-debugfs.c b/arch/sh/mm/asids-debugfs.c index bf95fdaedd0c..e5539e0f8e3b 100644 --- a/arch/sh/mm/asids-debugfs.c +++ b/arch/sh/mm/asids-debugfs.c | |||
@@ -20,6 +20,9 @@ | |||
20 | #include <linux/debugfs.h> | 20 | #include <linux/debugfs.h> |
21 | #include <linux/seq_file.h> | 21 | #include <linux/seq_file.h> |
22 | #include <linux/spinlock.h> | 22 | #include <linux/spinlock.h> |
23 | #include <linux/sched/signal.h> | ||
24 | #include <linux/sched/task.h> | ||
25 | |||
23 | #include <asm/processor.h> | 26 | #include <asm/processor.h> |
24 | #include <asm/mmu_context.h> | 27 | #include <asm/mmu_context.h> |
25 | 28 | ||
diff --git a/arch/sh/mm/extable_32.c b/arch/sh/mm/extable_32.c index 24a75d315dcb..940e871bc816 100644 --- a/arch/sh/mm/extable_32.c +++ b/arch/sh/mm/extable_32.c | |||
@@ -7,6 +7,8 @@ | |||
7 | #include <linux/extable.h> | 7 | #include <linux/extable.h> |
8 | #include <linux/uaccess.h> | 8 | #include <linux/uaccess.h> |
9 | 9 | ||
10 | #include <asm/ptrace.h> | ||
11 | |||
10 | int fixup_exception(struct pt_regs *regs) | 12 | int fixup_exception(struct pt_regs *regs) |
11 | { | 13 | { |
12 | const struct exception_table_entry *fixup; | 14 | const struct exception_table_entry *fixup; |
diff --git a/arch/sh/mm/fault.c b/arch/sh/mm/fault.c index 9bf876780cef..6fd1bf7481c7 100644 --- a/arch/sh/mm/fault.c +++ b/arch/sh/mm/fault.c | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
16 | #include <linux/sched/signal.h> | ||
16 | #include <linux/hardirq.h> | 17 | #include <linux/hardirq.h> |
17 | #include <linux/kprobes.h> | 18 | #include <linux/kprobes.h> |
18 | #include <linux/perf_event.h> | 19 | #include <linux/perf_event.h> |
diff --git a/arch/sh/mm/mmap.c b/arch/sh/mm/mmap.c index 6777177807c2..08e7af0be4a7 100644 --- a/arch/sh/mm/mmap.c +++ b/arch/sh/mm/mmap.c | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | #include <linux/io.h> | 10 | #include <linux/io.h> |
11 | #include <linux/mm.h> | 11 | #include <linux/mm.h> |
12 | #include <linux/sched/mm.h> | ||
12 | #include <linux/mman.h> | 13 | #include <linux/mman.h> |
13 | #include <linux/module.h> | 14 | #include <linux/module.h> |
14 | #include <asm/page.h> | 15 | #include <asm/page.h> |
diff --git a/arch/sparc/include/asm/mmu_context_64.h b/arch/sparc/include/asm/mmu_context_64.h index d0317993e947..22fede6eba11 100644 --- a/arch/sparc/include/asm/mmu_context_64.h +++ b/arch/sparc/include/asm/mmu_context_64.h | |||
@@ -6,6 +6,8 @@ | |||
6 | #ifndef __ASSEMBLY__ | 6 | #ifndef __ASSEMBLY__ |
7 | 7 | ||
8 | #include <linux/spinlock.h> | 8 | #include <linux/spinlock.h> |
9 | #include <linux/mm_types.h> | ||
10 | |||
9 | #include <asm/spitfire.h> | 11 | #include <asm/spitfire.h> |
10 | #include <asm-generic/mm_hooks.h> | 12 | #include <asm-generic/mm_hooks.h> |
11 | 13 | ||
diff --git a/arch/sparc/include/asm/pgtable_64.h b/arch/sparc/include/asm/pgtable_64.h index 7932a4a37817..56e49c8f770d 100644 --- a/arch/sparc/include/asm/pgtable_64.h +++ b/arch/sparc/include/asm/pgtable_64.h | |||
@@ -878,6 +878,9 @@ static inline unsigned long pud_pfn(pud_t pud) | |||
878 | #define pte_offset_map pte_index | 878 | #define pte_offset_map pte_index |
879 | #define pte_unmap(pte) do { } while (0) | 879 | #define pte_unmap(pte) do { } while (0) |
880 | 880 | ||
881 | /* We cannot include <linux/mm_types.h> at this point yet: */ | ||
882 | extern struct mm_struct init_mm; | ||
883 | |||
881 | /* Actual page table PTE updates. */ | 884 | /* Actual page table PTE updates. */ |
882 | void tlb_batch_add(struct mm_struct *mm, unsigned long vaddr, | 885 | void tlb_batch_add(struct mm_struct *mm, unsigned long vaddr, |
883 | pte_t *ptep, pte_t orig, int fullmm, | 886 | pte_t *ptep, pte_t orig, int fullmm, |
diff --git a/arch/sparc/kernel/asm-offsets.c b/arch/sparc/kernel/asm-offsets.c index f76389a32342..3f09e1c83f58 100644 --- a/arch/sparc/kernel/asm-offsets.c +++ b/arch/sparc/kernel/asm-offsets.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/mm_types.h> | ||
14 | // #include <linux/mm.h> | 15 | // #include <linux/mm.h> |
15 | #include <linux/kbuild.h> | 16 | #include <linux/kbuild.h> |
16 | 17 | ||
diff --git a/arch/sparc/kernel/ds.c b/arch/sparc/kernel/ds.c index f87a55d77094..b542cc7c8d94 100644 --- a/arch/sparc/kernel/ds.c +++ b/arch/sparc/kernel/ds.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/string.h> | 9 | #include <linux/string.h> |
10 | #include <linux/slab.h> | 10 | #include <linux/slab.h> |
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <linux/sched/clock.h> | ||
12 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
13 | #include <linux/mutex.h> | 14 | #include <linux/mutex.h> |
14 | #include <linux/kthread.h> | 15 | #include <linux/kthread.h> |
diff --git a/arch/sparc/kernel/led.c b/arch/sparc/kernel/led.c index 3ae36f36e758..44a3ed93c214 100644 --- a/arch/sparc/kernel/led.c +++ b/arch/sparc/kernel/led.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/jiffies.h> | 8 | #include <linux/jiffies.h> |
9 | #include <linux/timer.h> | 9 | #include <linux/timer.h> |
10 | #include <linux/uaccess.h> | 10 | #include <linux/uaccess.h> |
11 | #include <linux/sched/loadavg.h> | ||
11 | 12 | ||
12 | #include <asm/auxio.h> | 13 | #include <asm/auxio.h> |
13 | 14 | ||
diff --git a/arch/sparc/kernel/leon_smp.c b/arch/sparc/kernel/leon_smp.c index b99d33797e1d..db7acf27bea2 100644 --- a/arch/sparc/kernel/leon_smp.c +++ b/arch/sparc/kernel/leon_smp.c | |||
@@ -9,7 +9,7 @@ | |||
9 | #include <asm/head.h> | 9 | #include <asm/head.h> |
10 | 10 | ||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/sched.h> | 12 | #include <linux/sched/mm.h> |
13 | #include <linux/threads.h> | 13 | #include <linux/threads.h> |
14 | #include <linux/smp.h> | 14 | #include <linux/smp.h> |
15 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
diff --git a/arch/sparc/kernel/process_32.c b/arch/sparc/kernel/process_32.c index 48ffc3e7d1dd..b6dac8e980f0 100644 --- a/arch/sparc/kernel/process_32.c +++ b/arch/sparc/kernel/process_32.c | |||
@@ -14,6 +14,9 @@ | |||
14 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/sched/debug.h> | ||
18 | #include <linux/sched/task.h> | ||
19 | #include <linux/sched/task_stack.h> | ||
17 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
18 | #include <linux/mm.h> | 21 | #include <linux/mm.h> |
19 | #include <linux/stddef.h> | 22 | #include <linux/stddef.h> |
diff --git a/arch/sparc/kernel/process_64.c b/arch/sparc/kernel/process_64.c index d249ca10b203..1badc493e62e 100644 --- a/arch/sparc/kernel/process_64.c +++ b/arch/sparc/kernel/process_64.c | |||
@@ -14,6 +14,9 @@ | |||
14 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
15 | #include <linux/export.h> | 15 | #include <linux/export.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/sched/debug.h> | ||
18 | #include <linux/sched/task.h> | ||
19 | #include <linux/sched/task_stack.h> | ||
17 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
18 | #include <linux/mm.h> | 21 | #include <linux/mm.h> |
19 | #include <linux/fs.h> | 22 | #include <linux/fs.h> |
diff --git a/arch/sparc/kernel/ptrace_64.c b/arch/sparc/kernel/ptrace_64.c index 901063c1cf7e..df9e731a76f5 100644 --- a/arch/sparc/kernel/ptrace_64.c +++ b/arch/sparc/kernel/ptrace_64.c | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
15 | #include <linux/sched/task_stack.h> | ||
15 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
16 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
17 | #include <linux/export.h> | 18 | #include <linux/export.h> |
diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c index 8e3e13924594..b3bc0ac757cc 100644 --- a/arch/sparc/kernel/smp_64.c +++ b/arch/sparc/kernel/smp_64.c | |||
@@ -5,7 +5,8 @@ | |||
5 | 5 | ||
6 | #include <linux/export.h> | 6 | #include <linux/export.h> |
7 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
8 | #include <linux/sched.h> | 8 | #include <linux/sched/mm.h> |
9 | #include <linux/sched/hotplug.h> | ||
9 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
10 | #include <linux/pagemap.h> | 11 | #include <linux/pagemap.h> |
11 | #include <linux/threads.h> | 12 | #include <linux/threads.h> |
diff --git a/arch/sparc/kernel/stacktrace.c b/arch/sparc/kernel/stacktrace.c index e78386a0029f..be4c14cccc05 100644 --- a/arch/sparc/kernel/stacktrace.c +++ b/arch/sparc/kernel/stacktrace.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <linux/sched.h> | 1 | #include <linux/sched.h> |
2 | #include <linux/sched/debug.h> | ||
2 | #include <linux/stacktrace.h> | 3 | #include <linux/stacktrace.h> |
3 | #include <linux/thread_info.h> | 4 | #include <linux/thread_info.h> |
4 | #include <linux/ftrace.h> | 5 | #include <linux/ftrace.h> |
diff --git a/arch/sparc/kernel/sun4d_smp.c b/arch/sparc/kernel/sun4d_smp.c index 7b55c50eabe5..af93b50e3ce4 100644 --- a/arch/sparc/kernel/sun4d_smp.c +++ b/arch/sparc/kernel/sun4d_smp.c | |||
@@ -10,7 +10,7 @@ | |||
10 | #include <linux/interrupt.h> | 10 | #include <linux/interrupt.h> |
11 | #include <linux/profile.h> | 11 | #include <linux/profile.h> |
12 | #include <linux/delay.h> | 12 | #include <linux/delay.h> |
13 | #include <linux/sched.h> | 13 | #include <linux/sched/mm.h> |
14 | #include <linux/cpu.h> | 14 | #include <linux/cpu.h> |
15 | 15 | ||
16 | #include <asm/cacheflush.h> | 16 | #include <asm/cacheflush.h> |
diff --git a/arch/sparc/kernel/sun4m_irq.c b/arch/sparc/kernel/sun4m_irq.c index da737c712fa8..aa84da0b2d30 100644 --- a/arch/sparc/kernel/sun4m_irq.c +++ b/arch/sparc/kernel/sun4m_irq.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/slab.h> | 12 | #include <linux/slab.h> |
13 | #include <linux/sched/debug.h> | ||
13 | 14 | ||
14 | #include <asm/timer.h> | 15 | #include <asm/timer.h> |
15 | #include <asm/traps.h> | 16 | #include <asm/traps.h> |
diff --git a/arch/sparc/kernel/sun4m_smp.c b/arch/sparc/kernel/sun4m_smp.c index 633c4cf6fdb0..5547fcb1d72d 100644 --- a/arch/sparc/kernel/sun4m_smp.c +++ b/arch/sparc/kernel/sun4m_smp.c | |||
@@ -8,7 +8,7 @@ | |||
8 | #include <linux/interrupt.h> | 8 | #include <linux/interrupt.h> |
9 | #include <linux/profile.h> | 9 | #include <linux/profile.h> |
10 | #include <linux/delay.h> | 10 | #include <linux/delay.h> |
11 | #include <linux/sched.h> | 11 | #include <linux/sched/mm.h> |
12 | #include <linux/cpu.h> | 12 | #include <linux/cpu.h> |
13 | 13 | ||
14 | #include <asm/cacheflush.h> | 14 | #include <asm/cacheflush.h> |
diff --git a/arch/sparc/kernel/sys_sparc_32.c b/arch/sparc/kernel/sys_sparc_32.c index fb7b185ee941..7aecb239626d 100644 --- a/arch/sparc/kernel/sys_sparc_32.c +++ b/arch/sparc/kernel/sys_sparc_32.c | |||
@@ -7,7 +7,9 @@ | |||
7 | 7 | ||
8 | #include <linux/errno.h> | 8 | #include <linux/errno.h> |
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | #include <linux/sched.h> | 10 | #include <linux/sched/signal.h> |
11 | #include <linux/sched/mm.h> | ||
12 | #include <linux/sched/debug.h> | ||
11 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
12 | #include <linux/fs.h> | 14 | #include <linux/fs.h> |
13 | #include <linux/file.h> | 15 | #include <linux/file.h> |
diff --git a/arch/sparc/kernel/sys_sparc_64.c b/arch/sparc/kernel/sys_sparc_64.c index 884c70331345..ef4520efc813 100644 --- a/arch/sparc/kernel/sys_sparc_64.c +++ b/arch/sparc/kernel/sys_sparc_64.c | |||
@@ -7,7 +7,9 @@ | |||
7 | 7 | ||
8 | #include <linux/errno.h> | 8 | #include <linux/errno.h> |
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | #include <linux/sched.h> | 10 | #include <linux/sched/signal.h> |
11 | #include <linux/sched/mm.h> | ||
12 | #include <linux/sched/debug.h> | ||
11 | #include <linux/fs.h> | 13 | #include <linux/fs.h> |
12 | #include <linux/file.h> | 14 | #include <linux/file.h> |
13 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
diff --git a/arch/sparc/kernel/sysfs.c b/arch/sparc/kernel/sysfs.c index 4808b6d23455..d63fc613e7a9 100644 --- a/arch/sparc/kernel/sysfs.c +++ b/arch/sparc/kernel/sysfs.c | |||
@@ -106,7 +106,7 @@ static unsigned long run_on_cpu(unsigned long cpu, | |||
106 | cpumask_t old_affinity; | 106 | cpumask_t old_affinity; |
107 | unsigned long ret; | 107 | unsigned long ret; |
108 | 108 | ||
109 | cpumask_copy(&old_affinity, tsk_cpus_allowed(current)); | 109 | cpumask_copy(&old_affinity, ¤t->cpus_allowed); |
110 | /* should return -EINVAL to userspace */ | 110 | /* should return -EINVAL to userspace */ |
111 | if (set_cpus_allowed_ptr(current, cpumask_of(cpu))) | 111 | if (set_cpus_allowed_ptr(current, cpumask_of(cpu))) |
112 | return 0; | 112 | return 0; |
diff --git a/arch/sparc/kernel/traps_32.c b/arch/sparc/kernel/traps_32.c index ecddac5a4c96..466d4aed06c7 100644 --- a/arch/sparc/kernel/traps_32.c +++ b/arch/sparc/kernel/traps_32.c | |||
@@ -9,7 +9,9 @@ | |||
9 | * I hate traps on the sparc, grrr... | 9 | * I hate traps on the sparc, grrr... |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/sched.h> /* for jiffies */ | 12 | #include <linux/sched/mm.h> |
13 | #include <linux/sched/debug.h> | ||
14 | #include <linux/mm_types.h> | ||
13 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
14 | #include <linux/signal.h> | 16 | #include <linux/signal.h> |
15 | #include <linux/smp.h> | 17 | #include <linux/smp.h> |
diff --git a/arch/sparc/kernel/traps_64.c b/arch/sparc/kernel/traps_64.c index e022d7b00390..196ee5eb4d48 100644 --- a/arch/sparc/kernel/traps_64.c +++ b/arch/sparc/kernel/traps_64.c | |||
@@ -9,7 +9,8 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/extable.h> | 11 | #include <linux/extable.h> |
12 | #include <linux/sched.h> | 12 | #include <linux/sched/mm.h> |
13 | #include <linux/sched/debug.h> | ||
13 | #include <linux/linkage.h> | 14 | #include <linux/linkage.h> |
14 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
15 | #include <linux/signal.h> | 16 | #include <linux/signal.h> |
diff --git a/arch/sparc/kernel/unaligned_32.c b/arch/sparc/kernel/unaligned_32.c index d20d4e3fd129..8367dce5f41b 100644 --- a/arch/sparc/kernel/unaligned_32.c +++ b/arch/sparc/kernel/unaligned_32.c | |||
@@ -8,7 +8,7 @@ | |||
8 | 8 | ||
9 | 9 | ||
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/sched.h> | 11 | #include <linux/sched/signal.h> |
12 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
13 | #include <asm/ptrace.h> | 13 | #include <asm/ptrace.h> |
14 | #include <asm/processor.h> | 14 | #include <asm/processor.h> |
diff --git a/arch/sparc/kernel/viohs.c b/arch/sparc/kernel/viohs.c index 526fcb5d8ce9..b30b30ab3ddd 100644 --- a/arch/sparc/kernel/viohs.c +++ b/arch/sparc/kernel/viohs.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/string.h> | 8 | #include <linux/string.h> |
9 | #include <linux/delay.h> | 9 | #include <linux/delay.h> |
10 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
11 | #include <linux/sched/clock.h> | ||
11 | #include <linux/slab.h> | 12 | #include <linux/slab.h> |
12 | 13 | ||
13 | #include <asm/ldc.h> | 14 | #include <asm/ldc.h> |
diff --git a/arch/sparc/mm/fault_64.c b/arch/sparc/mm/fault_64.c index 643c149a3151..b84c4dd14954 100644 --- a/arch/sparc/mm/fault_64.c +++ b/arch/sparc/mm/fault_64.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/string.h> | 10 | #include <linux/string.h> |
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/sched/debug.h> | ||
13 | #include <linux/ptrace.h> | 14 | #include <linux/ptrace.h> |
14 | #include <linux/mman.h> | 15 | #include <linux/mman.h> |
15 | #include <linux/signal.h> | 16 | #include <linux/signal.h> |
diff --git a/arch/sparc/mm/hugetlbpage.c b/arch/sparc/mm/hugetlbpage.c index e98a3f2e8f0f..323bc6b6e3ad 100644 --- a/arch/sparc/mm/hugetlbpage.c +++ b/arch/sparc/mm/hugetlbpage.c | |||
@@ -6,6 +6,7 @@ | |||
6 | 6 | ||
7 | #include <linux/fs.h> | 7 | #include <linux/fs.h> |
8 | #include <linux/mm.h> | 8 | #include <linux/mm.h> |
9 | #include <linux/sched/mm.h> | ||
9 | #include <linux/hugetlb.h> | 10 | #include <linux/hugetlb.h> |
10 | #include <linux/pagemap.h> | 11 | #include <linux/pagemap.h> |
11 | #include <linux/sysctl.h> | 12 | #include <linux/sysctl.h> |
diff --git a/arch/sparc/mm/tsb.c b/arch/sparc/mm/tsb.c index 23479c3d39f0..0a04811f06b7 100644 --- a/arch/sparc/mm/tsb.c +++ b/arch/sparc/mm/tsb.c | |||
@@ -6,6 +6,8 @@ | |||
6 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
7 | #include <linux/preempt.h> | 7 | #include <linux/preempt.h> |
8 | #include <linux/slab.h> | 8 | #include <linux/slab.h> |
9 | #include <linux/mm_types.h> | ||
10 | |||
9 | #include <asm/page.h> | 11 | #include <asm/page.h> |
10 | #include <asm/pgtable.h> | 12 | #include <asm/pgtable.h> |
11 | #include <asm/mmu_context.h> | 13 | #include <asm/mmu_context.h> |
diff --git a/arch/tile/include/asm/mmu_context.h b/arch/tile/include/asm/mmu_context.h index f67753db1f78..45a4b4c424cf 100644 --- a/arch/tile/include/asm/mmu_context.h +++ b/arch/tile/include/asm/mmu_context.h | |||
@@ -16,6 +16,8 @@ | |||
16 | #define _ASM_TILE_MMU_CONTEXT_H | 16 | #define _ASM_TILE_MMU_CONTEXT_H |
17 | 17 | ||
18 | #include <linux/smp.h> | 18 | #include <linux/smp.h> |
19 | #include <linux/mm_types.h> | ||
20 | |||
19 | #include <asm/setup.h> | 21 | #include <asm/setup.h> |
20 | #include <asm/page.h> | 22 | #include <asm/page.h> |
21 | #include <asm/pgalloc.h> | 23 | #include <asm/pgalloc.h> |
diff --git a/arch/tile/include/asm/stack.h b/arch/tile/include/asm/stack.h index c3cb42615a9f..3573325e340b 100644 --- a/arch/tile/include/asm/stack.h +++ b/arch/tile/include/asm/stack.h | |||
@@ -17,6 +17,8 @@ | |||
17 | 17 | ||
18 | #include <linux/types.h> | 18 | #include <linux/types.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/sched/debug.h> | ||
21 | |||
20 | #include <asm/backtrace.h> | 22 | #include <asm/backtrace.h> |
21 | #include <asm/page.h> | 23 | #include <asm/page.h> |
22 | #include <hv/hypervisor.h> | 24 | #include <hv/hypervisor.h> |
diff --git a/arch/tile/kernel/compat_signal.c b/arch/tile/kernel/compat_signal.c index c667e104a0c2..0e863f1ee08c 100644 --- a/arch/tile/kernel/compat_signal.c +++ b/arch/tile/kernel/compat_signal.c | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
16 | #include <linux/sched/task_stack.h> | ||
16 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
17 | #include <linux/smp.h> | 18 | #include <linux/smp.h> |
18 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
diff --git a/arch/tile/kernel/kgdb.c b/arch/tile/kernel/kgdb.c index 9247d6b562f4..d4eb5fb2df9d 100644 --- a/arch/tile/kernel/kgdb.c +++ b/arch/tile/kernel/kgdb.c | |||
@@ -19,6 +19,8 @@ | |||
19 | #include <linux/kdebug.h> | 19 | #include <linux/kdebug.h> |
20 | #include <linux/uaccess.h> | 20 | #include <linux/uaccess.h> |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/sched/task_stack.h> | ||
23 | |||
22 | #include <asm/cacheflush.h> | 24 | #include <asm/cacheflush.h> |
23 | 25 | ||
24 | static tile_bundle_bits singlestep_insn = TILEGX_BPT_BUNDLE | DIE_SSTEPBP; | 26 | static tile_bundle_bits singlestep_insn = TILEGX_BPT_BUNDLE | DIE_SSTEPBP; |
diff --git a/arch/tile/kernel/process.c b/arch/tile/kernel/process.c index c84c54a1ac55..f0a0e18e4dfb 100644 --- a/arch/tile/kernel/process.c +++ b/arch/tile/kernel/process.c | |||
@@ -13,6 +13,9 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
16 | #include <linux/sched/debug.h> | ||
17 | #include <linux/sched/task.h> | ||
18 | #include <linux/sched/task_stack.h> | ||
16 | #include <linux/preempt.h> | 19 | #include <linux/preempt.h> |
17 | #include <linux/module.h> | 20 | #include <linux/module.h> |
18 | #include <linux/fs.h> | 21 | #include <linux/fs.h> |
diff --git a/arch/tile/kernel/ptrace.c b/arch/tile/kernel/ptrace.c index e279572824b1..e1a078e6828e 100644 --- a/arch/tile/kernel/ptrace.c +++ b/arch/tile/kernel/ptrace.c | |||
@@ -23,6 +23,8 @@ | |||
23 | #include <linux/elf.h> | 23 | #include <linux/elf.h> |
24 | #include <linux/tracehook.h> | 24 | #include <linux/tracehook.h> |
25 | #include <linux/context_tracking.h> | 25 | #include <linux/context_tracking.h> |
26 | #include <linux/sched/task_stack.h> | ||
27 | |||
26 | #include <asm/traps.h> | 28 | #include <asm/traps.h> |
27 | #include <arch/chip.h> | 29 | #include <arch/chip.h> |
28 | 30 | ||
diff --git a/arch/tile/kernel/signal.c b/arch/tile/kernel/signal.c index 87299a6cfec8..f2bf557bb005 100644 --- a/arch/tile/kernel/signal.c +++ b/arch/tile/kernel/signal.c | |||
@@ -14,6 +14,8 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/sched/debug.h> | ||
18 | #include <linux/sched/task_stack.h> | ||
17 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
18 | #include <linux/smp.h> | 20 | #include <linux/smp.h> |
19 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
diff --git a/arch/tile/kernel/smpboot.c b/arch/tile/kernel/smpboot.c index 53ce940a5016..869c22e57561 100644 --- a/arch/tile/kernel/smpboot.c +++ b/arch/tile/kernel/smpboot.c | |||
@@ -16,7 +16,8 @@ | |||
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched/mm.h> |
20 | #include <linux/sched/task.h> | ||
20 | #include <linux/kernel_stat.h> | 21 | #include <linux/kernel_stat.h> |
21 | #include <linux/bootmem.h> | 22 | #include <linux/bootmem.h> |
22 | #include <linux/notifier.h> | 23 | #include <linux/notifier.h> |
diff --git a/arch/tile/kernel/stack.c b/arch/tile/kernel/stack.c index 22bbbd3ff4a3..94ecbc6676e5 100644 --- a/arch/tile/kernel/stack.c +++ b/arch/tile/kernel/stack.c | |||
@@ -13,6 +13,8 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
16 | #include <linux/sched/debug.h> | ||
17 | #include <linux/sched/task_stack.h> | ||
16 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
17 | #include <linux/kprobes.h> | 19 | #include <linux/kprobes.h> |
18 | #include <linux/module.h> | 20 | #include <linux/module.h> |
diff --git a/arch/tile/kernel/time.c b/arch/tile/kernel/time.c index c9357012b1c8..5bd4e88c7c60 100644 --- a/arch/tile/kernel/time.c +++ b/arch/tile/kernel/time.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/clockchips.h> | 20 | #include <linux/clockchips.h> |
21 | #include <linux/hardirq.h> | 21 | #include <linux/hardirq.h> |
22 | #include <linux/sched.h> | 22 | #include <linux/sched.h> |
23 | #include <linux/sched/clock.h> | ||
23 | #include <linux/smp.h> | 24 | #include <linux/smp.h> |
24 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
25 | #include <linux/module.h> | 26 | #include <linux/module.h> |
diff --git a/arch/tile/kernel/traps.c b/arch/tile/kernel/traps.c index 39f427bb0de2..54804866f238 100644 --- a/arch/tile/kernel/traps.c +++ b/arch/tile/kernel/traps.c | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
16 | #include <linux/sched/debug.h> | ||
16 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
17 | #include <linux/kprobes.h> | 18 | #include <linux/kprobes.h> |
18 | #include <linux/kdebug.h> | 19 | #include <linux/kdebug.h> |
diff --git a/arch/tile/kernel/unaligned.c b/arch/tile/kernel/unaligned.c index f229e979584e..8149c38f67b6 100644 --- a/arch/tile/kernel/unaligned.c +++ b/arch/tile/kernel/unaligned.c | |||
@@ -17,6 +17,8 @@ | |||
17 | #include <linux/smp.h> | 17 | #include <linux/smp.h> |
18 | #include <linux/ptrace.h> | 18 | #include <linux/ptrace.h> |
19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | #include <linux/sched/debug.h> | ||
21 | #include <linux/sched/task.h> | ||
20 | #include <linux/thread_info.h> | 22 | #include <linux/thread_info.h> |
21 | #include <linux/uaccess.h> | 23 | #include <linux/uaccess.h> |
22 | #include <linux/mman.h> | 24 | #include <linux/mman.h> |
diff --git a/arch/tile/mm/fault.c b/arch/tile/mm/fault.c index 709f8e9ba3e9..f58fa06a2214 100644 --- a/arch/tile/mm/fault.c +++ b/arch/tile/mm/fault.c | |||
@@ -16,6 +16,9 @@ | |||
16 | 16 | ||
17 | #include <linux/signal.h> | 17 | #include <linux/signal.h> |
18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
19 | #include <linux/sched/debug.h> | ||
20 | #include <linux/sched/task.h> | ||
21 | #include <linux/sched/task_stack.h> | ||
19 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
20 | #include <linux/errno.h> | 23 | #include <linux/errno.h> |
21 | #include <linux/string.h> | 24 | #include <linux/string.h> |
diff --git a/arch/tile/mm/hugetlbpage.c b/arch/tile/mm/hugetlbpage.c index 77ceaa343fce..cb10153b5c9f 100644 --- a/arch/tile/mm/hugetlbpage.c +++ b/arch/tile/mm/hugetlbpage.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/fs.h> | 20 | #include <linux/fs.h> |
21 | #include <linux/mm.h> | 21 | #include <linux/mm.h> |
22 | #include <linux/sched/mm.h> | ||
22 | #include <linux/hugetlb.h> | 23 | #include <linux/hugetlb.h> |
23 | #include <linux/pagemap.h> | 24 | #include <linux/pagemap.h> |
24 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
diff --git a/arch/tile/mm/mmap.c b/arch/tile/mm/mmap.c index ef61c597898b..8ab28167c44b 100644 --- a/arch/tile/mm/mmap.c +++ b/arch/tile/mm/mmap.c | |||
@@ -17,7 +17,8 @@ | |||
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | #include <linux/random.h> | 18 | #include <linux/random.h> |
19 | #include <linux/limits.h> | 19 | #include <linux/limits.h> |
20 | #include <linux/sched.h> | 20 | #include <linux/sched/signal.h> |
21 | #include <linux/sched/mm.h> | ||
21 | #include <linux/mman.h> | 22 | #include <linux/mman.h> |
22 | #include <linux/compat.h> | 23 | #include <linux/compat.h> |
23 | 24 | ||
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c index 62087028a9ce..366e57f5e8d6 100644 --- a/arch/um/drivers/line.c +++ b/arch/um/drivers/line.c | |||
@@ -5,8 +5,9 @@ | |||
5 | 5 | ||
6 | #include <linux/irqreturn.h> | 6 | #include <linux/irqreturn.h> |
7 | #include <linux/kd.h> | 7 | #include <linux/kd.h> |
8 | #include <linux/sched.h> | 8 | #include <linux/sched/signal.h> |
9 | #include <linux/slab.h> | 9 | #include <linux/slab.h> |
10 | |||
10 | #include "chan.h" | 11 | #include "chan.h" |
11 | #include <irq_kern.h> | 12 | #include <irq_kern.h> |
12 | #include <irq_user.h> | 13 | #include <irq_user.h> |
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c index 8a4c72af3bc0..af326fb6510d 100644 --- a/arch/um/drivers/mconsole_kern.c +++ b/arch/um/drivers/mconsole_kern.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/notifier.h> | 14 | #include <linux/notifier.h> |
15 | #include <linux/reboot.h> | 15 | #include <linux/reboot.h> |
16 | #include <linux/sched/debug.h> | ||
16 | #include <linux/proc_fs.h> | 17 | #include <linux/proc_fs.h> |
17 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
18 | #include <linux/syscalls.h> | 19 | #include <linux/syscalls.h> |
diff --git a/arch/um/drivers/random.c b/arch/um/drivers/random.c index 57f03050c850..37c51a6be690 100644 --- a/arch/um/drivers/random.c +++ b/arch/um/drivers/random.c | |||
@@ -6,7 +6,7 @@ | |||
6 | * This software may be used and distributed according to the terms | 6 | * This software may be used and distributed according to the terms |
7 | * of the GNU General Public License, incorporated herein by reference. | 7 | * of the GNU General Public License, incorporated herein by reference. |
8 | */ | 8 | */ |
9 | #include <linux/sched.h> | 9 | #include <linux/sched/signal.h> |
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/fs.h> | 11 | #include <linux/fs.h> |
12 | #include <linux/interrupt.h> | 12 | #include <linux/interrupt.h> |
diff --git a/arch/um/include/asm/mmu_context.h b/arch/um/include/asm/mmu_context.h index 1a60e1328e2f..94ac2739918c 100644 --- a/arch/um/include/asm/mmu_context.h +++ b/arch/um/include/asm/mmu_context.h | |||
@@ -7,6 +7,8 @@ | |||
7 | #define __UM_MMU_CONTEXT_H | 7 | #define __UM_MMU_CONTEXT_H |
8 | 8 | ||
9 | #include <linux/sched.h> | 9 | #include <linux/sched.h> |
10 | #include <linux/mm_types.h> | ||
11 | |||
10 | #include <asm/mmu.h> | 12 | #include <asm/mmu.h> |
11 | 13 | ||
12 | extern void uml_setup_stubs(struct mm_struct *mm); | 14 | extern void uml_setup_stubs(struct mm_struct *mm); |
diff --git a/arch/um/kernel/exec.c b/arch/um/kernel/exec.c index 770ec07b6a6a..a43d42bf0a86 100644 --- a/arch/um/kernel/exec.c +++ b/arch/um/kernel/exec.c | |||
@@ -7,7 +7,9 @@ | |||
7 | #include <linux/module.h> | 7 | #include <linux/module.h> |
8 | #include <linux/fs.h> | 8 | #include <linux/fs.h> |
9 | #include <linux/ptrace.h> | 9 | #include <linux/ptrace.h> |
10 | #include <linux/sched.h> | 10 | #include <linux/sched/mm.h> |
11 | #include <linux/sched/task.h> | ||
12 | #include <linux/sched/task_stack.h> | ||
11 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
12 | #include <asm/current.h> | 14 | #include <asm/current.h> |
13 | #include <asm/processor.h> | 15 | #include <asm/processor.h> |
diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c index 078630d6448c..a9bd61820042 100644 --- a/arch/um/kernel/process.c +++ b/arch/um/kernel/process.c | |||
@@ -17,6 +17,9 @@ | |||
17 | #include <linux/random.h> | 17 | #include <linux/random.h> |
18 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/sched/debug.h> | ||
21 | #include <linux/sched/task.h> | ||
22 | #include <linux/sched/task_stack.h> | ||
20 | #include <linux/seq_file.h> | 23 | #include <linux/seq_file.h> |
21 | #include <linux/tick.h> | 24 | #include <linux/tick.h> |
22 | #include <linux/threads.h> | 25 | #include <linux/threads.h> |
diff --git a/arch/um/kernel/reboot.c b/arch/um/kernel/reboot.c index b60a9f8cda75..71f3e9217cf2 100644 --- a/arch/um/kernel/reboot.c +++ b/arch/um/kernel/reboot.c | |||
@@ -3,7 +3,9 @@ | |||
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <linux/sched.h> | 6 | #include <linux/sched/signal.h> |
7 | #include <linux/sched/task.h> | ||
8 | #include <linux/sched/mm.h> | ||
7 | #include <linux/spinlock.h> | 9 | #include <linux/spinlock.h> |
8 | #include <linux/slab.h> | 10 | #include <linux/slab.h> |
9 | #include <linux/oom.h> | 11 | #include <linux/oom.h> |
diff --git a/arch/um/kernel/skas/mmu.c b/arch/um/kernel/skas/mmu.c index 3943e9d7d13d..7a1f2a936fd1 100644 --- a/arch/um/kernel/skas/mmu.c +++ b/arch/um/kernel/skas/mmu.c | |||
@@ -5,8 +5,9 @@ | |||
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/mm.h> | 7 | #include <linux/mm.h> |
8 | #include <linux/sched.h> | 8 | #include <linux/sched/signal.h> |
9 | #include <linux/slab.h> | 9 | #include <linux/slab.h> |
10 | |||
10 | #include <asm/pgalloc.h> | 11 | #include <asm/pgalloc.h> |
11 | #include <asm/pgtable.h> | 12 | #include <asm/pgtable.h> |
12 | #include <asm/sections.h> | 13 | #include <asm/sections.h> |
diff --git a/arch/um/kernel/skas/process.c b/arch/um/kernel/skas/process.c index 527fa5881915..d4dbf08722d6 100644 --- a/arch/um/kernel/skas/process.c +++ b/arch/um/kernel/skas/process.c | |||
@@ -4,7 +4,10 @@ | |||
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <linux/init.h> | 6 | #include <linux/init.h> |
7 | #include <linux/sched.h> | 7 | #include <linux/sched/mm.h> |
8 | #include <linux/sched/task_stack.h> | ||
9 | #include <linux/sched/task.h> | ||
10 | |||
8 | #include <as-layout.h> | 11 | #include <as-layout.h> |
9 | #include <kern.h> | 12 | #include <kern.h> |
10 | #include <os.h> | 13 | #include <os.h> |
diff --git a/arch/um/kernel/sysrq.c b/arch/um/kernel/sysrq.c index aa1b56f5ac68..a76295f7ede9 100644 --- a/arch/um/kernel/sysrq.c +++ b/arch/um/kernel/sysrq.c | |||
@@ -11,6 +11,9 @@ | |||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/sched/debug.h> | ||
15 | #include <linux/sched/task_stack.h> | ||
16 | |||
14 | #include <asm/sysrq.h> | 17 | #include <asm/sysrq.h> |
15 | #include <asm/stacktrace.h> | 18 | #include <asm/stacktrace.h> |
16 | #include <os.h> | 19 | #include <os.h> |
diff --git a/arch/um/kernel/tlb.c b/arch/um/kernel/tlb.c index 3777b82759bd..37508b190106 100644 --- a/arch/um/kernel/tlb.c +++ b/arch/um/kernel/tlb.c | |||
@@ -5,7 +5,8 @@ | |||
5 | 5 | ||
6 | #include <linux/mm.h> | 6 | #include <linux/mm.h> |
7 | #include <linux/module.h> | 7 | #include <linux/module.h> |
8 | #include <linux/sched.h> | 8 | #include <linux/sched/signal.h> |
9 | |||
9 | #include <asm/pgtable.h> | 10 | #include <asm/pgtable.h> |
10 | #include <asm/tlbflush.h> | 11 | #include <asm/tlbflush.h> |
11 | #include <as-layout.h> | 12 | #include <as-layout.h> |
diff --git a/arch/um/kernel/trap.c b/arch/um/kernel/trap.c index ad8f206ab5e8..59158871b9fc 100644 --- a/arch/um/kernel/trap.c +++ b/arch/um/kernel/trap.c | |||
@@ -4,10 +4,11 @@ | |||
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <linux/mm.h> | 6 | #include <linux/mm.h> |
7 | #include <linux/sched.h> | 7 | #include <linux/sched/signal.h> |
8 | #include <linux/hardirq.h> | 8 | #include <linux/hardirq.h> |
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/uaccess.h> | 10 | #include <linux/uaccess.h> |
11 | #include <linux/sched/debug.h> | ||
11 | #include <asm/current.h> | 12 | #include <asm/current.h> |
12 | #include <asm/pgtable.h> | 13 | #include <asm/pgtable.h> |
13 | #include <asm/tlbflush.h> | 14 | #include <asm/tlbflush.h> |
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c index e8175a8aa22c..4b85acd4020c 100644 --- a/arch/um/kernel/um_arch.c +++ b/arch/um/kernel/um_arch.c | |||
@@ -11,7 +11,9 @@ | |||
11 | #include <linux/string.h> | 11 | #include <linux/string.h> |
12 | #include <linux/utsname.h> | 12 | #include <linux/utsname.h> |
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/sched/task.h> | ||
14 | #include <linux/kmsg_dump.h> | 15 | #include <linux/kmsg_dump.h> |
16 | |||
15 | #include <asm/pgtable.h> | 17 | #include <asm/pgtable.h> |
16 | #include <asm/processor.h> | 18 | #include <asm/processor.h> |
17 | #include <asm/sections.h> | 19 | #include <asm/sections.h> |
diff --git a/arch/unicore32/kernel/fpu-ucf64.c b/arch/unicore32/kernel/fpu-ucf64.c index a53343a90ca2..12c8c9527b8e 100644 --- a/arch/unicore32/kernel/fpu-ucf64.c +++ b/arch/unicore32/kernel/fpu-ucf64.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/signal.h> | 15 | #include <linux/signal.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched/signal.h> |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | 18 | ||
19 | #include <asm/fpu-ucf64.h> | 19 | #include <asm/fpu-ucf64.h> |
diff --git a/arch/unicore32/kernel/process.c b/arch/unicore32/kernel/process.c index d7c6b676b3a5..d22c1dc7e39e 100644 --- a/arch/unicore32/kernel/process.c +++ b/arch/unicore32/kernel/process.c | |||
@@ -13,6 +13,9 @@ | |||
13 | 13 | ||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
16 | #include <linux/sched/debug.h> | ||
17 | #include <linux/sched/task.h> | ||
18 | #include <linux/sched/task_stack.h> | ||
16 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
17 | #include <linux/mm.h> | 20 | #include <linux/mm.h> |
18 | #include <linux/stddef.h> | 21 | #include <linux/stddef.h> |
diff --git a/arch/unicore32/kernel/ptrace.c b/arch/unicore32/kernel/ptrace.c index 9f07c08da050..a102c2b4f358 100644 --- a/arch/unicore32/kernel/ptrace.c +++ b/arch/unicore32/kernel/ptrace.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/ptrace.h> | 15 | #include <linux/ptrace.h> |
16 | #include <linux/signal.h> | 16 | #include <linux/signal.h> |
17 | #include <linux/uaccess.h> | 17 | #include <linux/uaccess.h> |
18 | #include <linux/sched/task_stack.h> | ||
18 | 19 | ||
19 | /* | 20 | /* |
20 | * this routine will get a word off of the processes privileged stack. | 21 | * this routine will get a word off of the processes privileged stack. |
diff --git a/arch/unicore32/kernel/stacktrace.c b/arch/unicore32/kernel/stacktrace.c index b34030bdabe3..9976e767d51c 100644 --- a/arch/unicore32/kernel/stacktrace.c +++ b/arch/unicore32/kernel/stacktrace.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/sched/debug.h> | ||
14 | #include <linux/stacktrace.h> | 15 | #include <linux/stacktrace.h> |
15 | 16 | ||
16 | #include <asm/stacktrace.h> | 17 | #include <asm/stacktrace.h> |
diff --git a/arch/unicore32/kernel/traps.c b/arch/unicore32/kernel/traps.c index c54e32410ead..5f25b39f04d4 100644 --- a/arch/unicore32/kernel/traps.c +++ b/arch/unicore32/kernel/traps.c | |||
@@ -14,6 +14,9 @@ | |||
14 | */ | 14 | */ |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/signal.h> | 16 | #include <linux/signal.h> |
17 | #include <linux/sched/signal.h> | ||
18 | #include <linux/sched/debug.h> | ||
19 | #include <linux/sched/task_stack.h> | ||
17 | #include <linux/spinlock.h> | 20 | #include <linux/spinlock.h> |
18 | #include <linux/personality.h> | 21 | #include <linux/personality.h> |
19 | #include <linux/kallsyms.h> | 22 | #include <linux/kallsyms.h> |
diff --git a/arch/unicore32/mm/alignment.c b/arch/unicore32/mm/alignment.c index 24e836023e6c..3a7f6faa8794 100644 --- a/arch/unicore32/mm/alignment.c +++ b/arch/unicore32/mm/alignment.c | |||
@@ -15,6 +15,7 @@ | |||
15 | */ | 15 | */ |
16 | #include <linux/compiler.h> | 16 | #include <linux/compiler.h> |
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/sched/debug.h> | ||
18 | #include <linux/errno.h> | 19 | #include <linux/errno.h> |
19 | #include <linux/string.h> | 20 | #include <linux/string.h> |
20 | #include <linux/init.h> | 21 | #include <linux/init.h> |
diff --git a/arch/unicore32/mm/fault.c b/arch/unicore32/mm/fault.c index b656d216a8a8..bbefcc46a45e 100644 --- a/arch/unicore32/mm/fault.c +++ b/arch/unicore32/mm/fault.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/kprobes.h> | 17 | #include <linux/kprobes.h> |
18 | #include <linux/uaccess.h> | 18 | #include <linux/uaccess.h> |
19 | #include <linux/page-flags.h> | 19 | #include <linux/page-flags.h> |
20 | #include <linux/sched.h> | 20 | #include <linux/sched/signal.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | 22 | ||
23 | #include <asm/pgtable.h> | 23 | #include <asm/pgtable.h> |
diff --git a/arch/x86/entry/common.c b/arch/x86/entry/common.c index b83c61cfd154..370c42c7f046 100644 --- a/arch/x86/entry/common.c +++ b/arch/x86/entry/common.c | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <linux/sched/task_stack.h> | ||
12 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
13 | #include <linux/smp.h> | 14 | #include <linux/smp.h> |
14 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
diff --git a/arch/x86/entry/vdso/vma.c b/arch/x86/entry/vdso/vma.c index 572cee3fccff..226ca70dc6bd 100644 --- a/arch/x86/entry/vdso/vma.c +++ b/arch/x86/entry/vdso/vma.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/mm.h> | 7 | #include <linux/mm.h> |
8 | #include <linux/err.h> | 8 | #include <linux/err.h> |
9 | #include <linux/sched.h> | 9 | #include <linux/sched.h> |
10 | #include <linux/sched/task_stack.h> | ||
10 | #include <linux/slab.h> | 11 | #include <linux/slab.h> |
11 | #include <linux/init.h> | 12 | #include <linux/init.h> |
12 | #include <linux/random.h> | 13 | #include <linux/random.h> |
diff --git a/arch/x86/entry/vsyscall/vsyscall_64.c b/arch/x86/entry/vsyscall/vsyscall_64.c index 636c4b341f36..ce1d7534fa53 100644 --- a/arch/x86/entry/vsyscall/vsyscall_64.c +++ b/arch/x86/entry/vsyscall/vsyscall_64.c | |||
@@ -27,6 +27,8 @@ | |||
27 | 27 | ||
28 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
29 | #include <linux/timer.h> | 29 | #include <linux/timer.h> |
30 | #include <linux/sched/signal.h> | ||
31 | #include <linux/mm_types.h> | ||
30 | #include <linux/syscalls.h> | 32 | #include <linux/syscalls.h> |
31 | #include <linux/ratelimit.h> | 33 | #include <linux/ratelimit.h> |
32 | 34 | ||
diff --git a/arch/x86/events/amd/ibs.c b/arch/x86/events/amd/ibs.c index 496e60391fac..786fd875de92 100644 --- a/arch/x86/events/amd/ibs.c +++ b/arch/x86/events/amd/ibs.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/pci.h> | 12 | #include <linux/pci.h> |
13 | #include <linux/ptrace.h> | 13 | #include <linux/ptrace.h> |
14 | #include <linux/syscore_ops.h> | 14 | #include <linux/syscore_ops.h> |
15 | #include <linux/sched/clock.h> | ||
15 | 16 | ||
16 | #include <asm/apic.h> | 17 | #include <asm/apic.h> |
17 | 18 | ||
diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c index 1635c0c8df23..349d4d17aa7f 100644 --- a/arch/x86/events/core.c +++ b/arch/x86/events/core.c | |||
@@ -20,7 +20,8 @@ | |||
20 | #include <linux/export.h> | 20 | #include <linux/export.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/kdebug.h> | 22 | #include <linux/kdebug.h> |
23 | #include <linux/sched.h> | 23 | #include <linux/sched/mm.h> |
24 | #include <linux/sched/clock.h> | ||
24 | #include <linux/uaccess.h> | 25 | #include <linux/uaccess.h> |
25 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
26 | #include <linux/cpu.h> | 27 | #include <linux/cpu.h> |
diff --git a/arch/x86/ia32/ia32_aout.c b/arch/x86/ia32/ia32_aout.c index 7c0a711989d2..8d0879f1d42c 100644 --- a/arch/x86/ia32/ia32_aout.c +++ b/arch/x86/ia32/ia32_aout.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
27 | #include <linux/jiffies.h> | 27 | #include <linux/jiffies.h> |
28 | #include <linux/perf_event.h> | 28 | #include <linux/perf_event.h> |
29 | #include <linux/sched/task_stack.h> | ||
29 | 30 | ||
30 | #include <linux/uaccess.h> | 31 | #include <linux/uaccess.h> |
31 | #include <asm/pgalloc.h> | 32 | #include <asm/pgalloc.h> |
diff --git a/arch/x86/ia32/ia32_signal.c b/arch/x86/ia32/ia32_signal.c index 95c0b4ae09b0..724153797209 100644 --- a/arch/x86/ia32/ia32_signal.c +++ b/arch/x86/ia32/ia32_signal.c | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <linux/sched/task_stack.h> | ||
12 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
13 | #include <linux/smp.h> | 14 | #include <linux/smp.h> |
14 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
diff --git a/arch/x86/include/asm/a.out-core.h b/arch/x86/include/asm/a.out-core.h index 7a15588e45d4..7d3ece8bfb61 100644 --- a/arch/x86/include/asm/a.out-core.h +++ b/arch/x86/include/asm/a.out-core.h | |||
@@ -17,6 +17,8 @@ | |||
17 | 17 | ||
18 | #include <linux/user.h> | 18 | #include <linux/user.h> |
19 | #include <linux/elfcore.h> | 19 | #include <linux/elfcore.h> |
20 | #include <linux/mm_types.h> | ||
21 | |||
20 | #include <asm/debugreg.h> | 22 | #include <asm/debugreg.h> |
21 | 23 | ||
22 | /* | 24 | /* |
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index eff8e36aaf72..730ef65e8393 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #define _ASM_X86_APIC_H | 2 | #define _ASM_X86_APIC_H |
3 | 3 | ||
4 | #include <linux/cpumask.h> | 4 | #include <linux/cpumask.h> |
5 | #include <linux/pm.h> | ||
6 | 5 | ||
7 | #include <asm/alternative.h> | 6 | #include <asm/alternative.h> |
8 | #include <asm/cpufeature.h> | 7 | #include <asm/cpufeature.h> |
diff --git a/arch/x86/include/asm/intel_rdt.h b/arch/x86/include/asm/intel_rdt.h index 95ce5c85b009..0d64397cee58 100644 --- a/arch/x86/include/asm/intel_rdt.h +++ b/arch/x86/include/asm/intel_rdt.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #ifdef CONFIG_INTEL_RDT_A | 4 | #ifdef CONFIG_INTEL_RDT_A |
5 | 5 | ||
6 | #include <linux/sched.h> | ||
6 | #include <linux/kernfs.h> | 7 | #include <linux/kernfs.h> |
7 | #include <linux/jump_label.h> | 8 | #include <linux/jump_label.h> |
8 | 9 | ||
diff --git a/arch/x86/include/asm/mpx.h b/arch/x86/include/asm/mpx.h index 0b416d4cf73b..a0d662be4c5b 100644 --- a/arch/x86/include/asm/mpx.h +++ b/arch/x86/include/asm/mpx.h | |||
@@ -2,6 +2,8 @@ | |||
2 | #define _ASM_X86_MPX_H | 2 | #define _ASM_X86_MPX_H |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/mm_types.h> | ||
6 | |||
5 | #include <asm/ptrace.h> | 7 | #include <asm/ptrace.h> |
6 | #include <asm/insn.h> | 8 | #include <asm/insn.h> |
7 | 9 | ||
diff --git a/arch/x86/include/asm/mwait.h b/arch/x86/include/asm/mwait.h index f37f2d8a2989..bda3c27f0da0 100644 --- a/arch/x86/include/asm/mwait.h +++ b/arch/x86/include/asm/mwait.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _ASM_X86_MWAIT_H | 2 | #define _ASM_X86_MWAIT_H |
3 | 3 | ||
4 | #include <linux/sched.h> | 4 | #include <linux/sched.h> |
5 | #include <linux/sched/idle.h> | ||
5 | 6 | ||
6 | #include <asm/cpufeature.h> | 7 | #include <asm/cpufeature.h> |
7 | 8 | ||
diff --git a/arch/x86/kernel/amd_gart_64.c b/arch/x86/kernel/amd_gart_64.c index 82dfe32faaf4..df083efe6ee0 100644 --- a/arch/x86/kernel/amd_gart_64.c +++ b/arch/x86/kernel/amd_gart_64.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/sched/debug.h> | ||
20 | #include <linux/string.h> | 21 | #include <linux/string.h> |
21 | #include <linux/spinlock.h> | 22 | #include <linux/spinlock.h> |
22 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c index 4a7080c84a5a..5a414545e8a3 100644 --- a/arch/x86/kernel/apm_32.c +++ b/arch/x86/kernel/apm_32.c | |||
@@ -218,7 +218,8 @@ | |||
218 | #include <linux/apm_bios.h> | 218 | #include <linux/apm_bios.h> |
219 | #include <linux/init.h> | 219 | #include <linux/init.h> |
220 | #include <linux/time.h> | 220 | #include <linux/time.h> |
221 | #include <linux/sched.h> | 221 | #include <linux/sched/signal.h> |
222 | #include <linux/sched/cputime.h> | ||
222 | #include <linux/pm.h> | 223 | #include <linux/pm.h> |
223 | #include <linux/capability.h> | 224 | #include <linux/capability.h> |
224 | #include <linux/device.h> | 225 | #include <linux/device.h> |
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index 4e95b2e0d95f..35a5d5dca2fa 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c | |||
@@ -5,6 +5,7 @@ | |||
5 | 5 | ||
6 | #include <linux/io.h> | 6 | #include <linux/io.h> |
7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
8 | #include <linux/sched/clock.h> | ||
8 | #include <linux/random.h> | 9 | #include <linux/random.h> |
9 | #include <asm/processor.h> | 10 | #include <asm/processor.h> |
10 | #include <asm/apic.h> | 11 | #include <asm/apic.h> |
diff --git a/arch/x86/kernel/cpu/centaur.c b/arch/x86/kernel/cpu/centaur.c index 2c234a6d94c4..adc0ebd8bed0 100644 --- a/arch/x86/kernel/cpu/centaur.c +++ b/arch/x86/kernel/cpu/centaur.c | |||
@@ -1,5 +1,6 @@ | |||
1 | 1 | ||
2 | #include <linux/sched.h> | 2 | #include <linux/sched.h> |
3 | #include <linux/sched/clock.h> | ||
3 | 4 | ||
4 | #include <asm/cpufeature.h> | 5 | #include <asm/cpufeature.h> |
5 | #include <asm/e820.h> | 6 | #include <asm/e820.h> |
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index c64ca5929cb5..b11b38c3b0bd 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -7,7 +7,9 @@ | |||
7 | #include <linux/string.h> | 7 | #include <linux/string.h> |
8 | #include <linux/ctype.h> | 8 | #include <linux/ctype.h> |
9 | #include <linux/delay.h> | 9 | #include <linux/delay.h> |
10 | #include <linux/sched.h> | 10 | #include <linux/sched/mm.h> |
11 | #include <linux/sched/clock.h> | ||
12 | #include <linux/sched/task.h> | ||
11 | #include <linux/init.h> | 13 | #include <linux/init.h> |
12 | #include <linux/kprobes.h> | 14 | #include <linux/kprobes.h> |
13 | #include <linux/kgdb.h> | 15 | #include <linux/kgdb.h> |
diff --git a/arch/x86/kernel/cpu/cyrix.c b/arch/x86/kernel/cpu/cyrix.c index 47416f959a48..0a3bc19de017 100644 --- a/arch/x86/kernel/cpu/cyrix.c +++ b/arch/x86/kernel/cpu/cyrix.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <asm/tsc.h> | 10 | #include <asm/tsc.h> |
11 | #include <asm/cpufeature.h> | 11 | #include <asm/cpufeature.h> |
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/sched/clock.h> | ||
13 | 14 | ||
14 | #include "cpu.h" | 15 | #include "cpu.h" |
15 | 16 | ||
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index 017ecd3bb553..fe0a615a051b 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/bitops.h> | 4 | #include <linux/bitops.h> |
5 | #include <linux/smp.h> | 5 | #include <linux/smp.h> |
6 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
7 | #include <linux/sched/clock.h> | ||
7 | #include <linux/thread_info.h> | 8 | #include <linux/thread_info.h> |
8 | #include <linux/init.h> | 9 | #include <linux/init.h> |
9 | #include <linux/uaccess.h> | 10 | #include <linux/uaccess.h> |
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c index 0282b0df004a..c55fb2cb2acc 100644 --- a/arch/x86/kernel/cpu/intel_cacheinfo.c +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/cacheinfo.h> | 11 | #include <linux/cacheinfo.h> |
12 | #include <linux/cpu.h> | 12 | #include <linux/cpu.h> |
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/capability.h> | ||
14 | #include <linux/sysfs.h> | 15 | #include <linux/sysfs.h> |
15 | #include <linux/pci.h> | 16 | #include <linux/pci.h> |
16 | 17 | ||
diff --git a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c index 8af04afdfcb9..0bbe0f3a039f 100644 --- a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c +++ b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | |||
@@ -25,7 +25,8 @@ | |||
25 | #include <linux/sysfs.h> | 25 | #include <linux/sysfs.h> |
26 | #include <linux/kernfs.h> | 26 | #include <linux/kernfs.h> |
27 | #include <linux/seq_file.h> | 27 | #include <linux/seq_file.h> |
28 | #include <linux/sched.h> | 28 | #include <linux/sched/signal.h> |
29 | #include <linux/sched/task.h> | ||
29 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
30 | #include <linux/cpu.h> | 31 | #include <linux/cpu.h> |
31 | #include <linux/task_work.h> | 32 | #include <linux/task_work.h> |
diff --git a/arch/x86/kernel/cpu/transmeta.c b/arch/x86/kernel/cpu/transmeta.c index c1ea5b999839..8457b4978668 100644 --- a/arch/x86/kernel/cpu/transmeta.c +++ b/arch/x86/kernel/cpu/transmeta.c | |||
@@ -1,5 +1,6 @@ | |||
1 | #include <linux/kernel.h> | 1 | #include <linux/kernel.h> |
2 | #include <linux/sched.h> | 2 | #include <linux/sched.h> |
3 | #include <linux/sched/clock.h> | ||
3 | #include <linux/mm.h> | 4 | #include <linux/mm.h> |
4 | #include <asm/cpufeature.h> | 5 | #include <asm/cpufeature.h> |
5 | #include <asm/msr.h> | 6 | #include <asm/msr.h> |
diff --git a/arch/x86/kernel/doublefault.c b/arch/x86/kernel/doublefault.c index b2f7207ba86c..f9c324e08d85 100644 --- a/arch/x86/kernel/doublefault.c +++ b/arch/x86/kernel/doublefault.c | |||
@@ -1,5 +1,6 @@ | |||
1 | #include <linux/mm.h> | 1 | #include <linux/mm.h> |
2 | #include <linux/sched.h> | 2 | #include <linux/sched.h> |
3 | #include <linux/sched/debug.h> | ||
3 | #include <linux/init_task.h> | 4 | #include <linux/init_task.h> |
4 | #include <linux/fs.h> | 5 | #include <linux/fs.h> |
5 | 6 | ||
diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c index 0cfd01d2754c..09d4ac0d2661 100644 --- a/arch/x86/kernel/dumpstack.c +++ b/arch/x86/kernel/dumpstack.c | |||
@@ -10,6 +10,8 @@ | |||
10 | #include <linux/kdebug.h> | 10 | #include <linux/kdebug.h> |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/ptrace.h> | 12 | #include <linux/ptrace.h> |
13 | #include <linux/sched/debug.h> | ||
14 | #include <linux/sched/task_stack.h> | ||
13 | #include <linux/ftrace.h> | 15 | #include <linux/ftrace.h> |
14 | #include <linux/kexec.h> | 16 | #include <linux/kexec.h> |
15 | #include <linux/bug.h> | 17 | #include <linux/bug.h> |
diff --git a/arch/x86/kernel/dumpstack_32.c b/arch/x86/kernel/dumpstack_32.c index bb3b5b9a6899..b0b3a3df7c20 100644 --- a/arch/x86/kernel/dumpstack_32.c +++ b/arch/x86/kernel/dumpstack_32.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * Copyright (C) 1991, 1992 Linus Torvalds | 2 | * Copyright (C) 1991, 1992 Linus Torvalds |
3 | * Copyright (C) 2000, 2001, 2002 Andi Kleen, SuSE Labs | 3 | * Copyright (C) 2000, 2001, 2002 Andi Kleen, SuSE Labs |
4 | */ | 4 | */ |
5 | #include <linux/sched/debug.h> | ||
5 | #include <linux/kallsyms.h> | 6 | #include <linux/kallsyms.h> |
6 | #include <linux/kprobes.h> | 7 | #include <linux/kprobes.h> |
7 | #include <linux/uaccess.h> | 8 | #include <linux/uaccess.h> |
diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c index fac189efcc34..a8b117e93b46 100644 --- a/arch/x86/kernel/dumpstack_64.c +++ b/arch/x86/kernel/dumpstack_64.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * Copyright (C) 1991, 1992 Linus Torvalds | 2 | * Copyright (C) 1991, 1992 Linus Torvalds |
3 | * Copyright (C) 2000, 2001, 2002 Andi Kleen, SuSE Labs | 3 | * Copyright (C) 2000, 2001, 2002 Andi Kleen, SuSE Labs |
4 | */ | 4 | */ |
5 | #include <linux/sched/debug.h> | ||
5 | #include <linux/kallsyms.h> | 6 | #include <linux/kallsyms.h> |
6 | #include <linux/kprobes.h> | 7 | #include <linux/kprobes.h> |
7 | #include <linux/uaccess.h> | 8 | #include <linux/uaccess.h> |
diff --git a/arch/x86/kernel/fpu/init.c b/arch/x86/kernel/fpu/init.c index 19bdd1bf8160..c2f8dde3255c 100644 --- a/arch/x86/kernel/fpu/init.c +++ b/arch/x86/kernel/fpu/init.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <asm/cmdline.h> | 7 | #include <asm/cmdline.h> |
8 | 8 | ||
9 | #include <linux/sched.h> | 9 | #include <linux/sched.h> |
10 | #include <linux/sched/task.h> | ||
10 | #include <linux/init.h> | 11 | #include <linux/init.h> |
11 | 12 | ||
12 | /* | 13 | /* |
diff --git a/arch/x86/kernel/fpu/regset.c b/arch/x86/kernel/fpu/regset.c index c114b132d121..b188b16841e3 100644 --- a/arch/x86/kernel/fpu/regset.c +++ b/arch/x86/kernel/fpu/regset.c | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <asm/fpu/signal.h> | 5 | #include <asm/fpu/signal.h> |
6 | #include <asm/fpu/regset.h> | 6 | #include <asm/fpu/regset.h> |
7 | #include <asm/fpu/xstate.h> | 7 | #include <asm/fpu/xstate.h> |
8 | #include <linux/sched/task_stack.h> | ||
8 | 9 | ||
9 | /* | 10 | /* |
10 | * The xstateregs_active() routine is the same as the regset_fpregs_active() routine, | 11 | * The xstateregs_active() routine is the same as the regset_fpregs_active() routine, |
diff --git a/arch/x86/kernel/ioport.c b/arch/x86/kernel/ioport.c index b01bc8517450..ca49bab3e467 100644 --- a/arch/x86/kernel/ioport.c +++ b/arch/x86/kernel/ioport.c | |||
@@ -4,6 +4,7 @@ | |||
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
7 | #include <linux/sched/task_stack.h> | ||
7 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
8 | #include <linux/capability.h> | 9 | #include <linux/capability.h> |
9 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
diff --git a/arch/x86/kernel/irq_64.c b/arch/x86/kernel/irq_64.c index 6b0678a541e2..3be74fbdeff2 100644 --- a/arch/x86/kernel/irq_64.c +++ b/arch/x86/kernel/irq_64.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/ftrace.h> | 15 | #include <linux/ftrace.h> |
16 | #include <linux/uaccess.h> | 16 | #include <linux/uaccess.h> |
17 | #include <linux/smp.h> | 17 | #include <linux/smp.h> |
18 | #include <linux/sched/task_stack.h> | ||
18 | #include <asm/io_apic.h> | 19 | #include <asm/io_apic.h> |
19 | #include <asm/apic.h> | 20 | #include <asm/apic.h> |
20 | 21 | ||
diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c index 520b8dfe1640..6384eb754a58 100644 --- a/arch/x86/kernel/kprobes/core.c +++ b/arch/x86/kernel/kprobes/core.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <linux/slab.h> | 45 | #include <linux/slab.h> |
46 | #include <linux/hardirq.h> | 46 | #include <linux/hardirq.h> |
47 | #include <linux/preempt.h> | 47 | #include <linux/preempt.h> |
48 | #include <linux/sched/debug.h> | ||
48 | #include <linux/extable.h> | 49 | #include <linux/extable.h> |
49 | #include <linux/kdebug.h> | 50 | #include <linux/kdebug.h> |
50 | #include <linux/kallsyms.h> | 51 | #include <linux/kallsyms.h> |
diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c index bae6ea6cfb94..d88967659098 100644 --- a/arch/x86/kernel/kvmclock.c +++ b/arch/x86/kernel/kvmclock.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/hardirq.h> | 25 | #include <linux/hardirq.h> |
26 | #include <linux/memblock.h> | 26 | #include <linux/memblock.h> |
27 | #include <linux/sched.h> | 27 | #include <linux/sched.h> |
28 | #include <linux/sched/clock.h> | ||
28 | 29 | ||
29 | #include <asm/x86_init.h> | 30 | #include <asm/x86_init.h> |
30 | #include <asm/reboot.h> | 31 | #include <asm/reboot.h> |
diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c index bfe4d6c96fbd..f088ea4c66e7 100644 --- a/arch/x86/kernel/nmi.c +++ b/arch/x86/kernel/nmi.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/spinlock.h> | 13 | #include <linux/spinlock.h> |
14 | #include <linux/kprobes.h> | 14 | #include <linux/kprobes.h> |
15 | #include <linux/kdebug.h> | 15 | #include <linux/kdebug.h> |
16 | #include <linux/sched/debug.h> | ||
16 | #include <linux/nmi.h> | 17 | #include <linux/nmi.h> |
17 | #include <linux/debugfs.h> | 18 | #include <linux/debugfs.h> |
18 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
@@ -20,6 +21,7 @@ | |||
20 | #include <linux/ratelimit.h> | 21 | #include <linux/ratelimit.h> |
21 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
22 | #include <linux/export.h> | 23 | #include <linux/export.h> |
24 | #include <linux/sched/clock.h> | ||
23 | 25 | ||
24 | #if defined(CONFIG_EDAC) | 26 | #if defined(CONFIG_EDAC) |
25 | #include <linux/edac.h> | 27 | #include <linux/edac.h> |
diff --git a/arch/x86/kernel/perf_regs.c b/arch/x86/kernel/perf_regs.c index da8cb987b973..587d887f7f17 100644 --- a/arch/x86/kernel/perf_regs.c +++ b/arch/x86/kernel/perf_regs.c | |||
@@ -1,6 +1,7 @@ | |||
1 | #include <linux/errno.h> | 1 | #include <linux/errno.h> |
2 | #include <linux/kernel.h> | 2 | #include <linux/kernel.h> |
3 | #include <linux/sched.h> | 3 | #include <linux/sched.h> |
4 | #include <linux/sched/task_stack.h> | ||
4 | #include <linux/perf_event.h> | 5 | #include <linux/perf_event.h> |
5 | #include <linux/bug.h> | 6 | #include <linux/bug.h> |
6 | #include <linux/stddef.h> | 7 | #include <linux/stddef.h> |
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index 7780efa635b9..56b059486c3b 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
@@ -7,6 +7,10 @@ | |||
7 | #include <linux/prctl.h> | 7 | #include <linux/prctl.h> |
8 | #include <linux/slab.h> | 8 | #include <linux/slab.h> |
9 | #include <linux/sched.h> | 9 | #include <linux/sched.h> |
10 | #include <linux/sched/idle.h> | ||
11 | #include <linux/sched/debug.h> | ||
12 | #include <linux/sched/task.h> | ||
13 | #include <linux/sched/task_stack.h> | ||
10 | #include <linux/init.h> | 14 | #include <linux/init.h> |
11 | #include <linux/export.h> | 15 | #include <linux/export.h> |
12 | #include <linux/pm.h> | 16 | #include <linux/pm.h> |
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index a0ac3e81518a..4c818f8bc135 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c | |||
@@ -12,6 +12,8 @@ | |||
12 | #include <linux/cpu.h> | 12 | #include <linux/cpu.h> |
13 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
15 | #include <linux/sched/task.h> | ||
16 | #include <linux/sched/task_stack.h> | ||
15 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
16 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
17 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index a61e141b6891..d6b784a5520d 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c | |||
@@ -17,6 +17,8 @@ | |||
17 | #include <linux/cpu.h> | 17 | #include <linux/cpu.h> |
18 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/sched/task.h> | ||
21 | #include <linux/sched/task_stack.h> | ||
20 | #include <linux/fs.h> | 22 | #include <linux/fs.h> |
21 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
22 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c index 9cc7d5a330ef..2364b23ea3e5 100644 --- a/arch/x86/kernel/ptrace.c +++ b/arch/x86/kernel/ptrace.c | |||
@@ -6,6 +6,7 @@ | |||
6 | 6 | ||
7 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
8 | #include <linux/sched.h> | 8 | #include <linux/sched.h> |
9 | #include <linux/sched/task_stack.h> | ||
9 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
10 | #include <linux/smp.h> | 11 | #include <linux/smp.h> |
11 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
diff --git a/arch/x86/kernel/pvclock.c b/arch/x86/kernel/pvclock.c index 9e93fe5803b4..5c3f6d6a5078 100644 --- a/arch/x86/kernel/pvclock.c +++ b/arch/x86/kernel/pvclock.c | |||
@@ -21,6 +21,8 @@ | |||
21 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
22 | #include <linux/gfp.h> | 22 | #include <linux/gfp.h> |
23 | #include <linux/bootmem.h> | 23 | #include <linux/bootmem.h> |
24 | #include <linux/nmi.h> | ||
25 | |||
24 | #include <asm/fixmap.h> | 26 | #include <asm/fixmap.h> |
25 | #include <asm/pvclock.h> | 27 | #include <asm/pvclock.h> |
26 | 28 | ||
diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c index 763af1d0de64..396c042e9d0e 100644 --- a/arch/x86/kernel/signal.c +++ b/arch/x86/kernel/signal.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | 10 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
11 | 11 | ||
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/sched/task_stack.h> | ||
13 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
14 | #include <linux/smp.h> | 15 | #include <linux/smp.h> |
15 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index a0d38685f7df..bd1f1ad35284 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -45,6 +45,9 @@ | |||
45 | #include <linux/smp.h> | 45 | #include <linux/smp.h> |
46 | #include <linux/export.h> | 46 | #include <linux/export.h> |
47 | #include <linux/sched.h> | 47 | #include <linux/sched.h> |
48 | #include <linux/sched/topology.h> | ||
49 | #include <linux/sched/hotplug.h> | ||
50 | #include <linux/sched/task_stack.h> | ||
48 | #include <linux/percpu.h> | 51 | #include <linux/percpu.h> |
49 | #include <linux/bootmem.h> | 52 | #include <linux/bootmem.h> |
50 | #include <linux/err.h> | 53 | #include <linux/err.h> |
diff --git a/arch/x86/kernel/stacktrace.c b/arch/x86/kernel/stacktrace.c index 0653788026e2..8e2b79b88e51 100644 --- a/arch/x86/kernel/stacktrace.c +++ b/arch/x86/kernel/stacktrace.c | |||
@@ -4,6 +4,8 @@ | |||
4 | * Copyright (C) 2006-2009 Red Hat, Inc., Ingo Molnar <mingo@redhat.com> | 4 | * Copyright (C) 2006-2009 Red Hat, Inc., Ingo Molnar <mingo@redhat.com> |
5 | */ | 5 | */ |
6 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
7 | #include <linux/sched/debug.h> | ||
8 | #include <linux/sched/task_stack.h> | ||
7 | #include <linux/stacktrace.h> | 9 | #include <linux/stacktrace.h> |
8 | #include <linux/export.h> | 10 | #include <linux/export.h> |
9 | #include <linux/uaccess.h> | 11 | #include <linux/uaccess.h> |
diff --git a/arch/x86/kernel/step.c b/arch/x86/kernel/step.c index a23ce84a3f6c..f07f83b3611b 100644 --- a/arch/x86/kernel/step.c +++ b/arch/x86/kernel/step.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * x86 single-step support code, common to 32-bit and 64-bit. | 2 | * x86 single-step support code, common to 32-bit and 64-bit. |
3 | */ | 3 | */ |
4 | #include <linux/sched.h> | 4 | #include <linux/sched.h> |
5 | #include <linux/sched/task_stack.h> | ||
5 | #include <linux/mm.h> | 6 | #include <linux/mm.h> |
6 | #include <linux/ptrace.h> | 7 | #include <linux/ptrace.h> |
7 | #include <asm/desc.h> | 8 | #include <asm/desc.h> |
diff --git a/arch/x86/kernel/sys_x86_64.c b/arch/x86/kernel/sys_x86_64.c index a55ed63b9f91..50215a4b9347 100644 --- a/arch/x86/kernel/sys_x86_64.c +++ b/arch/x86/kernel/sys_x86_64.c | |||
@@ -1,5 +1,6 @@ | |||
1 | #include <linux/errno.h> | 1 | #include <linux/errno.h> |
2 | #include <linux/sched.h> | 2 | #include <linux/sched.h> |
3 | #include <linux/sched/mm.h> | ||
3 | #include <linux/syscalls.h> | 4 | #include <linux/syscalls.h> |
4 | #include <linux/mm.h> | 5 | #include <linux/mm.h> |
5 | #include <linux/fs.h> | 6 | #include <linux/fs.h> |
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c index 1dc86ee60a03..948443e115c1 100644 --- a/arch/x86/kernel/traps.c +++ b/arch/x86/kernel/traps.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/errno.h> | 29 | #include <linux/errno.h> |
30 | #include <linux/kexec.h> | 30 | #include <linux/kexec.h> |
31 | #include <linux/sched.h> | 31 | #include <linux/sched.h> |
32 | #include <linux/sched/task_stack.h> | ||
32 | #include <linux/timer.h> | 33 | #include <linux/timer.h> |
33 | #include <linux/init.h> | 34 | #include <linux/init.h> |
34 | #include <linux/bug.h> | 35 | #include <linux/bug.h> |
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index 2724dc82f992..46bcda4cb1c2 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c | |||
@@ -2,6 +2,7 @@ | |||
2 | 2 | ||
3 | #include <linux/kernel.h> | 3 | #include <linux/kernel.h> |
4 | #include <linux/sched.h> | 4 | #include <linux/sched.h> |
5 | #include <linux/sched/clock.h> | ||
5 | #include <linux/init.h> | 6 | #include <linux/init.h> |
6 | #include <linux/export.h> | 7 | #include <linux/export.h> |
7 | #include <linux/timer.h> | 8 | #include <linux/timer.h> |
diff --git a/arch/x86/kernel/unwind_frame.c b/arch/x86/kernel/unwind_frame.c index 23d15565d02a..478d15dbaee4 100644 --- a/arch/x86/kernel/unwind_frame.c +++ b/arch/x86/kernel/unwind_frame.c | |||
@@ -1,4 +1,6 @@ | |||
1 | #include <linux/sched.h> | 1 | #include <linux/sched.h> |
2 | #include <linux/sched/task.h> | ||
3 | #include <linux/sched/task_stack.h> | ||
2 | #include <asm/ptrace.h> | 4 | #include <asm/ptrace.h> |
3 | #include <asm/bitops.h> | 5 | #include <asm/bitops.h> |
4 | #include <asm/stacktrace.h> | 6 | #include <asm/stacktrace.h> |
diff --git a/arch/x86/kernel/vm86_32.c b/arch/x86/kernel/vm86_32.c index 0442d98367ae..23ee89ce59a9 100644 --- a/arch/x86/kernel/vm86_32.c +++ b/arch/x86/kernel/vm86_32.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/interrupt.h> | 35 | #include <linux/interrupt.h> |
36 | #include <linux/syscalls.h> | 36 | #include <linux/syscalls.h> |
37 | #include <linux/sched.h> | 37 | #include <linux/sched.h> |
38 | #include <linux/sched/task_stack.h> | ||
38 | #include <linux/kernel.h> | 39 | #include <linux/kernel.h> |
39 | #include <linux/signal.h> | 40 | #include <linux/signal.h> |
40 | #include <linux/string.h> | 41 | #include <linux/string.h> |
diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index 1d155cc56629..efde6cc50875 100644 --- a/arch/x86/kvm/cpuid.c +++ b/arch/x86/kvm/cpuid.c | |||
@@ -16,6 +16,8 @@ | |||
16 | #include <linux/export.h> | 16 | #include <linux/export.h> |
17 | #include <linux/vmalloc.h> | 17 | #include <linux/vmalloc.h> |
18 | #include <linux/uaccess.h> | 18 | #include <linux/uaccess.h> |
19 | #include <linux/sched/stat.h> | ||
20 | |||
19 | #include <asm/processor.h> | 21 | #include <asm/processor.h> |
20 | #include <asm/user.h> | 22 | #include <asm/user.h> |
21 | #include <asm/fpu/xstate.h> | 23 | #include <asm/fpu/xstate.h> |
diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c index f701d4430727..ebae57ac5902 100644 --- a/arch/x86/kvm/hyperv.c +++ b/arch/x86/kvm/hyperv.c | |||
@@ -28,6 +28,8 @@ | |||
28 | 28 | ||
29 | #include <linux/kvm_host.h> | 29 | #include <linux/kvm_host.h> |
30 | #include <linux/highmem.h> | 30 | #include <linux/highmem.h> |
31 | #include <linux/sched/cputime.h> | ||
32 | |||
31 | #include <asm/apicdef.h> | 33 | #include <asm/apicdef.h> |
32 | #include <trace/events/kvm.h> | 34 | #include <trace/events/kvm.h> |
33 | 35 | ||
diff --git a/arch/x86/kvm/irq_comm.c b/arch/x86/kvm/irq_comm.c index b96d3893f121..6825cd36d13b 100644 --- a/arch/x86/kvm/irq_comm.c +++ b/arch/x86/kvm/irq_comm.c | |||
@@ -23,6 +23,8 @@ | |||
23 | #include <linux/kvm_host.h> | 23 | #include <linux/kvm_host.h> |
24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
25 | #include <linux/export.h> | 25 | #include <linux/export.h> |
26 | #include <linux/rculist.h> | ||
27 | |||
26 | #include <trace/events/kvm.h> | 28 | #include <trace/events/kvm.h> |
27 | 29 | ||
28 | #include <asm/msidef.h> | 30 | #include <asm/msidef.h> |
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 1cda35277278..ac7810513d0e 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/compiler.h> | 36 | #include <linux/compiler.h> |
37 | #include <linux/srcu.h> | 37 | #include <linux/srcu.h> |
38 | #include <linux/slab.h> | 38 | #include <linux/slab.h> |
39 | #include <linux/sched/signal.h> | ||
39 | #include <linux/uaccess.h> | 40 | #include <linux/uaccess.h> |
40 | #include <linux/hash.h> | 41 | #include <linux/hash.h> |
41 | #include <linux/kern_levels.h> | 42 | #include <linux/kern_levels.h> |
diff --git a/arch/x86/kvm/page_track.c b/arch/x86/kvm/page_track.c index 4a1c13eaa518..37942e419c32 100644 --- a/arch/x86/kvm/page_track.c +++ b/arch/x86/kvm/page_track.c | |||
@@ -14,6 +14,8 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/kvm_host.h> | 16 | #include <linux/kvm_host.h> |
17 | #include <linux/rculist.h> | ||
18 | |||
17 | #include <asm/kvm_host.h> | 19 | #include <asm/kvm_host.h> |
18 | #include <asm/kvm_page_track.h> | 20 | #include <asm/kvm_page_track.h> |
19 | 21 | ||
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index b2a4b11274b0..1faf620a6fdc 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -54,6 +54,8 @@ | |||
54 | #include <linux/pvclock_gtod.h> | 54 | #include <linux/pvclock_gtod.h> |
55 | #include <linux/kvm_irqfd.h> | 55 | #include <linux/kvm_irqfd.h> |
56 | #include <linux/irqbypass.h> | 56 | #include <linux/irqbypass.h> |
57 | #include <linux/sched/stat.h> | ||
58 | |||
57 | #include <trace/events/kvm.h> | 59 | #include <trace/events/kvm.h> |
58 | 60 | ||
59 | #include <asm/debugreg.h> | 61 | #include <asm/debugreg.h> |
diff --git a/arch/x86/mm/extable.c b/arch/x86/mm/extable.c index 61a7e9ea9aa1..35ea061010a1 100644 --- a/arch/x86/mm/extable.c +++ b/arch/x86/mm/extable.c | |||
@@ -1,5 +1,7 @@ | |||
1 | #include <linux/extable.h> | 1 | #include <linux/extable.h> |
2 | #include <linux/uaccess.h> | 2 | #include <linux/uaccess.h> |
3 | #include <linux/sched/debug.h> | ||
4 | |||
3 | #include <asm/traps.h> | 5 | #include <asm/traps.h> |
4 | #include <asm/kdebug.h> | 6 | #include <asm/kdebug.h> |
5 | 7 | ||
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index e3254ca0eec4..428e31763cb9 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c | |||
@@ -4,6 +4,7 @@ | |||
4 | * Copyright (C) 2008-2009, Red Hat Inc., Ingo Molnar | 4 | * Copyright (C) 2008-2009, Red Hat Inc., Ingo Molnar |
5 | */ | 5 | */ |
6 | #include <linux/sched.h> /* test_thread_flag(), ... */ | 6 | #include <linux/sched.h> /* test_thread_flag(), ... */ |
7 | #include <linux/sched/task_stack.h> /* task_stack_*(), ... */ | ||
7 | #include <linux/kdebug.h> /* oops_begin/end, ... */ | 8 | #include <linux/kdebug.h> /* oops_begin/end, ... */ |
8 | #include <linux/extable.h> /* search_exception_tables */ | 9 | #include <linux/extable.h> /* search_exception_tables */ |
9 | #include <linux/bootmem.h> /* max_low_pfn */ | 10 | #include <linux/bootmem.h> /* max_low_pfn */ |
diff --git a/arch/x86/mm/hugetlbpage.c b/arch/x86/mm/hugetlbpage.c index 2ae8584b44c7..c5066a260803 100644 --- a/arch/x86/mm/hugetlbpage.c +++ b/arch/x86/mm/hugetlbpage.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/init.h> | 7 | #include <linux/init.h> |
8 | #include <linux/fs.h> | 8 | #include <linux/fs.h> |
9 | #include <linux/mm.h> | 9 | #include <linux/mm.h> |
10 | #include <linux/sched/mm.h> | ||
10 | #include <linux/hugetlb.h> | 11 | #include <linux/hugetlb.h> |
11 | #include <linux/pagemap.h> | 12 | #include <linux/pagemap.h> |
12 | #include <linux/err.h> | 13 | #include <linux/err.h> |
diff --git a/arch/x86/mm/kasan_init_64.c b/arch/x86/mm/kasan_init_64.c index 0493c17b8a51..8d63d7a104c3 100644 --- a/arch/x86/mm/kasan_init_64.c +++ b/arch/x86/mm/kasan_init_64.c | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/kdebug.h> | 4 | #include <linux/kdebug.h> |
5 | #include <linux/mm.h> | 5 | #include <linux/mm.h> |
6 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
7 | #include <linux/sched/task.h> | ||
7 | #include <linux/vmalloc.h> | 8 | #include <linux/vmalloc.h> |
8 | 9 | ||
9 | #include <asm/tlbflush.h> | 10 | #include <asm/tlbflush.h> |
diff --git a/arch/x86/mm/mmap.c b/arch/x86/mm/mmap.c index d2dc0438d654..7940166c799b 100644 --- a/arch/x86/mm/mmap.c +++ b/arch/x86/mm/mmap.c | |||
@@ -28,7 +28,8 @@ | |||
28 | #include <linux/mm.h> | 28 | #include <linux/mm.h> |
29 | #include <linux/random.h> | 29 | #include <linux/random.h> |
30 | #include <linux/limits.h> | 30 | #include <linux/limits.h> |
31 | #include <linux/sched.h> | 31 | #include <linux/sched/signal.h> |
32 | #include <linux/sched/mm.h> | ||
32 | #include <asm/elf.h> | 33 | #include <asm/elf.h> |
33 | 34 | ||
34 | struct va_alignment __read_mostly va_align = { | 35 | struct va_alignment __read_mostly va_align = { |
diff --git a/arch/x86/mm/mpx.c b/arch/x86/mm/mpx.c index c98079684bdb..5126dfd52b18 100644 --- a/arch/x86/mm/mpx.c +++ b/arch/x86/mm/mpx.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
9 | #include <linux/slab.h> | 9 | #include <linux/slab.h> |
10 | #include <linux/mm_types.h> | ||
10 | #include <linux/syscalls.h> | 11 | #include <linux/syscalls.h> |
11 | #include <linux/sched/sysctl.h> | 12 | #include <linux/sched/sysctl.h> |
12 | 13 | ||
diff --git a/arch/x86/platform/uv/uv_nmi.c b/arch/x86/platform/uv/uv_nmi.c index 9743d0ccfec6..c34bd8233f7c 100644 --- a/arch/x86/platform/uv/uv_nmi.c +++ b/arch/x86/platform/uv/uv_nmi.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/moduleparam.h> | 27 | #include <linux/moduleparam.h> |
28 | #include <linux/nmi.h> | 28 | #include <linux/nmi.h> |
29 | #include <linux/sched.h> | 29 | #include <linux/sched.h> |
30 | #include <linux/sched/debug.h> | ||
30 | #include <linux/slab.h> | 31 | #include <linux/slab.h> |
31 | #include <linux/clocksource.h> | 32 | #include <linux/clocksource.h> |
32 | 33 | ||
diff --git a/arch/x86/um/syscalls_64.c b/arch/x86/um/syscalls_64.c index e6552275320b..10d907098c26 100644 --- a/arch/x86/um/syscalls_64.c +++ b/arch/x86/um/syscalls_64.c | |||
@@ -6,6 +6,7 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/sched.h> | 8 | #include <linux/sched.h> |
9 | #include <linux/sched/mm.h> | ||
9 | #include <linux/uaccess.h> | 10 | #include <linux/uaccess.h> |
10 | #include <asm/prctl.h> /* XXX This should get the constants from libc */ | 11 | #include <asm/prctl.h> /* XXX This should get the constants from libc */ |
11 | #include <os.h> | 12 | #include <os.h> |
diff --git a/arch/x86/um/sysrq_32.c b/arch/x86/um/sysrq_32.c index 16ee0e450e3e..f2383484840d 100644 --- a/arch/x86/um/sysrq_32.c +++ b/arch/x86/um/sysrq_32.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
7 | #include <linux/smp.h> | 7 | #include <linux/smp.h> |
8 | #include <linux/sched.h> | 8 | #include <linux/sched.h> |
9 | #include <linux/sched/debug.h> | ||
9 | #include <linux/kallsyms.h> | 10 | #include <linux/kallsyms.h> |
10 | #include <asm/ptrace.h> | 11 | #include <asm/ptrace.h> |
11 | #include <asm/sysrq.h> | 12 | #include <asm/sysrq.h> |
diff --git a/arch/x86/um/sysrq_64.c b/arch/x86/um/sysrq_64.c index 38b4e4abd0f8..903ad91b624f 100644 --- a/arch/x86/um/sysrq_64.c +++ b/arch/x86/um/sysrq_64.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
8 | #include <linux/module.h> | 8 | #include <linux/module.h> |
9 | #include <linux/sched.h> | 9 | #include <linux/sched.h> |
10 | #include <linux/sched/debug.h> | ||
10 | #include <linux/utsname.h> | 11 | #include <linux/utsname.h> |
11 | #include <asm/current.h> | 12 | #include <asm/current.h> |
12 | #include <asm/ptrace.h> | 13 | #include <asm/ptrace.h> |
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index f6740b5b1738..37cb5aad71de 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -38,7 +38,7 @@ | |||
38 | * | 38 | * |
39 | * Jeremy Fitzhardinge <jeremy@xensource.com>, XenSource Inc, 2007 | 39 | * Jeremy Fitzhardinge <jeremy@xensource.com>, XenSource Inc, 2007 |
40 | */ | 40 | */ |
41 | #include <linux/sched.h> | 41 | #include <linux/sched/mm.h> |
42 | #include <linux/highmem.h> | 42 | #include <linux/highmem.h> |
43 | #include <linux/debugfs.h> | 43 | #include <linux/debugfs.h> |
44 | #include <linux/bug.h> | 44 | #include <linux/bug.h> |
diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c index 0dee6f59ea82..7ff2f1bfb7ec 100644 --- a/arch/x86/xen/smp.c +++ b/arch/x86/xen/smp.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/smp.h> | 18 | #include <linux/smp.h> |
19 | #include <linux/irq_work.h> | 19 | #include <linux/irq_work.h> |
20 | #include <linux/tick.h> | 20 | #include <linux/tick.h> |
21 | #include <linux/nmi.h> | ||
21 | 22 | ||
22 | #include <asm/paravirt.h> | 23 | #include <asm/paravirt.h> |
23 | #include <asm/desc.h> | 24 | #include <asm/desc.h> |
diff --git a/arch/xtensa/include/asm/mmu_context.h b/arch/xtensa/include/asm/mmu_context.h index 04c8ebdc4517..f7e186dfc4e4 100644 --- a/arch/xtensa/include/asm/mmu_context.h +++ b/arch/xtensa/include/asm/mmu_context.h | |||
@@ -17,6 +17,7 @@ | |||
17 | 17 | ||
18 | #include <linux/stringify.h> | 18 | #include <linux/stringify.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/mm_types.h> | ||
20 | 21 | ||
21 | #include <asm/vectors.h> | 22 | #include <asm/vectors.h> |
22 | 23 | ||
diff --git a/arch/xtensa/kernel/process.c b/arch/xtensa/kernel/process.c index 826d25104846..58f96d1230d4 100644 --- a/arch/xtensa/kernel/process.c +++ b/arch/xtensa/kernel/process.c | |||
@@ -17,6 +17,9 @@ | |||
17 | 17 | ||
18 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/sched/debug.h> | ||
21 | #include <linux/sched/task.h> | ||
22 | #include <linux/sched/task_stack.h> | ||
20 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
21 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
22 | #include <linux/smp.h> | 25 | #include <linux/smp.h> |
diff --git a/arch/xtensa/kernel/ptrace.c b/arch/xtensa/kernel/ptrace.c index 32519b71d914..e0f583fed06a 100644 --- a/arch/xtensa/kernel/ptrace.c +++ b/arch/xtensa/kernel/ptrace.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/perf_event.h> | 20 | #include <linux/perf_event.h> |
21 | #include <linux/ptrace.h> | 21 | #include <linux/ptrace.h> |
22 | #include <linux/sched.h> | 22 | #include <linux/sched.h> |
23 | #include <linux/sched/task_stack.h> | ||
23 | #include <linux/security.h> | 24 | #include <linux/security.h> |
24 | #include <linux/signal.h> | 25 | #include <linux/signal.h> |
25 | #include <linux/smp.h> | 26 | #include <linux/smp.h> |
diff --git a/arch/xtensa/kernel/signal.c b/arch/xtensa/kernel/signal.c index c41294745731..70a131945443 100644 --- a/arch/xtensa/kernel/signal.c +++ b/arch/xtensa/kernel/signal.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/ptrace.h> | 20 | #include <linux/ptrace.h> |
21 | #include <linux/personality.h> | 21 | #include <linux/personality.h> |
22 | #include <linux/tracehook.h> | 22 | #include <linux/tracehook.h> |
23 | #include <linux/sched/task_stack.h> | ||
23 | 24 | ||
24 | #include <asm/ucontext.h> | 25 | #include <asm/ucontext.h> |
25 | #include <linux/uaccess.h> | 26 | #include <linux/uaccess.h> |
diff --git a/arch/xtensa/kernel/smp.c b/arch/xtensa/kernel/smp.c index fcea72019df7..932d64689bac 100644 --- a/arch/xtensa/kernel/smp.c +++ b/arch/xtensa/kernel/smp.c | |||
@@ -21,6 +21,9 @@ | |||
21 | #include <linux/irq.h> | 21 | #include <linux/irq.h> |
22 | #include <linux/kdebug.h> | 22 | #include <linux/kdebug.h> |
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/sched/mm.h> | ||
25 | #include <linux/sched/hotplug.h> | ||
26 | #include <linux/sched/task_stack.h> | ||
24 | #include <linux/reboot.h> | 27 | #include <linux/reboot.h> |
25 | #include <linux/seq_file.h> | 28 | #include <linux/seq_file.h> |
26 | #include <linux/smp.h> | 29 | #include <linux/smp.h> |
diff --git a/arch/xtensa/kernel/syscall.c b/arch/xtensa/kernel/syscall.c index d3fd100dffc9..06937928cb72 100644 --- a/arch/xtensa/kernel/syscall.c +++ b/arch/xtensa/kernel/syscall.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/file.h> | 25 | #include <linux/file.h> |
26 | #include <linux/fs.h> | 26 | #include <linux/fs.h> |
27 | #include <linux/mman.h> | 27 | #include <linux/mman.h> |
28 | #include <linux/sched/mm.h> | ||
28 | #include <linux/shm.h> | 29 | #include <linux/shm.h> |
29 | 30 | ||
30 | typedef void (*syscall_t)(void); | 31 | typedef void (*syscall_t)(void); |
diff --git a/arch/xtensa/kernel/traps.c b/arch/xtensa/kernel/traps.c index 282bf721a4d6..c82c43bff296 100644 --- a/arch/xtensa/kernel/traps.c +++ b/arch/xtensa/kernel/traps.c | |||
@@ -24,7 +24,9 @@ | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/sched.h> | 27 | #include <linux/sched/signal.h> |
28 | #include <linux/sched/debug.h> | ||
29 | #include <linux/sched/task_stack.h> | ||
28 | #include <linux/init.h> | 30 | #include <linux/init.h> |
29 | #include <linux/module.h> | 31 | #include <linux/module.h> |
30 | #include <linux/stringify.h> | 32 | #include <linux/stringify.h> |
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 295e98c2c8cc..bbe7ee00bd3d 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/ioprio.h> | 17 | #include <linux/ioprio.h> |
18 | #include <linux/kdev_t.h> | 18 | #include <linux/kdev_t.h> |
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/sched/signal.h> | ||
20 | #include <linux/err.h> | 21 | #include <linux/err.h> |
21 | #include <linux/blkdev.h> | 22 | #include <linux/blkdev.h> |
22 | #include <linux/backing-dev.h> | 23 | #include <linux/backing-dev.h> |
diff --git a/block/blk-ioc.c b/block/blk-ioc.c index b12f9c87b4c3..6bfa39675337 100644 --- a/block/blk-ioc.c +++ b/block/blk-ioc.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/bio.h> | 7 | #include <linux/bio.h> |
8 | #include <linux/blkdev.h> | 8 | #include <linux/blkdev.h> |
9 | #include <linux/slab.h> | 9 | #include <linux/slab.h> |
10 | #include <linux/sched/task.h> | ||
10 | 11 | ||
11 | #include "blk.h" | 12 | #include "blk.h" |
12 | 13 | ||
diff --git a/block/blk-map.c b/block/blk-map.c index 2f18c2a0be1b..3b5cb863318f 100644 --- a/block/blk-map.c +++ b/block/blk-map.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * Functions related to mapping data to requests | 2 | * Functions related to mapping data to requests |
3 | */ | 3 | */ |
4 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
5 | #include <linux/sched/task_stack.h> | ||
5 | #include <linux/module.h> | 6 | #include <linux/module.h> |
6 | #include <linux/bio.h> | 7 | #include <linux/bio.h> |
7 | #include <linux/blkdev.h> | 8 | #include <linux/blkdev.h> |
diff --git a/block/blk-mq.c b/block/blk-mq.c index 9e6b064e5339..6f35b6fd4799 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c | |||
@@ -20,6 +20,8 @@ | |||
20 | #include <linux/cpu.h> | 20 | #include <linux/cpu.h> |
21 | #include <linux/cache.h> | 21 | #include <linux/cache.h> |
22 | #include <linux/sched/sysctl.h> | 22 | #include <linux/sched/sysctl.h> |
23 | #include <linux/sched/topology.h> | ||
24 | #include <linux/sched/signal.h> | ||
23 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
24 | #include <linux/crash_dump.h> | 26 | #include <linux/crash_dump.h> |
25 | #include <linux/prefetch.h> | 27 | #include <linux/prefetch.h> |
diff --git a/block/blk-softirq.c b/block/blk-softirq.c index 06cf9807f49a..87b7df4851bf 100644 --- a/block/blk-softirq.c +++ b/block/blk-softirq.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/interrupt.h> | 9 | #include <linux/interrupt.h> |
10 | #include <linux/cpu.h> | 10 | #include <linux/cpu.h> |
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <linux/sched/topology.h> | ||
12 | 13 | ||
13 | #include "blk.h" | 14 | #include "blk.h" |
14 | 15 | ||
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 137944777859..440b95ee593c 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -8,6 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/slab.h> | 10 | #include <linux/slab.h> |
11 | #include <linux/sched/clock.h> | ||
11 | #include <linux/blkdev.h> | 12 | #include <linux/blkdev.h> |
12 | #include <linux/elevator.h> | 13 | #include <linux/elevator.h> |
13 | #include <linux/ktime.h> | 14 | #include <linux/ktime.h> |
diff --git a/block/ioprio.c b/block/ioprio.c index 3790669232ff..0c47a00f92a8 100644 --- a/block/ioprio.c +++ b/block/ioprio.c | |||
@@ -23,8 +23,11 @@ | |||
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/export.h> | 24 | #include <linux/export.h> |
25 | #include <linux/ioprio.h> | 25 | #include <linux/ioprio.h> |
26 | #include <linux/cred.h> | ||
26 | #include <linux/blkdev.h> | 27 | #include <linux/blkdev.h> |
27 | #include <linux/capability.h> | 28 | #include <linux/capability.h> |
29 | #include <linux/sched/user.h> | ||
30 | #include <linux/sched/task.h> | ||
28 | #include <linux/syscalls.h> | 31 | #include <linux/syscalls.h> |
29 | #include <linux/security.h> | 32 | #include <linux/security.h> |
30 | #include <linux/pid_namespace.h> | 33 | #include <linux/pid_namespace.h> |
diff --git a/crypto/algboss.c b/crypto/algboss.c index ccb85e1798f2..960d8548171b 100644 --- a/crypto/algboss.c +++ b/crypto/algboss.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/notifier.h> | 20 | #include <linux/notifier.h> |
21 | #include <linux/rtnetlink.h> | 21 | #include <linux/rtnetlink.h> |
22 | #include <linux/sched.h> | 22 | #include <linux/sched/signal.h> |
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | #include <linux/string.h> | 24 | #include <linux/string.h> |
25 | 25 | ||
diff --git a/crypto/algif_aead.c b/crypto/algif_aead.c index 533265f110e0..5a8053758657 100644 --- a/crypto/algif_aead.c +++ b/crypto/algif_aead.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/list.h> | 20 | #include <linux/list.h> |
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/sched/signal.h> | ||
22 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
23 | #include <linux/module.h> | 24 | #include <linux/module.h> |
24 | #include <linux/net.h> | 25 | #include <linux/net.h> |
diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c index a9e79d8eff87..43839b00fe6c 100644 --- a/crypto/algif_skcipher.c +++ b/crypto/algif_skcipher.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/list.h> | 19 | #include <linux/list.h> |
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/sched/signal.h> | ||
21 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
22 | #include <linux/module.h> | 23 | #include <linux/module.h> |
23 | #include <linux/net.h> | 24 | #include <linux/net.h> |
diff --git a/crypto/api.c b/crypto/api.c index b16ce1653284..941cd4c6c7ec 100644 --- a/crypto/api.c +++ b/crypto/api.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <linux/kmod.h> | 21 | #include <linux/kmod.h> |
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/param.h> | 23 | #include <linux/param.h> |
24 | #include <linux/sched.h> | 24 | #include <linux/sched/signal.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/string.h> | 26 | #include <linux/string.h> |
27 | #include "internal.h" | 27 | #include "internal.h" |
diff --git a/crypto/crypto_engine.c b/crypto/crypto_engine.c index f1bf3418d968..727bd5c3569e 100644 --- a/crypto/crypto_engine.c +++ b/crypto/crypto_engine.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
17 | #include <crypto/engine.h> | 17 | #include <crypto/engine.h> |
18 | #include <crypto/internal/hash.h> | 18 | #include <crypto/internal/hash.h> |
19 | #include <uapi/linux/sched/types.h> | ||
19 | #include "internal.h" | 20 | #include "internal.h" |
20 | 21 | ||
21 | #define CRYPTO_ENGINE_MAX_QLEN 10 | 22 | #define CRYPTO_ENGINE_MAX_QLEN 10 |
diff --git a/crypto/mcryptd.c b/crypto/mcryptd.c index c207458d6299..4e6472658852 100644 --- a/crypto/mcryptd.c +++ b/crypto/mcryptd.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/scatterlist.h> | 25 | #include <linux/scatterlist.h> |
26 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
27 | #include <linux/sched/stat.h> | ||
27 | #include <linux/slab.h> | 28 | #include <linux/slab.h> |
28 | #include <linux/hardirq.h> | 29 | #include <linux/hardirq.h> |
29 | 30 | ||
diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c index eb76a4c10dbf..754431031282 100644 --- a/drivers/acpi/acpi_pad.c +++ b/drivers/acpi/acpi_pad.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/types.h> | 21 | #include <linux/types.h> |
22 | #include <linux/kthread.h> | 22 | #include <linux/kthread.h> |
23 | #include <uapi/linux/sched/types.h> | ||
23 | #include <linux/freezer.h> | 24 | #include <linux/freezer.h> |
24 | #include <linux/cpu.h> | 25 | #include <linux/cpu.h> |
25 | #include <linux/tick.h> | 26 | #include <linux/tick.h> |
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index e53bef6cf53c..b192b42a8351 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/pci.h> | 44 | #include <linux/pci.h> |
45 | #include <linux/aer.h> | 45 | #include <linux/aer.h> |
46 | #include <linux/nmi.h> | 46 | #include <linux/nmi.h> |
47 | #include <linux/sched/clock.h> | ||
47 | 48 | ||
48 | #include <acpi/ghes.h> | 49 | #include <acpi/ghes.h> |
49 | #include <acpi/apei.h> | 50 | #include <acpi/apei.h> |
diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 2bbcdc6fdfee..aae4d8d4be36 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c | |||
@@ -31,7 +31,8 @@ | |||
31 | #include <linux/poll.h> | 31 | #include <linux/poll.h> |
32 | #include <linux/debugfs.h> | 32 | #include <linux/debugfs.h> |
33 | #include <linux/rbtree.h> | 33 | #include <linux/rbtree.h> |
34 | #include <linux/sched.h> | 34 | #include <linux/sched/signal.h> |
35 | #include <linux/sched/mm.h> | ||
35 | #include <linux/seq_file.h> | 36 | #include <linux/seq_file.h> |
36 | #include <linux/uaccess.h> | 37 | #include <linux/uaccess.h> |
37 | #include <linux/vmalloc.h> | 38 | #include <linux/vmalloc.h> |
diff --git a/drivers/atm/horizon.c b/drivers/atm/horizon.c index 2bf1ef1c3c78..0f18480b33b5 100644 --- a/drivers/atm/horizon.c +++ b/drivers/atm/horizon.c | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
30 | #include <linux/sched/signal.h> | ||
30 | #include <linux/mm.h> | 31 | #include <linux/mm.h> |
31 | #include <linux/pci.h> | 32 | #include <linux/pci.h> |
32 | #include <linux/errno.h> | 33 | #include <linux/errno.h> |
diff --git a/drivers/base/core.c b/drivers/base/core.c index 3050e6f99403..684bda4d14a1 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/mutex.h> | 26 | #include <linux/mutex.h> |
27 | #include <linux/pm_runtime.h> | 27 | #include <linux/pm_runtime.h> |
28 | #include <linux/netdevice.h> | 28 | #include <linux/netdevice.h> |
29 | #include <linux/sched/signal.h> | ||
29 | #include <linux/sysfs.h> | 30 | #include <linux/sysfs.h> |
30 | 31 | ||
31 | #include "base.h" | 32 | #include "base.h" |
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 249e0304597f..9faee1c893e5 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/pm_wakeirq.h> | 27 | #include <linux/pm_wakeirq.h> |
28 | #include <linux/interrupt.h> | 28 | #include <linux/interrupt.h> |
29 | #include <linux/sched.h> | 29 | #include <linux/sched.h> |
30 | #include <linux/sched/debug.h> | ||
30 | #include <linux/async.h> | 31 | #include <linux/async.h> |
31 | #include <linux/suspend.h> | 32 | #include <linux/suspend.h> |
32 | #include <trace/events/power.h> | 33 | #include <trace/events/power.h> |
diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c index a14fac6a01d3..7bcf80fa9ada 100644 --- a/drivers/base/power/runtime.c +++ b/drivers/base/power/runtime.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * This file is released under the GPLv2. | 7 | * This file is released under the GPLv2. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/sched.h> | 10 | #include <linux/sched/mm.h> |
11 | #include <linux/export.h> | 11 | #include <linux/export.h> |
12 | #include <linux/pm_runtime.h> | 12 | #include <linux/pm_runtime.h> |
13 | #include <linux/pm_wakeirq.h> | 13 | #include <linux/pm_wakeirq.h> |
diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c index f546f8f107b0..136854970489 100644 --- a/drivers/base/power/wakeup.c +++ b/drivers/base/power/wakeup.c | |||
@@ -8,7 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/device.h> | 9 | #include <linux/device.h> |
10 | #include <linux/slab.h> | 10 | #include <linux/slab.h> |
11 | #include <linux/sched.h> | 11 | #include <linux/sched/signal.h> |
12 | #include <linux/capability.h> | 12 | #include <linux/capability.h> |
13 | #include <linux/export.h> | 13 | #include <linux/export.h> |
14 | #include <linux/suspend.h> | 14 | #include <linux/suspend.h> |
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index 4cb8f21ff4ef..724d1c50fc52 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h | |||
@@ -30,7 +30,7 @@ | |||
30 | #include <linux/compiler.h> | 30 | #include <linux/compiler.h> |
31 | #include <linux/types.h> | 31 | #include <linux/types.h> |
32 | #include <linux/list.h> | 32 | #include <linux/list.h> |
33 | #include <linux/sched.h> | 33 | #include <linux/sched/signal.h> |
34 | #include <linux/bitops.h> | 34 | #include <linux/bitops.h> |
35 | #include <linux/slab.h> | 35 | #include <linux/slab.h> |
36 | #include <linux/ratelimit.h> | 36 | #include <linux/ratelimit.h> |
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 37000c6bb7f4..92c60cbd04ee 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c | |||
@@ -52,6 +52,7 @@ | |||
52 | #define __KERNEL_SYSCALLS__ | 52 | #define __KERNEL_SYSCALLS__ |
53 | #include <linux/unistd.h> | 53 | #include <linux/unistd.h> |
54 | #include <linux/vmalloc.h> | 54 | #include <linux/vmalloc.h> |
55 | #include <linux/sched/signal.h> | ||
55 | 56 | ||
56 | #include <linux/drbd_limits.h> | 57 | #include <linux/drbd_limits.h> |
57 | #include "drbd_int.h" | 58 | #include "drbd_int.h" |
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index c7728dd77230..aa6bf9692eff 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c | |||
@@ -36,6 +36,8 @@ | |||
36 | #include <linux/memcontrol.h> | 36 | #include <linux/memcontrol.h> |
37 | #include <linux/mm_inline.h> | 37 | #include <linux/mm_inline.h> |
38 | #include <linux/slab.h> | 38 | #include <linux/slab.h> |
39 | #include <uapi/linux/sched/types.h> | ||
40 | #include <linux/sched/signal.h> | ||
39 | #include <linux/pkt_sched.h> | 41 | #include <linux/pkt_sched.h> |
40 | #define __KERNEL_SYSCALLS__ | 42 | #define __KERNEL_SYSCALLS__ |
41 | #include <linux/unistd.h> | 43 | #include <linux/unistd.h> |
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c index c6755c9a0aea..3bff33f21435 100644 --- a/drivers/block/drbd/drbd_worker.c +++ b/drivers/block/drbd/drbd_worker.c | |||
@@ -25,7 +25,7 @@ | |||
25 | 25 | ||
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/drbd.h> | 27 | #include <linux/drbd.h> |
28 | #include <linux/sched.h> | 28 | #include <linux/sched/signal.h> |
29 | #include <linux/wait.h> | 29 | #include <linux/wait.h> |
30 | #include <linux/mm.h> | 30 | #include <linux/mm.h> |
31 | #include <linux/memcontrol.h> | 31 | #include <linux/memcontrol.h> |
diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c index aabd8e9d3035..61b3ffa4f458 100644 --- a/drivers/block/swim3.c +++ b/drivers/block/swim3.c | |||
@@ -20,7 +20,7 @@ | |||
20 | 20 | ||
21 | #include <linux/stddef.h> | 21 | #include <linux/stddef.h> |
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/sched.h> | 23 | #include <linux/sched/signal.h> |
24 | #include <linux/timer.h> | 24 | #include <linux/timer.h> |
25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | #include <linux/fd.h> | 26 | #include <linux/fd.h> |
diff --git a/drivers/char/applicom.c b/drivers/char/applicom.c index e5c62dcf2c11..e770ad977472 100644 --- a/drivers/char/applicom.c +++ b/drivers/char/applicom.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
26 | #include <linux/sched.h> | 26 | #include <linux/sched/signal.h> |
27 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
28 | #include <linux/errno.h> | 28 | #include <linux/errno.h> |
29 | #include <linux/mutex.h> | 29 | #include <linux/mutex.h> |
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index 20b32bb8c2af..8bdc38d81adf 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/spinlock.h> | 25 | #include <linux/spinlock.h> |
26 | #include <linux/sysctl.h> | 26 | #include <linux/sysctl.h> |
27 | #include <linux/wait.h> | 27 | #include <linux/wait.h> |
28 | #include <linux/sched/signal.h> | ||
28 | #include <linux/bcd.h> | 29 | #include <linux/bcd.h> |
29 | #include <linux/seq_file.h> | 30 | #include <linux/seq_file.h> |
30 | #include <linux/bitops.h> | 31 | #include <linux/bitops.h> |
diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c index 5c654b5d4adf..503a41dfa193 100644 --- a/drivers/char/hw_random/core.c +++ b/drivers/char/hw_random/core.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/hw_random.h> | 17 | #include <linux/hw_random.h> |
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/kthread.h> | 19 | #include <linux/kthread.h> |
20 | #include <linux/sched/signal.h> | ||
20 | #include <linux/miscdevice.h> | 21 | #include <linux/miscdevice.h> |
21 | #include <linux/module.h> | 22 | #include <linux/module.h> |
22 | #include <linux/random.h> | 23 | #include <linux/random.h> |
diff --git a/drivers/char/ipmi/ipmi_watchdog.c b/drivers/char/ipmi/ipmi_watchdog.c index 30b9e83bf1bf..5ca24d9b101b 100644 --- a/drivers/char/ipmi/ipmi_watchdog.c +++ b/drivers/char/ipmi/ipmi_watchdog.c | |||
@@ -53,6 +53,7 @@ | |||
53 | #include <linux/ctype.h> | 53 | #include <linux/ctype.h> |
54 | #include <linux/delay.h> | 54 | #include <linux/delay.h> |
55 | #include <linux/atomic.h> | 55 | #include <linux/atomic.h> |
56 | #include <linux/sched/signal.h> | ||
56 | 57 | ||
57 | #ifdef CONFIG_X86 | 58 | #ifdef CONFIG_X86 |
58 | /* | 59 | /* |
diff --git a/drivers/char/lp.c b/drivers/char/lp.c index 5b6742770656..565e4cf04a02 100644 --- a/drivers/char/lp.c +++ b/drivers/char/lp.c | |||
@@ -117,7 +117,7 @@ | |||
117 | #include <linux/errno.h> | 117 | #include <linux/errno.h> |
118 | #include <linux/kernel.h> | 118 | #include <linux/kernel.h> |
119 | #include <linux/major.h> | 119 | #include <linux/major.h> |
120 | #include <linux/sched.h> | 120 | #include <linux/sched/signal.h> |
121 | #include <linux/slab.h> | 121 | #include <linux/slab.h> |
122 | #include <linux/fcntl.h> | 122 | #include <linux/fcntl.h> |
123 | #include <linux/delay.h> | 123 | #include <linux/delay.h> |
diff --git a/drivers/char/ppdev.c b/drivers/char/ppdev.c index 87885d146dbb..2a558c706581 100644 --- a/drivers/char/ppdev.c +++ b/drivers/char/ppdev.c | |||
@@ -58,7 +58,7 @@ | |||
58 | 58 | ||
59 | #include <linux/module.h> | 59 | #include <linux/module.h> |
60 | #include <linux/init.h> | 60 | #include <linux/init.h> |
61 | #include <linux/sched.h> | 61 | #include <linux/sched/signal.h> |
62 | #include <linux/device.h> | 62 | #include <linux/device.h> |
63 | #include <linux/ioctl.h> | 63 | #include <linux/ioctl.h> |
64 | #include <linux/parport.h> | 64 | #include <linux/parport.h> |
diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c index 35259961cc38..974d48927b07 100644 --- a/drivers/char/rtc.c +++ b/drivers/char/rtc.c | |||
@@ -74,7 +74,7 @@ | |||
74 | #include <linux/proc_fs.h> | 74 | #include <linux/proc_fs.h> |
75 | #include <linux/seq_file.h> | 75 | #include <linux/seq_file.h> |
76 | #include <linux/spinlock.h> | 76 | #include <linux/spinlock.h> |
77 | #include <linux/sched.h> | 77 | #include <linux/sched/signal.h> |
78 | #include <linux/sysctl.h> | 78 | #include <linux/sysctl.h> |
79 | #include <linux/wait.h> | 79 | #include <linux/wait.h> |
80 | #include <linux/bcd.h> | 80 | #include <linux/bcd.h> |
diff --git a/drivers/char/snsc.c b/drivers/char/snsc.c index ec07f0e99732..6aa32679fd58 100644 --- a/drivers/char/snsc.c +++ b/drivers/char/snsc.c | |||
@@ -16,7 +16,7 @@ | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched/signal.h> |
20 | #include <linux/device.h> | 20 | #include <linux/device.h> |
21 | #include <linux/poll.h> | 21 | #include <linux/poll.h> |
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
diff --git a/drivers/char/snsc_event.c b/drivers/char/snsc_event.c index 59bcefd6ec7c..e452673dff66 100644 --- a/drivers/char/snsc_event.c +++ b/drivers/char/snsc_event.c | |||
@@ -16,7 +16,7 @@ | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched/signal.h> |
20 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
21 | #include <asm/byteorder.h> | 21 | #include <asm/byteorder.h> |
22 | #include <asm/sn/sn_sal.h> | 22 | #include <asm/sn/sn_sal.h> |
diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index 93aa1364376a..7a8a4117f123 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/of_address.h> | 24 | #include <linux/of_address.h> |
25 | #include <linux/io.h> | 25 | #include <linux/io.h> |
26 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
27 | #include <linux/sched/clock.h> | ||
27 | #include <linux/sched_clock.h> | 28 | #include <linux/sched_clock.h> |
28 | #include <linux/acpi.h> | 29 | #include <linux/acpi.h> |
29 | 30 | ||
diff --git a/drivers/clocksource/pxa_timer.c b/drivers/clocksource/pxa_timer.c index 9cae38eebec2..1c24de215c14 100644 --- a/drivers/clocksource/pxa_timer.c +++ b/drivers/clocksource/pxa_timer.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/clockchips.h> | 19 | #include <linux/clockchips.h> |
20 | #include <linux/of_address.h> | 20 | #include <linux/of_address.h> |
21 | #include <linux/of_irq.h> | 21 | #include <linux/of_irq.h> |
22 | #include <linux/sched/clock.h> | ||
22 | #include <linux/sched_clock.h> | 23 | #include <linux/sched_clock.h> |
23 | 24 | ||
24 | #include <clocksource/pxa.h> | 25 | #include <clocksource/pxa.h> |
diff --git a/drivers/clocksource/timer-digicolor.c b/drivers/clocksource/timer-digicolor.c index 10318cc99c0e..e9f50d289362 100644 --- a/drivers/clocksource/timer-digicolor.c +++ b/drivers/clocksource/timer-digicolor.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/interrupt.h> | 31 | #include <linux/interrupt.h> |
32 | #include <linux/irq.h> | 32 | #include <linux/irq.h> |
33 | #include <linux/irqreturn.h> | 33 | #include <linux/irqreturn.h> |
34 | #include <linux/sched/clock.h> | ||
34 | #include <linux/sched_clock.h> | 35 | #include <linux/sched_clock.h> |
35 | #include <linux/of.h> | 36 | #include <linux/of.h> |
36 | #include <linux/of_address.h> | 37 | #include <linux/of_address.h> |
diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c index 631bd2c86c5e..47e24b5384b3 100644 --- a/drivers/cpufreq/cpufreq_governor.c +++ b/drivers/cpufreq/cpufreq_governor.c | |||
@@ -18,7 +18,6 @@ | |||
18 | 18 | ||
19 | #include <linux/export.h> | 19 | #include <linux/export.h> |
20 | #include <linux/kernel_stat.h> | 20 | #include <linux/kernel_stat.h> |
21 | #include <linux/sched.h> | ||
22 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
23 | 22 | ||
24 | #include "cpufreq_governor.h" | 23 | #include "cpufreq_governor.h" |
diff --git a/drivers/cpufreq/cpufreq_governor.h b/drivers/cpufreq/cpufreq_governor.h index f5717ca070cc..0236ec2cd654 100644 --- a/drivers/cpufreq/cpufreq_governor.h +++ b/drivers/cpufreq/cpufreq_governor.h | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/atomic.h> | 20 | #include <linux/atomic.h> |
21 | #include <linux/irq_work.h> | 21 | #include <linux/irq_work.h> |
22 | #include <linux/cpufreq.h> | 22 | #include <linux/cpufreq.h> |
23 | #include <linux/sched/cpufreq.h> | ||
23 | #include <linux/kernel_stat.h> | 24 | #include <linux/kernel_stat.h> |
24 | #include <linux/module.h> | 25 | #include <linux/module.h> |
25 | #include <linux/mutex.h> | 26 | #include <linux/mutex.h> |
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c index 4a017e895296..3937acf7e026 100644 --- a/drivers/cpufreq/cpufreq_ondemand.c +++ b/drivers/cpufreq/cpufreq_ondemand.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/percpu-defs.h> | 16 | #include <linux/percpu-defs.h> |
17 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
18 | #include <linux/tick.h> | 18 | #include <linux/tick.h> |
19 | #include <linux/sched/cpufreq.h> | ||
19 | 20 | ||
20 | #include "cpufreq_ondemand.h" | 21 | #include "cpufreq_ondemand.h" |
21 | 22 | ||
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 108826d9c40f..b1fbaa30ae04 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/hrtimer.h> | 19 | #include <linux/hrtimer.h> |
20 | #include <linux/tick.h> | 20 | #include <linux/tick.h> |
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | #include <linux/sched.h> | 22 | #include <linux/sched/cpufreq.h> |
23 | #include <linux/list.h> | 23 | #include <linux/list.h> |
24 | #include <linux/cpu.h> | 24 | #include <linux/cpu.h> |
25 | #include <linux/cpufreq.h> | 25 | #include <linux/cpufreq.h> |
diff --git a/drivers/cpufreq/sparc-us2e-cpufreq.c b/drivers/cpufreq/sparc-us2e-cpufreq.c index b73feeb666f9..35ddb6da93aa 100644 --- a/drivers/cpufreq/sparc-us2e-cpufreq.c +++ b/drivers/cpufreq/sparc-us2e-cpufreq.c | |||
@@ -234,7 +234,7 @@ static unsigned int us2e_freq_get(unsigned int cpu) | |||
234 | cpumask_t cpus_allowed; | 234 | cpumask_t cpus_allowed; |
235 | unsigned long clock_tick, estar; | 235 | unsigned long clock_tick, estar; |
236 | 236 | ||
237 | cpumask_copy(&cpus_allowed, tsk_cpus_allowed(current)); | 237 | cpumask_copy(&cpus_allowed, ¤t->cpus_allowed); |
238 | set_cpus_allowed_ptr(current, cpumask_of(cpu)); | 238 | set_cpus_allowed_ptr(current, cpumask_of(cpu)); |
239 | 239 | ||
240 | clock_tick = sparc64_get_clock_tick(cpu) / 1000; | 240 | clock_tick = sparc64_get_clock_tick(cpu) / 1000; |
@@ -252,7 +252,7 @@ static int us2e_freq_target(struct cpufreq_policy *policy, unsigned int index) | |||
252 | unsigned long clock_tick, divisor, old_divisor, estar; | 252 | unsigned long clock_tick, divisor, old_divisor, estar; |
253 | cpumask_t cpus_allowed; | 253 | cpumask_t cpus_allowed; |
254 | 254 | ||
255 | cpumask_copy(&cpus_allowed, tsk_cpus_allowed(current)); | 255 | cpumask_copy(&cpus_allowed, ¤t->cpus_allowed); |
256 | set_cpus_allowed_ptr(current, cpumask_of(cpu)); | 256 | set_cpus_allowed_ptr(current, cpumask_of(cpu)); |
257 | 257 | ||
258 | new_freq = clock_tick = sparc64_get_clock_tick(cpu) / 1000; | 258 | new_freq = clock_tick = sparc64_get_clock_tick(cpu) / 1000; |
diff --git a/drivers/cpufreq/sparc-us3-cpufreq.c b/drivers/cpufreq/sparc-us3-cpufreq.c index 9bb42ba50efa..a8d86a449ca1 100644 --- a/drivers/cpufreq/sparc-us3-cpufreq.c +++ b/drivers/cpufreq/sparc-us3-cpufreq.c | |||
@@ -82,7 +82,7 @@ static unsigned int us3_freq_get(unsigned int cpu) | |||
82 | unsigned long reg; | 82 | unsigned long reg; |
83 | unsigned int ret; | 83 | unsigned int ret; |
84 | 84 | ||
85 | cpumask_copy(&cpus_allowed, tsk_cpus_allowed(current)); | 85 | cpumask_copy(&cpus_allowed, ¤t->cpus_allowed); |
86 | set_cpus_allowed_ptr(current, cpumask_of(cpu)); | 86 | set_cpus_allowed_ptr(current, cpumask_of(cpu)); |
87 | 87 | ||
88 | reg = read_safari_cfg(); | 88 | reg = read_safari_cfg(); |
@@ -99,7 +99,7 @@ static int us3_freq_target(struct cpufreq_policy *policy, unsigned int index) | |||
99 | unsigned long new_bits, new_freq, reg; | 99 | unsigned long new_bits, new_freq, reg; |
100 | cpumask_t cpus_allowed; | 100 | cpumask_t cpus_allowed; |
101 | 101 | ||
102 | cpumask_copy(&cpus_allowed, tsk_cpus_allowed(current)); | 102 | cpumask_copy(&cpus_allowed, ¤t->cpus_allowed); |
103 | set_cpus_allowed_ptr(current, cpumask_of(cpu)); | 103 | set_cpus_allowed_ptr(current, cpumask_of(cpu)); |
104 | 104 | ||
105 | new_freq = sparc64_get_clock_tick(cpu) / 1000; | 105 | new_freq = sparc64_get_clock_tick(cpu) / 1000; |
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index 62810ff3b00f..548b90be7685 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/mutex.h> | 13 | #include <linux/mutex.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
15 | #include <linux/sched/clock.h> | ||
15 | #include <linux/notifier.h> | 16 | #include <linux/notifier.h> |
16 | #include <linux/pm_qos.h> | 17 | #include <linux/pm_qos.h> |
17 | #include <linux/cpu.h> | 18 | #include <linux/cpu.h> |
diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c index ab264d393233..e53fb861beb0 100644 --- a/drivers/cpuidle/driver.c +++ b/drivers/cpuidle/driver.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/mutex.h> | 11 | #include <linux/mutex.h> |
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/sched/idle.h> | ||
14 | #include <linux/cpuidle.h> | 15 | #include <linux/cpuidle.h> |
15 | #include <linux/cpumask.h> | 16 | #include <linux/cpumask.h> |
16 | #include <linux/tick.h> | 17 | #include <linux/tick.h> |
diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c index 6d6f46e79d94..b2330fd69e34 100644 --- a/drivers/cpuidle/governors/menu.c +++ b/drivers/cpuidle/governors/menu.c | |||
@@ -18,6 +18,8 @@ | |||
18 | #include <linux/hrtimer.h> | 18 | #include <linux/hrtimer.h> |
19 | #include <linux/tick.h> | 19 | #include <linux/tick.h> |
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/sched/loadavg.h> | ||
22 | #include <linux/sched/stat.h> | ||
21 | #include <linux/math64.h> | 23 | #include <linux/math64.h> |
22 | #include <linux/cpu.h> | 24 | #include <linux/cpu.h> |
23 | 25 | ||
diff --git a/drivers/dax/dax.c b/drivers/dax/dax.c index b75c77254fdb..8d9829ff2a78 100644 --- a/drivers/dax/dax.c +++ b/drivers/dax/dax.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/pagemap.h> | 13 | #include <linux/pagemap.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/device.h> | 15 | #include <linux/device.h> |
16 | #include <linux/magic.h> | ||
16 | #include <linux/mount.h> | 17 | #include <linux/mount.h> |
17 | #include <linux/pfn_t.h> | 18 | #include <linux/pfn_t.h> |
18 | #include <linux/hash.h> | 19 | #include <linux/hash.h> |
diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c index d1f1f456f5c4..d195d617076d 100644 --- a/drivers/dma-buf/dma-fence.c +++ b/drivers/dma-buf/dma-fence.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/export.h> | 22 | #include <linux/export.h> |
23 | #include <linux/atomic.h> | 23 | #include <linux/atomic.h> |
24 | #include <linux/dma-fence.h> | 24 | #include <linux/dma-fence.h> |
25 | #include <linux/sched/signal.h> | ||
25 | 26 | ||
26 | #define CREATE_TRACE_POINTS | 27 | #define CREATE_TRACE_POINTS |
27 | #include <trace/events/dma_fence.h> | 28 | #include <trace/events/dma_fence.h> |
diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c index c9297605058c..54d581d407aa 100644 --- a/drivers/dma/dmatest.c +++ b/drivers/dma/dmatest.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/freezer.h> | 16 | #include <linux/freezer.h> |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/kthread.h> | 18 | #include <linux/kthread.h> |
19 | #include <linux/sched/task.h> | ||
19 | #include <linux/module.h> | 20 | #include <linux/module.h> |
20 | #include <linux/moduleparam.h> | 21 | #include <linux/moduleparam.h> |
21 | #include <linux/random.h> | 22 | #include <linux/random.h> |
diff --git a/drivers/firmware/psci_checker.c b/drivers/firmware/psci_checker.c index 29d58feaf675..6523ce962865 100644 --- a/drivers/firmware/psci_checker.c +++ b/drivers/firmware/psci_checker.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/cpu_pm.h> | 20 | #include <linux/cpu_pm.h> |
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/kthread.h> | 22 | #include <linux/kthread.h> |
23 | #include <uapi/linux/sched/types.h> | ||
23 | #include <linux/module.h> | 24 | #include <linux/module.h> |
24 | #include <linux/preempt.h> | 25 | #include <linux/preempt.h> |
25 | #include <linux/psci.h> | 26 | #include <linux/psci.h> |
diff --git a/drivers/firmware/tegra/bpmp.c b/drivers/firmware/tegra/bpmp.c index 4ff02d310868..84e4c9a58a0c 100644 --- a/drivers/firmware/tegra/bpmp.c +++ b/drivers/firmware/tegra/bpmp.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/of_device.h> | 19 | #include <linux/of_device.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/semaphore.h> | 21 | #include <linux/semaphore.h> |
22 | #include <linux/sched/clock.h> | ||
22 | 23 | ||
23 | #include <soc/tegra/bpmp.h> | 24 | #include <soc/tegra/bpmp.h> |
24 | #include <soc/tegra/bpmp-abi.h> | 25 | #include <soc/tegra/bpmp-abi.h> |
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_events.c b/drivers/gpu/drm/amd/amdkfd/kfd_events.c index 6a3470f84998..d1ce83d73a87 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_events.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_events.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <linux/mm_types.h> | 23 | #include <linux/mm_types.h> |
24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
25 | #include <linux/types.h> | 25 | #include <linux/types.h> |
26 | #include <linux/sched.h> | 26 | #include <linux/sched/signal.h> |
27 | #include <linux/uaccess.h> | 27 | #include <linux/uaccess.h> |
28 | #include <linux/mm.h> | 28 | #include <linux/mm.h> |
29 | #include <linux/mman.h> | 29 | #include <linux/mman.h> |
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c index d83de985e88c..6acc4313363e 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c | |||
@@ -23,6 +23,8 @@ | |||
23 | 23 | ||
24 | #include <linux/printk.h> | 24 | #include <linux/printk.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/mm_types.h> | ||
27 | |||
26 | #include "kfd_priv.h" | 28 | #include "kfd_priv.h" |
27 | #include "kfd_mqd_manager.h" | 29 | #include "kfd_mqd_manager.h" |
28 | #include "cik_regs.h" | 30 | #include "cik_regs.h" |
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c index fa32c32fa1c2..a9b9882a9a77 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c | |||
@@ -23,6 +23,8 @@ | |||
23 | 23 | ||
24 | #include <linux/printk.h> | 24 | #include <linux/printk.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/mm_types.h> | ||
27 | |||
26 | #include "kfd_priv.h" | 28 | #include "kfd_priv.h" |
27 | #include "kfd_mqd_manager.h" | 29 | #include "kfd_mqd_manager.h" |
28 | #include "vi_structs.h" | 30 | #include "vi_structs.h" |
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c index ca5f2aa7232d..84d1ffd1eef9 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/mutex.h> | 23 | #include <linux/mutex.h> |
24 | #include <linux/log2.h> | 24 | #include <linux/log2.h> |
25 | #include <linux/sched.h> | 25 | #include <linux/sched.h> |
26 | #include <linux/sched/mm.h> | ||
26 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
27 | #include <linux/amd-iommu.h> | 28 | #include <linux/amd-iommu.h> |
28 | #include <linux/notifier.h> | 29 | #include <linux/notifier.h> |
diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c index 1bf83ed113b3..16f96563cd2b 100644 --- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c +++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/kthread.h> | 24 | #include <linux/kthread.h> |
25 | #include <linux/wait.h> | 25 | #include <linux/wait.h> |
26 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
27 | #include <uapi/linux/sched/types.h> | ||
27 | #include <drm/drmP.h> | 28 | #include <drm/drmP.h> |
28 | #include "gpu_scheduler.h" | 29 | #include "gpu_scheduler.h" |
29 | 30 | ||
diff --git a/drivers/gpu/drm/drm_lock.c b/drivers/gpu/drm/drm_lock.c index 32d43f86a8f2..96bb6badb818 100644 --- a/drivers/gpu/drm/drm_lock.c +++ b/drivers/gpu/drm/drm_lock.c | |||
@@ -34,6 +34,8 @@ | |||
34 | */ | 34 | */ |
35 | 35 | ||
36 | #include <linux/export.h> | 36 | #include <linux/export.h> |
37 | #include <linux/sched/signal.h> | ||
38 | |||
37 | #include <drm/drmP.h> | 39 | #include <drm/drmP.h> |
38 | #include "drm_legacy.h" | 40 | #include "drm_legacy.h" |
39 | #include "drm_internal.h" | 41 | #include "drm_internal.h" |
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.c b/drivers/gpu/drm/etnaviv/etnaviv_gem.c index e78f1406885d..fd56f92f3469 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_gem.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_gem.c | |||
@@ -16,6 +16,8 @@ | |||
16 | 16 | ||
17 | #include <linux/spinlock.h> | 17 | #include <linux/spinlock.h> |
18 | #include <linux/shmem_fs.h> | 18 | #include <linux/shmem_fs.h> |
19 | #include <linux/sched/mm.h> | ||
20 | #include <linux/sched/task.h> | ||
19 | 21 | ||
20 | #include "etnaviv_drv.h" | 22 | #include "etnaviv_drv.h" |
21 | #include "etnaviv_gem.h" | 23 | #include "etnaviv_gem.h" |
diff --git a/drivers/gpu/drm/i915/i915_gem_request.c b/drivers/gpu/drm/i915/i915_gem_request.c index f31deeb72703..e7c3c0318ff6 100644 --- a/drivers/gpu/drm/i915/i915_gem_request.c +++ b/drivers/gpu/drm/i915/i915_gem_request.c | |||
@@ -24,6 +24,9 @@ | |||
24 | 24 | ||
25 | #include <linux/prefetch.h> | 25 | #include <linux/prefetch.h> |
26 | #include <linux/dma-fence-array.h> | 26 | #include <linux/dma-fence-array.h> |
27 | #include <linux/sched.h> | ||
28 | #include <linux/sched/clock.h> | ||
29 | #include <linux/sched/signal.h> | ||
27 | 30 | ||
28 | #include "i915_drv.h" | 31 | #include "i915_drv.h" |
29 | 32 | ||
diff --git a/drivers/gpu/drm/i915/i915_gem_userptr.c b/drivers/gpu/drm/i915/i915_gem_userptr.c index 0115989e324a..22b46398831e 100644 --- a/drivers/gpu/drm/i915/i915_gem_userptr.c +++ b/drivers/gpu/drm/i915/i915_gem_userptr.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/mmu_notifier.h> | 31 | #include <linux/mmu_notifier.h> |
32 | #include <linux/mempolicy.h> | 32 | #include <linux/mempolicy.h> |
33 | #include <linux/swap.h> | 33 | #include <linux/swap.h> |
34 | #include <linux/sched/mm.h> | ||
34 | 35 | ||
35 | struct i915_mm_struct { | 36 | struct i915_mm_struct { |
36 | struct mm_struct *mm; | 37 | struct mm_struct *mm; |
diff --git a/drivers/gpu/drm/i915/intel_breadcrumbs.c b/drivers/gpu/drm/i915/intel_breadcrumbs.c index fcfa423d08bd..7044e9a6abf7 100644 --- a/drivers/gpu/drm/i915/intel_breadcrumbs.c +++ b/drivers/gpu/drm/i915/intel_breadcrumbs.c | |||
@@ -23,6 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/kthread.h> | 25 | #include <linux/kthread.h> |
26 | #include <uapi/linux/sched/types.h> | ||
26 | 27 | ||
27 | #include "i915_drv.h" | 28 | #include "i915_drv.h" |
28 | 29 | ||
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index b9cde116dab3..344f238b283f 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/async.h> | 28 | #include <linux/async.h> |
29 | #include <linux/i2c.h> | 29 | #include <linux/i2c.h> |
30 | #include <linux/hdmi.h> | 30 | #include <linux/hdmi.h> |
31 | #include <linux/sched/clock.h> | ||
31 | #include <drm/i915_drm.h> | 32 | #include <drm/i915_drm.h> |
32 | #include "i915_drv.h" | 33 | #include "i915_drv.h" |
33 | #include <drm/drm_crtc.h> | 34 | #include <drm/drm_crtc.h> |
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c index a2bb855a2851..ac5800c72cb4 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/jiffies.h> | 18 | #include <linux/jiffies.h> |
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/sched.h> | 21 | #include <linux/sched/signal.h> |
22 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
23 | #include <linux/workqueue.h> | 23 | #include <linux/workqueue.h> |
24 | #include <linux/of_device.h> | 24 | #include <linux/of_device.h> |
diff --git a/drivers/gpu/drm/ttm/ttm_lock.c b/drivers/gpu/drm/ttm/ttm_lock.c index f154fb1929bd..913f4318cdc0 100644 --- a/drivers/gpu/drm/ttm/ttm_lock.c +++ b/drivers/gpu/drm/ttm/ttm_lock.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <linux/atomic.h> | 33 | #include <linux/atomic.h> |
34 | #include <linux/errno.h> | 34 | #include <linux/errno.h> |
35 | #include <linux/wait.h> | 35 | #include <linux/wait.h> |
36 | #include <linux/sched.h> | 36 | #include <linux/sched/signal.h> |
37 | #include <linux/module.h> | 37 | #include <linux/module.h> |
38 | 38 | ||
39 | #define TTM_WRITE_LOCK_PENDING (1 << 0) | 39 | #define TTM_WRITE_LOCK_PENDING (1 << 0) |
diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c index ab3016982466..1eef98c3331d 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/pm_runtime.h> | 26 | #include <linux/pm_runtime.h> |
27 | #include <linux/device.h> | 27 | #include <linux/device.h> |
28 | #include <linux/io.h> | 28 | #include <linux/io.h> |
29 | #include <linux/sched/signal.h> | ||
29 | 30 | ||
30 | #include "uapi/drm/vc4_drm.h" | 31 | #include "uapi/drm/vc4_drm.h" |
31 | #include "vc4_drv.h" | 32 | #include "vc4_drv.h" |
diff --git a/drivers/gpu/vga/vgaarb.c b/drivers/gpu/vga/vgaarb.c index 0f5b2dd24507..92f1452dad57 100644 --- a/drivers/gpu/vga/vgaarb.c +++ b/drivers/gpu/vga/vgaarb.c | |||
@@ -41,7 +41,7 @@ | |||
41 | #include <linux/errno.h> | 41 | #include <linux/errno.h> |
42 | #include <linux/init.h> | 42 | #include <linux/init.h> |
43 | #include <linux/list.h> | 43 | #include <linux/list.h> |
44 | #include <linux/sched.h> | 44 | #include <linux/sched/signal.h> |
45 | #include <linux/wait.h> | 45 | #include <linux/wait.h> |
46 | #include <linux/spinlock.h> | 46 | #include <linux/spinlock.h> |
47 | #include <linux/poll.h> | 47 | #include <linux/poll.h> |
diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c index acfb522a432a..c6c9c51c806f 100644 --- a/drivers/hid/hid-debug.c +++ b/drivers/hid/hid-debug.c | |||
@@ -30,7 +30,7 @@ | |||
30 | 30 | ||
31 | #include <linux/debugfs.h> | 31 | #include <linux/debugfs.h> |
32 | #include <linux/seq_file.h> | 32 | #include <linux/seq_file.h> |
33 | #include <linux/sched.h> | 33 | #include <linux/sched/signal.h> |
34 | #include <linux/export.h> | 34 | #include <linux/export.h> |
35 | #include <linux/slab.h> | 35 | #include <linux/slab.h> |
36 | #include <linux/uaccess.h> | 36 | #include <linux/uaccess.h> |
diff --git a/drivers/hid/hid-roccat.c b/drivers/hid/hid-roccat.c index 76d06cf87b2a..fb77dec720a4 100644 --- a/drivers/hid/hid-roccat.c +++ b/drivers/hid/hid-roccat.c | |||
@@ -25,7 +25,7 @@ | |||
25 | 25 | ||
26 | #include <linux/cdev.h> | 26 | #include <linux/cdev.h> |
27 | #include <linux/poll.h> | 27 | #include <linux/poll.h> |
28 | #include <linux/sched.h> | 28 | #include <linux/sched/signal.h> |
29 | #include <linux/hid-roccat.h> | 29 | #include <linux/hid-roccat.h> |
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | 31 | ||
diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c index f0e2757cb909..ec530454e6f6 100644 --- a/drivers/hid/hidraw.c +++ b/drivers/hid/hidraw.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <linux/slab.h> | 33 | #include <linux/slab.h> |
34 | #include <linux/hid.h> | 34 | #include <linux/hid.h> |
35 | #include <linux/mutex.h> | 35 | #include <linux/mutex.h> |
36 | #include <linux/sched.h> | 36 | #include <linux/sched/signal.h> |
37 | #include <linux/string.h> | 37 | #include <linux/string.h> |
38 | 38 | ||
39 | #include <linux/hidraw.h> | 39 | #include <linux/hidraw.h> |
diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c index 700145b15088..774bd701dae0 100644 --- a/drivers/hid/usbhid/hiddev.c +++ b/drivers/hid/usbhid/hiddev.c | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | #include <linux/poll.h> | 28 | #include <linux/poll.h> |
29 | #include <linux/slab.h> | 29 | #include <linux/slab.h> |
30 | #include <linux/sched/signal.h> | ||
30 | #include <linux/module.h> | 31 | #include <linux/module.h> |
31 | #include <linux/init.h> | 32 | #include <linux/init.h> |
32 | #include <linux/input.h> | 33 | #include <linux/input.h> |
diff --git a/drivers/hsi/clients/cmt_speech.c b/drivers/hsi/clients/cmt_speech.c index 7175e6bedf21..727f968ac1cb 100644 --- a/drivers/hsi/clients/cmt_speech.c +++ b/drivers/hsi/clients/cmt_speech.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <linux/slab.h> | 31 | #include <linux/slab.h> |
32 | #include <linux/fs.h> | 32 | #include <linux/fs.h> |
33 | #include <linux/poll.h> | 33 | #include <linux/poll.h> |
34 | #include <linux/sched.h> | 34 | #include <linux/sched/signal.h> |
35 | #include <linux/ioctl.h> | 35 | #include <linux/ioctl.h> |
36 | #include <linux/uaccess.h> | 36 | #include <linux/uaccess.h> |
37 | #include <linux/pm_qos.h> | 37 | #include <linux/pm_qos.h> |
diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index f7f6b9144b07..da6b59ba5940 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c | |||
@@ -34,6 +34,8 @@ | |||
34 | #include <linux/kernel_stat.h> | 34 | #include <linux/kernel_stat.h> |
35 | #include <linux/clockchips.h> | 35 | #include <linux/clockchips.h> |
36 | #include <linux/cpu.h> | 36 | #include <linux/cpu.h> |
37 | #include <linux/sched/task_stack.h> | ||
38 | |||
37 | #include <asm/hyperv.h> | 39 | #include <asm/hyperv.h> |
38 | #include <asm/hypervisor.h> | 40 | #include <asm/hypervisor.h> |
39 | #include <asm/mshyperv.h> | 41 | #include <asm/mshyperv.h> |
diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c index 412b91d255ad..961c5f42d956 100644 --- a/drivers/i2c/busses/i2c-ibm_iic.c +++ b/drivers/i2c/busses/i2c-ibm_iic.c | |||
@@ -37,6 +37,8 @@ | |||
37 | #include <linux/delay.h> | 37 | #include <linux/delay.h> |
38 | #include <linux/slab.h> | 38 | #include <linux/slab.h> |
39 | #include <linux/interrupt.h> | 39 | #include <linux/interrupt.h> |
40 | #include <linux/sched/signal.h> | ||
41 | |||
40 | #include <asm/irq.h> | 42 | #include <asm/irq.h> |
41 | #include <linux/io.h> | 43 | #include <linux/io.h> |
42 | #include <linux/i2c.h> | 44 | #include <linux/i2c.h> |
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c index 565a49a0c564..96caf378b1dc 100644 --- a/drivers/i2c/busses/i2c-mpc.c +++ b/drivers/i2c/busses/i2c-mpc.c | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/sched.h> | 18 | #include <linux/sched/signal.h> |
19 | #include <linux/of_address.h> | 19 | #include <linux/of_address.h> |
20 | #include <linux/of_irq.h> | 20 | #include <linux/of_irq.h> |
21 | #include <linux/of_platform.h> | 21 | #include <linux/of_platform.h> |
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index aef00511ca86..74f1b7dc03f7 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/types.h> | 29 | #include <linux/types.h> |
30 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
31 | #include <linux/sched/task_stack.h> | ||
31 | #include <linux/delay.h> | 32 | #include <linux/delay.h> |
32 | #include <linux/timer.h> | 33 | #include <linux/timer.h> |
33 | #include <linux/seq_file.h> | 34 | #include <linux/seq_file.h> |
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index 247b9faccce1..4c0007cb74e3 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
20 | #include <linux/hdreg.h> | 20 | #include <linux/hdreg.h> |
21 | #include <linux/ide.h> | 21 | #include <linux/ide.h> |
22 | #include <linux/nmi.h> | ||
22 | #include <linux/scatterlist.h> | 23 | #include <linux/scatterlist.h> |
23 | #include <linux/uaccess.h> | 24 | #include <linux/uaccess.h> |
24 | 25 | ||
diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c index 4972986f6455..d2b465140a6b 100644 --- a/drivers/iio/industrialio-buffer.c +++ b/drivers/iio/industrialio-buffer.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/cdev.h> | 20 | #include <linux/cdev.h> |
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | #include <linux/poll.h> | 22 | #include <linux/poll.h> |
23 | #include <linux/sched.h> | 23 | #include <linux/sched/signal.h> |
24 | 24 | ||
25 | #include <linux/iio/iio.h> | 25 | #include <linux/iio/iio.h> |
26 | #include "iio_core.h" | 26 | #include "iio_core.h" |
diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c index 446b56a5260b..27f155d2df8d 100644 --- a/drivers/infiniband/core/umem.c +++ b/drivers/infiniband/core/umem.c | |||
@@ -34,7 +34,8 @@ | |||
34 | 34 | ||
35 | #include <linux/mm.h> | 35 | #include <linux/mm.h> |
36 | #include <linux/dma-mapping.h> | 36 | #include <linux/dma-mapping.h> |
37 | #include <linux/sched.h> | 37 | #include <linux/sched/signal.h> |
38 | #include <linux/sched/mm.h> | ||
38 | #include <linux/export.h> | 39 | #include <linux/export.h> |
39 | #include <linux/hugetlb.h> | 40 | #include <linux/hugetlb.h> |
40 | #include <linux/slab.h> | 41 | #include <linux/slab.h> |
diff --git a/drivers/infiniband/core/umem_odp.c b/drivers/infiniband/core/umem_odp.c index f2fc0431512d..cb2742b548bb 100644 --- a/drivers/infiniband/core/umem_odp.c +++ b/drivers/infiniband/core/umem_odp.c | |||
@@ -32,6 +32,8 @@ | |||
32 | 32 | ||
33 | #include <linux/types.h> | 33 | #include <linux/types.h> |
34 | #include <linux/sched.h> | 34 | #include <linux/sched.h> |
35 | #include <linux/sched/mm.h> | ||
36 | #include <linux/sched/task.h> | ||
35 | #include <linux/pid.h> | 37 | #include <linux/pid.h> |
36 | #include <linux/slab.h> | 38 | #include <linux/slab.h> |
37 | #include <linux/export.h> | 39 | #include <linux/export.h> |
diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c b/drivers/infiniband/hw/cxgb3/iwch_provider.c index 318ec5267bdf..86ecd3ea6a4b 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_provider.c +++ b/drivers/infiniband/hw/cxgb3/iwch_provider.c | |||
@@ -37,7 +37,7 @@ | |||
37 | #include <linux/delay.h> | 37 | #include <linux/delay.h> |
38 | #include <linux/errno.h> | 38 | #include <linux/errno.h> |
39 | #include <linux/list.h> | 39 | #include <linux/list.h> |
40 | #include <linux/sched.h> | 40 | #include <linux/sched/mm.h> |
41 | #include <linux/spinlock.h> | 41 | #include <linux/spinlock.h> |
42 | #include <linux/ethtool.h> | 42 | #include <linux/ethtool.h> |
43 | #include <linux/rtnetlink.h> | 43 | #include <linux/rtnetlink.h> |
diff --git a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h index d19662f635b1..5846c47c8d55 100644 --- a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h +++ b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h | |||
@@ -37,7 +37,7 @@ | |||
37 | #include <linux/idr.h> | 37 | #include <linux/idr.h> |
38 | #include <linux/completion.h> | 38 | #include <linux/completion.h> |
39 | #include <linux/netdevice.h> | 39 | #include <linux/netdevice.h> |
40 | #include <linux/sched.h> | 40 | #include <linux/sched/mm.h> |
41 | #include <linux/pci.h> | 41 | #include <linux/pci.h> |
42 | #include <linux/dma-mapping.h> | 42 | #include <linux/dma-mapping.h> |
43 | #include <linux/inet.h> | 43 | #include <linux/inet.h> |
diff --git a/drivers/infiniband/hw/hfi1/affinity.c b/drivers/infiniband/hw/hfi1/affinity.c index 7a3d906b3671..e2cd2cd3b28a 100644 --- a/drivers/infiniband/hw/hfi1/affinity.c +++ b/drivers/infiniband/hw/hfi1/affinity.c | |||
@@ -576,7 +576,7 @@ int hfi1_get_proc_affinity(int node) | |||
576 | struct hfi1_affinity_node *entry; | 576 | struct hfi1_affinity_node *entry; |
577 | cpumask_var_t diff, hw_thread_mask, available_mask, intrs_mask; | 577 | cpumask_var_t diff, hw_thread_mask, available_mask, intrs_mask; |
578 | const struct cpumask *node_mask, | 578 | const struct cpumask *node_mask, |
579 | *proc_mask = tsk_cpus_allowed(current); | 579 | *proc_mask = ¤t->cpus_allowed; |
580 | struct hfi1_affinity_node_list *affinity = &node_affinity; | 580 | struct hfi1_affinity_node_list *affinity = &node_affinity; |
581 | struct cpu_mask_set *set = &affinity->proc; | 581 | struct cpu_mask_set *set = &affinity->proc; |
582 | 582 | ||
diff --git a/drivers/infiniband/hw/hfi1/file_ops.c b/drivers/infiniband/hw/hfi1/file_ops.c index 3b19c16a9e45..f78c739b330a 100644 --- a/drivers/infiniband/hw/hfi1/file_ops.c +++ b/drivers/infiniband/hw/hfi1/file_ops.c | |||
@@ -48,6 +48,7 @@ | |||
48 | #include <linux/cdev.h> | 48 | #include <linux/cdev.h> |
49 | #include <linux/vmalloc.h> | 49 | #include <linux/vmalloc.h> |
50 | #include <linux/io.h> | 50 | #include <linux/io.h> |
51 | #include <linux/sched/mm.h> | ||
51 | 52 | ||
52 | #include <rdma/ib.h> | 53 | #include <rdma/ib.h> |
53 | 54 | ||
diff --git a/drivers/infiniband/hw/hfi1/sdma.c b/drivers/infiniband/hw/hfi1/sdma.c index 1d81cac1fa6c..5cde1ecda0fe 100644 --- a/drivers/infiniband/hw/hfi1/sdma.c +++ b/drivers/infiniband/hw/hfi1/sdma.c | |||
@@ -856,7 +856,7 @@ struct sdma_engine *sdma_select_user_engine(struct hfi1_devdata *dd, | |||
856 | { | 856 | { |
857 | struct sdma_rht_node *rht_node; | 857 | struct sdma_rht_node *rht_node; |
858 | struct sdma_engine *sde = NULL; | 858 | struct sdma_engine *sde = NULL; |
859 | const struct cpumask *current_mask = tsk_cpus_allowed(current); | 859 | const struct cpumask *current_mask = ¤t->cpus_allowed; |
860 | unsigned long cpu_id; | 860 | unsigned long cpu_id; |
861 | 861 | ||
862 | /* | 862 | /* |
diff --git a/drivers/infiniband/hw/hfi1/user_pages.c b/drivers/infiniband/hw/hfi1/user_pages.c index 20f4ddcac3b0..68295a12b771 100644 --- a/drivers/infiniband/hw/hfi1/user_pages.c +++ b/drivers/infiniband/hw/hfi1/user_pages.c | |||
@@ -46,7 +46,7 @@ | |||
46 | */ | 46 | */ |
47 | 47 | ||
48 | #include <linux/mm.h> | 48 | #include <linux/mm.h> |
49 | #include <linux/sched.h> | 49 | #include <linux/sched/signal.h> |
50 | #include <linux/device.h> | 50 | #include <linux/device.h> |
51 | #include <linux/module.h> | 51 | #include <linux/module.h> |
52 | 52 | ||
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c index 88608906ce25..fba94df28cf1 100644 --- a/drivers/infiniband/hw/mlx4/main.c +++ b/drivers/infiniband/hw/mlx4/main.c | |||
@@ -39,6 +39,9 @@ | |||
39 | #include <linux/inetdevice.h> | 39 | #include <linux/inetdevice.h> |
40 | #include <linux/rtnetlink.h> | 40 | #include <linux/rtnetlink.h> |
41 | #include <linux/if_vlan.h> | 41 | #include <linux/if_vlan.h> |
42 | #include <linux/sched/mm.h> | ||
43 | #include <linux/sched/task.h> | ||
44 | |||
42 | #include <net/ipv6.h> | 45 | #include <net/ipv6.h> |
43 | #include <net/addrconf.h> | 46 | #include <net/addrconf.h> |
44 | #include <net/devlink.h> | 47 | #include <net/devlink.h> |
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index 5b3355268725..4dc0a8785fe0 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c | |||
@@ -41,6 +41,8 @@ | |||
41 | #include <asm/pat.h> | 41 | #include <asm/pat.h> |
42 | #endif | 42 | #endif |
43 | #include <linux/sched.h> | 43 | #include <linux/sched.h> |
44 | #include <linux/sched/mm.h> | ||
45 | #include <linux/sched/task.h> | ||
44 | #include <linux/delay.h> | 46 | #include <linux/delay.h> |
45 | #include <rdma/ib_user_verbs.h> | 47 | #include <rdma/ib_user_verbs.h> |
46 | #include <rdma/ib_addr.h> | 48 | #include <rdma/ib_addr.h> |
diff --git a/drivers/infiniband/hw/qib/qib_user_pages.c b/drivers/infiniband/hw/qib/qib_user_pages.c index 75f08624ac05..ce83ba9a12ef 100644 --- a/drivers/infiniband/hw/qib/qib_user_pages.c +++ b/drivers/infiniband/hw/qib/qib_user_pages.c | |||
@@ -32,6 +32,7 @@ | |||
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/mm.h> | 34 | #include <linux/mm.h> |
35 | #include <linux/sched/signal.h> | ||
35 | #include <linux/device.h> | 36 | #include <linux/device.h> |
36 | 37 | ||
37 | #include "qib.h" | 38 | #include "qib.h" |
diff --git a/drivers/infiniband/hw/usnic/usnic_uiom.c b/drivers/infiniband/hw/usnic/usnic_uiom.c index 1ccee6ea5bc3..c49db7c33979 100644 --- a/drivers/infiniband/hw/usnic/usnic_uiom.c +++ b/drivers/infiniband/hw/usnic/usnic_uiom.c | |||
@@ -34,7 +34,8 @@ | |||
34 | 34 | ||
35 | #include <linux/mm.h> | 35 | #include <linux/mm.h> |
36 | #include <linux/dma-mapping.h> | 36 | #include <linux/dma-mapping.h> |
37 | #include <linux/sched.h> | 37 | #include <linux/sched/signal.h> |
38 | #include <linux/sched/mm.h> | ||
38 | #include <linux/hugetlb.h> | 39 | #include <linux/hugetlb.h> |
39 | #include <linux/iommu.h> | 40 | #include <linux/iommu.h> |
40 | #include <linux/workqueue.h> | 41 | #include <linux/workqueue.h> |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c index a6d6c617b597..0cdf2b7f272f 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/slab.h> | 38 | #include <linux/slab.h> |
39 | #include <linux/vmalloc.h> | 39 | #include <linux/vmalloc.h> |
40 | #include <linux/moduleparam.h> | 40 | #include <linux/moduleparam.h> |
41 | #include <linux/sched/signal.h> | ||
41 | 42 | ||
42 | #include "ipoib.h" | 43 | #include "ipoib.h" |
43 | 44 | ||
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_vlan.c b/drivers/infiniband/ulp/ipoib/ipoib_vlan.c index deedb6fc1b05..3e10e3dac2e7 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_vlan.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_vlan.c | |||
@@ -31,6 +31,7 @@ | |||
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include <linux/module.h> | 33 | #include <linux/module.h> |
34 | #include <linux/sched/signal.h> | ||
34 | 35 | ||
35 | #include <linux/init.h> | 36 | #include <linux/init.h> |
36 | #include <linux/seq_file.h> | 37 | #include <linux/seq_file.h> |
diff --git a/drivers/iommu/amd_iommu_v2.c b/drivers/iommu/amd_iommu_v2.c index f8ed8c95b685..063343909b0d 100644 --- a/drivers/iommu/amd_iommu_v2.c +++ b/drivers/iommu/amd_iommu_v2.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/profile.h> | 22 | #include <linux/profile.h> |
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/sched.h> | 24 | #include <linux/sched.h> |
25 | #include <linux/sched/mm.h> | ||
25 | #include <linux/iommu.h> | 26 | #include <linux/iommu.h> |
26 | #include <linux/wait.h> | 27 | #include <linux/wait.h> |
27 | #include <linux/pci.h> | 28 | #include <linux/pci.h> |
diff --git a/drivers/iommu/intel-svm.c b/drivers/iommu/intel-svm.c index 51f2b228723f..23c427602c55 100644 --- a/drivers/iommu/intel-svm.c +++ b/drivers/iommu/intel-svm.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/intel-iommu.h> | 16 | #include <linux/intel-iommu.h> |
17 | #include <linux/mmu_notifier.h> | 17 | #include <linux/mmu_notifier.h> |
18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
19 | #include <linux/sched/mm.h> | ||
19 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
20 | #include <linux/intel-svm.h> | 21 | #include <linux/intel-svm.h> |
21 | #include <linux/rculist.h> | 22 | #include <linux/rculist.h> |
diff --git a/drivers/isdn/capi/kcapi.c b/drivers/isdn/capi/kcapi.c index 49d0f70c2bae..1dfd1085a04f 100644 --- a/drivers/isdn/capi/kcapi.c +++ b/drivers/isdn/capi/kcapi.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/ioport.h> | 19 | #include <linux/ioport.h> |
20 | #include <linux/proc_fs.h> | 20 | #include <linux/proc_fs.h> |
21 | #include <linux/sched.h> | 21 | #include <linux/sched/signal.h> |
22 | #include <linux/seq_file.h> | 22 | #include <linux/seq_file.h> |
23 | #include <linux/skbuff.h> | 23 | #include <linux/skbuff.h> |
24 | #include <linux/workqueue.h> | 24 | #include <linux/workqueue.h> |
diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c index 63eaa0a9f8a1..1b169559a240 100644 --- a/drivers/isdn/i4l/isdn_tty.c +++ b/drivers/isdn/i4l/isdn_tty.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
16 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
17 | #include <linux/mutex.h> | 17 | #include <linux/mutex.h> |
18 | #include <linux/sched/signal.h> | ||
18 | #include "isdn_common.h" | 19 | #include "isdn_common.h" |
19 | #include "isdn_tty.h" | 20 | #include "isdn_tty.h" |
20 | #ifdef CONFIG_ISDN_AUDIO | 21 | #ifdef CONFIG_ISDN_AUDIO |
diff --git a/drivers/isdn/mISDN/l1oip_core.c b/drivers/isdn/mISDN/l1oip_core.c index 67c21876c35f..6ceca7db62ad 100644 --- a/drivers/isdn/mISDN/l1oip_core.c +++ b/drivers/isdn/mISDN/l1oip_core.c | |||
@@ -234,6 +234,8 @@ | |||
234 | #include <linux/workqueue.h> | 234 | #include <linux/workqueue.h> |
235 | #include <linux/kthread.h> | 235 | #include <linux/kthread.h> |
236 | #include <linux/slab.h> | 236 | #include <linux/slab.h> |
237 | #include <linux/sched/signal.h> | ||
238 | |||
237 | #include <net/sock.h> | 239 | #include <net/sock.h> |
238 | #include "core.h" | 240 | #include "core.h" |
239 | #include "l1oip.h" | 241 | #include "l1oip.h" |
diff --git a/drivers/isdn/mISDN/stack.c b/drivers/isdn/mISDN/stack.c index b324474c0c12..8b7faea2ddf8 100644 --- a/drivers/isdn/mISDN/stack.c +++ b/drivers/isdn/mISDN/stack.c | |||
@@ -19,6 +19,9 @@ | |||
19 | #include <linux/mISDNif.h> | 19 | #include <linux/mISDNif.h> |
20 | #include <linux/kthread.h> | 20 | #include <linux/kthread.h> |
21 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
22 | #include <linux/sched/cputime.h> | ||
23 | #include <linux/signal.h> | ||
24 | |||
22 | #include "core.h" | 25 | #include "core.h" |
23 | 26 | ||
24 | static u_int *debug; | 27 | static u_int *debug; |
diff --git a/drivers/isdn/mISDN/timerdev.c b/drivers/isdn/mISDN/timerdev.c index 9438d7ec3308..b1e135fc1fb5 100644 --- a/drivers/isdn/mISDN/timerdev.c +++ b/drivers/isdn/mISDN/timerdev.c | |||
@@ -25,6 +25,8 @@ | |||
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/mISDNif.h> | 26 | #include <linux/mISDNif.h> |
27 | #include <linux/mutex.h> | 27 | #include <linux/mutex.h> |
28 | #include <linux/sched/signal.h> | ||
29 | |||
28 | #include "core.h" | 30 | #include "core.h" |
29 | 31 | ||
30 | static DEFINE_MUTEX(mISDN_mutex); | 32 | static DEFINE_MUTEX(mISDN_mutex); |
diff --git a/drivers/leds/trigger/ledtrig-heartbeat.c b/drivers/leds/trigger/ledtrig-heartbeat.c index e6f2f8b9f09a..afa3b4099214 100644 --- a/drivers/leds/trigger/ledtrig-heartbeat.c +++ b/drivers/leds/trigger/ledtrig-heartbeat.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
18 | #include <linux/timer.h> | 18 | #include <linux/timer.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/sched/loadavg.h> | ||
20 | #include <linux/leds.h> | 21 | #include <linux/leds.h> |
21 | #include <linux/reboot.h> | 22 | #include <linux/reboot.h> |
22 | #include <linux/suspend.h> | 23 | #include <linux/suspend.h> |
diff --git a/drivers/lguest/core.c b/drivers/lguest/core.c index ac219045daf7..395ed1961dbf 100644 --- a/drivers/lguest/core.c +++ b/drivers/lguest/core.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/stddef.h> | 8 | #include <linux/stddef.h> |
9 | #include <linux/io.h> | 9 | #include <linux/io.h> |
10 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
11 | #include <linux/sched/signal.h> | ||
11 | #include <linux/vmalloc.h> | 12 | #include <linux/vmalloc.h> |
12 | #include <linux/cpu.h> | 13 | #include <linux/cpu.h> |
13 | #include <linux/freezer.h> | 14 | #include <linux/freezer.h> |
diff --git a/drivers/lguest/lguest_user.c b/drivers/lguest/lguest_user.c index 30c60687d277..1a6787bc9386 100644 --- a/drivers/lguest/lguest_user.c +++ b/drivers/lguest/lguest_user.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/miscdevice.h> | 8 | #include <linux/miscdevice.h> |
9 | #include <linux/fs.h> | 9 | #include <linux/fs.h> |
10 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
11 | #include <linux/sched/mm.h> | ||
11 | #include <linux/file.h> | 12 | #include <linux/file.h> |
12 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
13 | #include <linux/export.h> | 14 | #include <linux/export.h> |
diff --git a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c index 152414e6378a..fee939efc4fc 100644 --- a/drivers/macintosh/adb.c +++ b/drivers/macintosh/adb.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/fs.h> | 24 | #include <linux/fs.h> |
25 | #include <linux/mm.h> | 25 | #include <linux/mm.h> |
26 | #include <linux/sched.h> | 26 | #include <linux/sched/signal.h> |
27 | #include <linux/adb.h> | 27 | #include <linux/adb.h> |
28 | #include <linux/cuda.h> | 28 | #include <linux/cuda.h> |
29 | #include <linux/pmu.h> | 29 | #include <linux/pmu.h> |
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c index 227869159ac0..1ac66421877a 100644 --- a/drivers/macintosh/smu.c +++ b/drivers/macintosh/smu.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/of_platform.h> | 39 | #include <linux/of_platform.h> |
40 | #include <linux/slab.h> | 40 | #include <linux/slab.h> |
41 | #include <linux/memblock.h> | 41 | #include <linux/memblock.h> |
42 | #include <linux/sched/signal.h> | ||
42 | 43 | ||
43 | #include <asm/byteorder.h> | 44 | #include <asm/byteorder.h> |
44 | #include <asm/io.h> | 45 | #include <asm/io.h> |
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index 43b8db2b5445..cce99f72e4ae 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <linux/errno.h> | 23 | #include <linux/errno.h> |
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | #include <linux/sched.h> | 26 | #include <linux/sched/signal.h> |
27 | #include <linux/miscdevice.h> | 27 | #include <linux/miscdevice.h> |
28 | #include <linux/blkdev.h> | 28 | #include <linux/blkdev.h> |
29 | #include <linux/pci.h> | 29 | #include <linux/pci.h> |
diff --git a/drivers/mailbox/mailbox-test.c b/drivers/mailbox/mailbox-test.c index 9c79f8019d2a..97fb956bb6e0 100644 --- a/drivers/mailbox/mailbox-test.c +++ b/drivers/mailbox/mailbox-test.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/poll.h> | 21 | #include <linux/poll.h> |
22 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
23 | #include <linux/uaccess.h> | 23 | #include <linux/uaccess.h> |
24 | #include <linux/sched/signal.h> | ||
24 | 25 | ||
25 | #define MBOX_MAX_SIG_LEN 8 | 26 | #define MBOX_MAX_SIG_LEN 8 |
26 | #define MBOX_MAX_MSG_LEN 128 | 27 | #define MBOX_MAX_MSG_LEN 128 |
diff --git a/drivers/md/bcache/bset.c b/drivers/md/bcache/bset.c index 646fe85261c1..18526d44688d 100644 --- a/drivers/md/bcache/bset.c +++ b/drivers/md/bcache/bset.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include "bset.h" | 11 | #include "bset.h" |
12 | 12 | ||
13 | #include <linux/console.h> | 13 | #include <linux/console.h> |
14 | #include <linux/sched/clock.h> | ||
14 | #include <linux/random.h> | 15 | #include <linux/random.h> |
15 | #include <linux/prefetch.h> | 16 | #include <linux/prefetch.h> |
16 | 17 | ||
diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c index a43eedd5804d..450d0e848ae4 100644 --- a/drivers/md/bcache/btree.c +++ b/drivers/md/bcache/btree.c | |||
@@ -32,6 +32,9 @@ | |||
32 | #include <linux/prefetch.h> | 32 | #include <linux/prefetch.h> |
33 | #include <linux/random.h> | 33 | #include <linux/random.h> |
34 | #include <linux/rcupdate.h> | 34 | #include <linux/rcupdate.h> |
35 | #include <linux/sched/clock.h> | ||
36 | #include <linux/rculist.h> | ||
37 | |||
35 | #include <trace/events/bcache.h> | 38 | #include <trace/events/bcache.h> |
36 | 39 | ||
37 | /* | 40 | /* |
diff --git a/drivers/md/bcache/closure.h b/drivers/md/bcache/closure.h index 9b2fe2d3e3a9..1ec84ca81146 100644 --- a/drivers/md/bcache/closure.h +++ b/drivers/md/bcache/closure.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/llist.h> | 4 | #include <linux/llist.h> |
5 | #include <linux/sched.h> | 5 | #include <linux/sched.h> |
6 | #include <linux/sched/task_stack.h> | ||
6 | #include <linux/workqueue.h> | 7 | #include <linux/workqueue.h> |
7 | 8 | ||
8 | /* | 9 | /* |
diff --git a/drivers/md/bcache/sysfs.c b/drivers/md/bcache/sysfs.c index b3ff57d61dde..f90f13616980 100644 --- a/drivers/md/bcache/sysfs.c +++ b/drivers/md/bcache/sysfs.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/blkdev.h> | 14 | #include <linux/blkdev.h> |
15 | #include <linux/sort.h> | 15 | #include <linux/sort.h> |
16 | #include <linux/sched/clock.h> | ||
16 | 17 | ||
17 | static const char * const cache_replacement_policies[] = { | 18 | static const char * const cache_replacement_policies[] = { |
18 | "lru", | 19 | "lru", |
diff --git a/drivers/md/bcache/util.c b/drivers/md/bcache/util.c index dde6172f3f10..8c3a938f4bf0 100644 --- a/drivers/md/bcache/util.c +++ b/drivers/md/bcache/util.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/seq_file.h> | 13 | #include <linux/seq_file.h> |
14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
15 | #include <linux/sched/clock.h> | ||
15 | 16 | ||
16 | #include "util.h" | 17 | #include "util.h" |
17 | 18 | ||
diff --git a/drivers/md/bcache/util.h b/drivers/md/bcache/util.h index cf2cbc211d83..a126919ed102 100644 --- a/drivers/md/bcache/util.h +++ b/drivers/md/bcache/util.h | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/errno.h> | 6 | #include <linux/errno.h> |
7 | #include <linux/blkdev.h> | 7 | #include <linux/blkdev.h> |
8 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
9 | #include <linux/sched/clock.h> | ||
9 | #include <linux/llist.h> | 10 | #include <linux/llist.h> |
10 | #include <linux/ratelimit.h> | 11 | #include <linux/ratelimit.h> |
11 | #include <linux/vmalloc.h> | 12 | #include <linux/vmalloc.h> |
diff --git a/drivers/md/bcache/writeback.c b/drivers/md/bcache/writeback.c index 69e1ae59cab8..6ac2e48b9235 100644 --- a/drivers/md/bcache/writeback.c +++ b/drivers/md/bcache/writeback.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/delay.h> | 14 | #include <linux/delay.h> |
15 | #include <linux/kthread.h> | 15 | #include <linux/kthread.h> |
16 | #include <linux/sched/clock.h> | ||
16 | #include <trace/events/bcache.h> | 17 | #include <trace/events/bcache.h> |
17 | 18 | ||
18 | /* Rate limiting */ | 19 | /* Rate limiting */ |
diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c index d36d427a9efb..df4859f6ac6a 100644 --- a/drivers/md/dm-bufio.c +++ b/drivers/md/dm-bufio.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/device-mapper.h> | 11 | #include <linux/device-mapper.h> |
12 | #include <linux/dm-io.h> | 12 | #include <linux/dm-io.h> |
13 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
14 | #include <linux/sched/mm.h> | ||
14 | #include <linux/jiffies.h> | 15 | #include <linux/jiffies.h> |
15 | #include <linux/vmalloc.h> | 16 | #include <linux/vmalloc.h> |
16 | #include <linux/shrinker.h> | 17 | #include <linux/shrinker.h> |
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index a5a9b17f0f7f..4da6fc6b1ffd 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/vmalloc.h> | 11 | #include <linux/vmalloc.h> |
12 | #include <linux/miscdevice.h> | 12 | #include <linux/miscdevice.h> |
13 | #include <linux/sched/mm.h> | ||
13 | #include <linux/init.h> | 14 | #include <linux/init.h> |
14 | #include <linux/wait.h> | 15 | #include <linux/wait.h> |
15 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 9f37d7fc2786..f4ffd1eb8f44 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/mutex.h> | 14 | #include <linux/mutex.h> |
15 | #include <linux/sched/signal.h> | ||
15 | #include <linux/blkpg.h> | 16 | #include <linux/blkpg.h> |
16 | #include <linux/bio.h> | 17 | #include <linux/bio.h> |
17 | #include <linux/mempool.h> | 18 | #include <linux/mempool.h> |
diff --git a/drivers/md/md.c b/drivers/md/md.c index 985374f20e2e..548d1b8014f8 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -44,6 +44,7 @@ | |||
44 | 44 | ||
45 | */ | 45 | */ |
46 | 46 | ||
47 | #include <linux/sched/signal.h> | ||
47 | #include <linux/kthread.h> | 48 | #include <linux/kthread.h> |
48 | #include <linux/blkdev.h> | 49 | #include <linux/blkdev.h> |
49 | #include <linux/badblocks.h> | 50 | #include <linux/badblocks.h> |
diff --git a/drivers/md/persistent-data/dm-block-manager.c b/drivers/md/persistent-data/dm-block-manager.c index 0863905dee02..8589e0a14068 100644 --- a/drivers/md/persistent-data/dm-block-manager.c +++ b/drivers/md/persistent-data/dm-block-manager.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/rwsem.h> | 13 | #include <linux/rwsem.h> |
14 | #include <linux/device-mapper.h> | 14 | #include <linux/device-mapper.h> |
15 | #include <linux/stacktrace.h> | 15 | #include <linux/stacktrace.h> |
16 | #include <linux/sched/task.h> | ||
16 | 17 | ||
17 | #define DM_MSG_PREFIX "block manager" | 18 | #define DM_MSG_PREFIX "block manager" |
18 | 19 | ||
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 7453d94eeed7..fbc2d7851b49 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c | |||
@@ -37,7 +37,10 @@ | |||
37 | #include <linux/module.h> | 37 | #include <linux/module.h> |
38 | #include <linux/seq_file.h> | 38 | #include <linux/seq_file.h> |
39 | #include <linux/ratelimit.h> | 39 | #include <linux/ratelimit.h> |
40 | #include <linux/sched/signal.h> | ||
41 | |||
40 | #include <trace/events/block.h> | 42 | #include <trace/events/block.h> |
43 | |||
41 | #include "md.h" | 44 | #include "md.h" |
42 | #include "raid1.h" | 45 | #include "raid1.h" |
43 | #include "bitmap.h" | 46 | #include "bitmap.h" |
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 2ce23b01dbb2..4fb09b3fcb41 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -55,6 +55,8 @@ | |||
55 | #include <linux/ratelimit.h> | 55 | #include <linux/ratelimit.h> |
56 | #include <linux/nodemask.h> | 56 | #include <linux/nodemask.h> |
57 | #include <linux/flex_array.h> | 57 | #include <linux/flex_array.h> |
58 | #include <linux/sched/signal.h> | ||
59 | |||
58 | #include <trace/events/block.h> | 60 | #include <trace/events/block.h> |
59 | 61 | ||
60 | #include "md.h" | 62 | #include "md.h" |
diff --git a/drivers/media/dvb-core/dvb_ca_en50221.c b/drivers/media/dvb-core/dvb_ca_en50221.c index 000d737ad827..8d65028c7a74 100644 --- a/drivers/media/dvb-core/dvb_ca_en50221.c +++ b/drivers/media/dvb-core/dvb_ca_en50221.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #include <linux/vmalloc.h> | 34 | #include <linux/vmalloc.h> |
35 | #include <linux/delay.h> | 35 | #include <linux/delay.h> |
36 | #include <linux/spinlock.h> | 36 | #include <linux/spinlock.h> |
37 | #include <linux/sched.h> | 37 | #include <linux/sched/signal.h> |
38 | #include <linux/kthread.h> | 38 | #include <linux/kthread.h> |
39 | 39 | ||
40 | #include "dvb_ca_en50221.h" | 40 | #include "dvb_ca_en50221.h" |
diff --git a/drivers/media/dvb-core/dvb_demux.c b/drivers/media/dvb-core/dvb_demux.c index 4eac71e50c5f..6628f80d184f 100644 --- a/drivers/media/dvb-core/dvb_demux.c +++ b/drivers/media/dvb-core/dvb_demux.c | |||
@@ -19,7 +19,7 @@ | |||
19 | 19 | ||
20 | #define pr_fmt(fmt) "dvb_demux: " fmt | 20 | #define pr_fmt(fmt) "dvb_demux: " fmt |
21 | 21 | ||
22 | #include <linux/sched.h> | 22 | #include <linux/sched/signal.h> |
23 | #include <linux/spinlock.h> | 23 | #include <linux/spinlock.h> |
24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
25 | #include <linux/vmalloc.h> | 25 | #include <linux/vmalloc.h> |
diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c index 85ae3669aa66..e3fff8f64d37 100644 --- a/drivers/media/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb-core/dvb_frontend.c | |||
@@ -29,7 +29,7 @@ | |||
29 | 29 | ||
30 | #include <linux/string.h> | 30 | #include <linux/string.h> |
31 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
32 | #include <linux/sched.h> | 32 | #include <linux/sched/signal.h> |
33 | #include <linux/wait.h> | 33 | #include <linux/wait.h> |
34 | #include <linux/slab.h> | 34 | #include <linux/slab.h> |
35 | #include <linux/poll.h> | 35 | #include <linux/poll.h> |
diff --git a/drivers/media/pci/cx18/cx18-driver.h b/drivers/media/pci/cx18/cx18-driver.h index fef3c736fcba..7be2088c45fe 100644 --- a/drivers/media/pci/cx18/cx18-driver.h +++ b/drivers/media/pci/cx18/cx18-driver.h | |||
@@ -24,7 +24,7 @@ | |||
24 | #include <linux/moduleparam.h> | 24 | #include <linux/moduleparam.h> |
25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
26 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
27 | #include <linux/sched.h> | 27 | #include <linux/sched/signal.h> |
28 | #include <linux/fs.h> | 28 | #include <linux/fs.h> |
29 | #include <linux/pci.h> | 29 | #include <linux/pci.h> |
30 | #include <linux/interrupt.h> | 30 | #include <linux/interrupt.h> |
diff --git a/drivers/media/pci/ivtv/ivtv-driver.c b/drivers/media/pci/ivtv/ivtv-driver.c index ab2ae53618e8..e73c153285f0 100644 --- a/drivers/media/pci/ivtv/ivtv-driver.c +++ b/drivers/media/pci/ivtv/ivtv-driver.c | |||
@@ -59,6 +59,7 @@ | |||
59 | #include <media/tveeprom.h> | 59 | #include <media/tveeprom.h> |
60 | #include <media/i2c/saa7115.h> | 60 | #include <media/i2c/saa7115.h> |
61 | #include "tuner-xc2028.h" | 61 | #include "tuner-xc2028.h" |
62 | #include <uapi/linux/sched/types.h> | ||
62 | 63 | ||
63 | /* If you have already X v4l cards, then set this to X. This way | 64 | /* If you have already X v4l cards, then set this to X. This way |
64 | the device numbers stay matched. Example: you have a WinTV card | 65 | the device numbers stay matched. Example: you have a WinTV card |
diff --git a/drivers/media/pci/ivtv/ivtv-driver.h b/drivers/media/pci/ivtv/ivtv-driver.h index cde452e30746..d27c5c2c07ea 100644 --- a/drivers/media/pci/ivtv/ivtv-driver.h +++ b/drivers/media/pci/ivtv/ivtv-driver.h | |||
@@ -38,37 +38,38 @@ | |||
38 | * using information provided by Jiun-Kuei Jung @ AVerMedia. | 38 | * using information provided by Jiun-Kuei Jung @ AVerMedia. |
39 | */ | 39 | */ |
40 | 40 | ||
41 | #include <asm/byteorder.h> | 41 | #include <linux/module.h> |
42 | #include <linux/init.h> | ||
42 | #include <linux/delay.h> | 43 | #include <linux/delay.h> |
43 | #include <linux/device.h> | 44 | #include <linux/sched/signal.h> |
44 | #include <linux/fs.h> | 45 | #include <linux/fs.h> |
46 | #include <linux/pci.h> | ||
47 | #include <linux/interrupt.h> | ||
48 | #include <linux/spinlock.h> | ||
45 | #include <linux/i2c.h> | 49 | #include <linux/i2c.h> |
46 | #include <linux/i2c-algo-bit.h> | 50 | #include <linux/i2c-algo-bit.h> |
47 | #include <linux/init.h> | ||
48 | #include <linux/interrupt.h> | ||
49 | #include <linux/ivtv.h> | ||
50 | #include <linux/kernel.h> | ||
51 | #include <linux/kthread.h> | ||
52 | #include <linux/list.h> | 51 | #include <linux/list.h> |
53 | #include <linux/module.h> | 52 | #include <linux/unistd.h> |
54 | #include <linux/mutex.h> | ||
55 | #include <linux/pagemap.h> | 53 | #include <linux/pagemap.h> |
56 | #include <linux/pci.h> | ||
57 | #include <linux/scatterlist.h> | 54 | #include <linux/scatterlist.h> |
58 | #include <linux/sched.h> | 55 | #include <linux/kthread.h> |
56 | #include <linux/mutex.h> | ||
59 | #include <linux/slab.h> | 57 | #include <linux/slab.h> |
60 | #include <linux/spinlock.h> | ||
61 | #include <linux/uaccess.h> | 58 | #include <linux/uaccess.h> |
62 | #include <linux/unistd.h> | 59 | #include <asm/byteorder.h> |
63 | 60 | ||
64 | #include <media/drv-intf/cx2341x.h> | 61 | #include <linux/dvb/video.h> |
65 | #include <media/i2c/ir-kbd-i2c.h> | 62 | #include <linux/dvb/audio.h> |
66 | #include <media/tuner.h> | ||
67 | #include <media/v4l2-common.h> | 63 | #include <media/v4l2-common.h> |
64 | #include <media/v4l2-ioctl.h> | ||
68 | #include <media/v4l2-ctrls.h> | 65 | #include <media/v4l2-ctrls.h> |
69 | #include <media/v4l2-device.h> | 66 | #include <media/v4l2-device.h> |
70 | #include <media/v4l2-fh.h> | 67 | #include <media/v4l2-fh.h> |
71 | #include <media/v4l2-ioctl.h> | 68 | #include <media/tuner.h> |
69 | #include <media/drv-intf/cx2341x.h> | ||
70 | #include <media/i2c/ir-kbd-i2c.h> | ||
71 | |||
72 | #include <linux/ivtv.h> | ||
72 | 73 | ||
73 | /* Memory layout */ | 74 | /* Memory layout */ |
74 | #define IVTV_ENCODER_OFFSET 0x00000000 | 75 | #define IVTV_ENCODER_OFFSET 0x00000000 |
diff --git a/drivers/media/pci/pt1/pt1.c b/drivers/media/pci/pt1/pt1.c index da1eebd2016f..3219d2f3271e 100644 --- a/drivers/media/pci/pt1/pt1.c +++ b/drivers/media/pci/pt1/pt1.c | |||
@@ -18,6 +18,7 @@ | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/sched/signal.h> | ||
21 | #include <linux/module.h> | 22 | #include <linux/module.h> |
22 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
23 | #include <linux/vmalloc.h> | 24 | #include <linux/vmalloc.h> |
diff --git a/drivers/media/pci/pt3/pt3.c b/drivers/media/pci/pt3/pt3.c index 77f4d15f322b..e8b5d0992157 100644 --- a/drivers/media/pci/pt3/pt3.c +++ b/drivers/media/pci/pt3/pt3.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/pci.h> | 22 | #include <linux/pci.h> |
23 | #include <linux/string.h> | 23 | #include <linux/string.h> |
24 | #include <linux/sched/signal.h> | ||
24 | 25 | ||
25 | #include "dmxdev.h" | 26 | #include "dmxdev.h" |
26 | #include "dvbdev.h" | 27 | #include "dvbdev.h" |
diff --git a/drivers/media/pci/solo6x10/solo6x10-i2c.c b/drivers/media/pci/solo6x10/solo6x10-i2c.c index c908672b2c40..e83bb79f9349 100644 --- a/drivers/media/pci/solo6x10/solo6x10-i2c.c +++ b/drivers/media/pci/solo6x10/solo6x10-i2c.c | |||
@@ -27,6 +27,7 @@ | |||
27 | * thread context, ACK the interrupt, and move on. -- BenC */ | 27 | * thread context, ACK the interrupt, and move on. -- BenC */ |
28 | 28 | ||
29 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
30 | #include <linux/sched/signal.h> | ||
30 | 31 | ||
31 | #include "solo6x10.h" | 32 | #include "solo6x10.h" |
32 | 33 | ||
diff --git a/drivers/media/pci/zoran/zoran_device.c b/drivers/media/pci/zoran/zoran_device.c index 671907a6e6b6..40adceebca7e 100644 --- a/drivers/media/pci/zoran/zoran_device.c +++ b/drivers/media/pci/zoran/zoran_device.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/vmalloc.h> | 29 | #include <linux/vmalloc.h> |
30 | #include <linux/ktime.h> | 30 | #include <linux/ktime.h> |
31 | #include <linux/sched/signal.h> | ||
31 | 32 | ||
32 | #include <linux/interrupt.h> | 33 | #include <linux/interrupt.h> |
33 | #include <linux/proc_fs.h> | 34 | #include <linux/proc_fs.h> |
diff --git a/drivers/media/platform/vivid/vivid-radio-rx.c b/drivers/media/platform/vivid/vivid-radio-rx.c index f99092ca8f5c..47c36c26096b 100644 --- a/drivers/media/platform/vivid/vivid-radio-rx.c +++ b/drivers/media/platform/vivid/vivid-radio-rx.c | |||
@@ -22,6 +22,8 @@ | |||
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
23 | #include <linux/videodev2.h> | 23 | #include <linux/videodev2.h> |
24 | #include <linux/v4l2-dv-timings.h> | 24 | #include <linux/v4l2-dv-timings.h> |
25 | #include <linux/sched/signal.h> | ||
26 | |||
25 | #include <media/v4l2-common.h> | 27 | #include <media/v4l2-common.h> |
26 | #include <media/v4l2-event.h> | 28 | #include <media/v4l2-event.h> |
27 | #include <media/v4l2-dv-timings.h> | 29 | #include <media/v4l2-dv-timings.h> |
diff --git a/drivers/media/platform/vivid/vivid-radio-tx.c b/drivers/media/platform/vivid/vivid-radio-tx.c index 8c59d4f53200..0e8025b7b4dd 100644 --- a/drivers/media/platform/vivid/vivid-radio-tx.c +++ b/drivers/media/platform/vivid/vivid-radio-tx.c | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/sched/signal.h> | ||
22 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
23 | #include <linux/videodev2.h> | 24 | #include <linux/videodev2.h> |
24 | #include <linux/v4l2-dv-timings.h> | 25 | #include <linux/v4l2-dv-timings.h> |
diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c index a54ca531d8ef..393dccaabdd0 100644 --- a/drivers/media/rc/lirc_dev.c +++ b/drivers/media/rc/lirc_dev.c | |||
@@ -19,7 +19,7 @@ | |||
19 | 19 | ||
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/sched.h> | 22 | #include <linux/sched/signal.h> |
23 | #include <linux/errno.h> | 23 | #include <linux/errno.h> |
24 | #include <linux/ioctl.h> | 24 | #include <linux/ioctl.h> |
25 | #include <linux/fs.h> | 25 | #include <linux/fs.h> |
diff --git a/drivers/media/usb/cpia2/cpia2_core.c b/drivers/media/usb/cpia2/cpia2_core.c index 431dd0b4b332..b1d13444ff30 100644 --- a/drivers/media/usb/cpia2/cpia2_core.c +++ b/drivers/media/usb/cpia2/cpia2_core.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/mm.h> | 32 | #include <linux/mm.h> |
33 | #include <linux/vmalloc.h> | 33 | #include <linux/vmalloc.h> |
34 | #include <linux/firmware.h> | 34 | #include <linux/firmware.h> |
35 | #include <linux/sched/signal.h> | ||
35 | 36 | ||
36 | #define FIRMWARE "cpia2/stv0672_vp4.bin" | 37 | #define FIRMWARE "cpia2/stv0672_vp4.bin" |
37 | MODULE_FIRMWARE(FIRMWARE); | 38 | MODULE_FIRMWARE(FIRMWARE); |
diff --git a/drivers/media/usb/gspca/cpia1.c b/drivers/media/usb/gspca/cpia1.c index 23d3285f182a..e91d00762e94 100644 --- a/drivers/media/usb/gspca/cpia1.c +++ b/drivers/media/usb/gspca/cpia1.c | |||
@@ -27,6 +27,8 @@ | |||
27 | #define MODULE_NAME "cpia1" | 27 | #define MODULE_NAME "cpia1" |
28 | 28 | ||
29 | #include <linux/input.h> | 29 | #include <linux/input.h> |
30 | #include <linux/sched/signal.h> | ||
31 | |||
30 | #include "gspca.h" | 32 | #include "gspca.h" |
31 | 33 | ||
32 | MODULE_AUTHOR("Hans de Goede <hdegoede@redhat.com>"); | 34 | MODULE_AUTHOR("Hans de Goede <hdegoede@redhat.com>"); |
diff --git a/drivers/media/v4l2-core/videobuf-dma-sg.c b/drivers/media/v4l2-core/videobuf-dma-sg.c index 36bd904946bd..0b5c43f7e020 100644 --- a/drivers/media/v4l2-core/videobuf-dma-sg.c +++ b/drivers/media/v4l2-core/videobuf-dma-sg.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/moduleparam.h> | 23 | #include <linux/moduleparam.h> |
24 | #include <linux/sched.h> | 24 | #include <linux/sched/mm.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
27 | 27 | ||
diff --git a/drivers/misc/cxl/fault.c b/drivers/misc/cxl/fault.c index 377e650a2a1d..2fa015c05561 100644 --- a/drivers/misc/cxl/fault.c +++ b/drivers/misc/cxl/fault.c | |||
@@ -8,7 +8,8 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/workqueue.h> | 10 | #include <linux/workqueue.h> |
11 | #include <linux/sched.h> | 11 | #include <linux/sched/signal.h> |
12 | #include <linux/sched/mm.h> | ||
12 | #include <linux/pid.h> | 13 | #include <linux/pid.h> |
13 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
14 | #include <linux/moduleparam.h> | 15 | #include <linux/moduleparam.h> |
diff --git a/drivers/misc/cxl/file.c b/drivers/misc/cxl/file.c index 859959f19f10..e7139c76f961 100644 --- a/drivers/misc/cxl/file.c +++ b/drivers/misc/cxl/file.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <linux/export.h> | 12 | #include <linux/export.h> |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/bitmap.h> | 14 | #include <linux/bitmap.h> |
15 | #include <linux/sched.h> | 15 | #include <linux/sched/signal.h> |
16 | #include <linux/poll.h> | 16 | #include <linux/poll.h> |
17 | #include <linux/pid.h> | 17 | #include <linux/pid.h> |
18 | #include <linux/fs.h> | 18 | #include <linux/fs.h> |
diff --git a/drivers/misc/cxl/main.c b/drivers/misc/cxl/main.c index cc1706a92ace..b0b6ed31918e 100644 --- a/drivers/misc/cxl/main.c +++ b/drivers/misc/cxl/main.c | |||
@@ -19,6 +19,8 @@ | |||
19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | #include <linux/idr.h> | 20 | #include <linux/idr.h> |
21 | #include <linux/pci.h> | 21 | #include <linux/pci.h> |
22 | #include <linux/sched/task.h> | ||
23 | |||
22 | #include <asm/cputable.h> | 24 | #include <asm/cputable.h> |
23 | #include <misc/cxl-base.h> | 25 | #include <misc/cxl-base.h> |
24 | 26 | ||
diff --git a/drivers/misc/cxl/native.c b/drivers/misc/cxl/native.c index 09505f432eda..7ae710585267 100644 --- a/drivers/misc/cxl/native.c +++ b/drivers/misc/cxl/native.c | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/spinlock.h> | 10 | #include <linux/spinlock.h> |
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <linux/sched/clock.h> | ||
12 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
13 | #include <linux/mutex.h> | 14 | #include <linux/mutex.h> |
14 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
diff --git a/drivers/misc/eeprom/eeprom.c b/drivers/misc/eeprom/eeprom.c index 3d1d55157e5f..2fad790db3bf 100644 --- a/drivers/misc/eeprom/eeprom.c +++ b/drivers/misc/eeprom/eeprom.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/device.h> | 21 | #include <linux/device.h> |
22 | #include <linux/capability.h> | ||
22 | #include <linux/jiffies.h> | 23 | #include <linux/jiffies.h> |
23 | #include <linux/i2c.h> | 24 | #include <linux/i2c.h> |
24 | #include <linux/mutex.h> | 25 | #include <linux/mutex.h> |
diff --git a/drivers/misc/genwqe/card_dev.c b/drivers/misc/genwqe/card_dev.c index cb290b8ca0c8..dd4617764f14 100644 --- a/drivers/misc/genwqe/card_dev.c +++ b/drivers/misc/genwqe/card_dev.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include <linux/pci.h> | 29 | #include <linux/pci.h> |
30 | #include <linux/string.h> | 30 | #include <linux/string.h> |
31 | #include <linux/fs.h> | 31 | #include <linux/fs.h> |
32 | #include <linux/sched.h> | 32 | #include <linux/sched/signal.h> |
33 | #include <linux/wait.h> | 33 | #include <linux/wait.h> |
34 | #include <linux/delay.h> | 34 | #include <linux/delay.h> |
35 | #include <linux/atomic.h> | 35 | #include <linux/atomic.h> |
diff --git a/drivers/misc/ibmasm/r_heartbeat.c b/drivers/misc/ibmasm/r_heartbeat.c index 232034f5da48..5c7dd26db716 100644 --- a/drivers/misc/ibmasm/r_heartbeat.c +++ b/drivers/misc/ibmasm/r_heartbeat.c | |||
@@ -20,7 +20,7 @@ | |||
20 | * | 20 | * |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/sched.h> | 23 | #include <linux/sched/signal.h> |
24 | #include "ibmasm.h" | 24 | #include "ibmasm.h" |
25 | #include "dot_command.h" | 25 | #include "dot_command.h" |
26 | 26 | ||
diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c index 99635dd9dbac..fc7efedbc4be 100644 --- a/drivers/misc/kgdbts.c +++ b/drivers/misc/kgdbts.c | |||
@@ -103,6 +103,8 @@ | |||
103 | #include <linux/delay.h> | 103 | #include <linux/delay.h> |
104 | #include <linux/kthread.h> | 104 | #include <linux/kthread.h> |
105 | #include <linux/module.h> | 105 | #include <linux/module.h> |
106 | #include <linux/sched/task.h> | ||
107 | |||
106 | #include <asm/sections.h> | 108 | #include <asm/sections.h> |
107 | 109 | ||
108 | #define v1printk(a...) do { \ | 110 | #define v1printk(a...) do { \ |
diff --git a/drivers/misc/lis3lv02d/lis3lv02d.c b/drivers/misc/lis3lv02d/lis3lv02d.c index fb8705fc3aca..e389b0b5278d 100644 --- a/drivers/misc/lis3lv02d/lis3lv02d.c +++ b/drivers/misc/lis3lv02d/lis3lv02d.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | 23 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
24 | 24 | ||
25 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
26 | #include <linux/sched/signal.h> | ||
26 | #include <linux/dmi.h> | 27 | #include <linux/dmi.h> |
27 | #include <linux/module.h> | 28 | #include <linux/module.h> |
28 | #include <linux/types.h> | 29 | #include <linux/types.h> |
diff --git a/drivers/misc/lkdtm_heap.c b/drivers/misc/lkdtm_heap.c index 0f1581664c1c..ffb6aeac07b3 100644 --- a/drivers/misc/lkdtm_heap.c +++ b/drivers/misc/lkdtm_heap.c | |||
@@ -4,6 +4,7 @@ | |||
4 | */ | 4 | */ |
5 | #include "lkdtm.h" | 5 | #include "lkdtm.h" |
6 | #include <linux/slab.h> | 6 | #include <linux/slab.h> |
7 | #include <linux/sched.h> | ||
7 | 8 | ||
8 | /* | 9 | /* |
9 | * This tries to stay within the next largest power-of-2 kmalloc cache | 10 | * This tries to stay within the next largest power-of-2 kmalloc cache |
diff --git a/drivers/misc/lkdtm_usercopy.c b/drivers/misc/lkdtm_usercopy.c index 1dd611423d8b..df6ac985fbb5 100644 --- a/drivers/misc/lkdtm_usercopy.c +++ b/drivers/misc/lkdtm_usercopy.c | |||
@@ -5,6 +5,7 @@ | |||
5 | #include "lkdtm.h" | 5 | #include "lkdtm.h" |
6 | #include <linux/slab.h> | 6 | #include <linux/slab.h> |
7 | #include <linux/vmalloc.h> | 7 | #include <linux/vmalloc.h> |
8 | #include <linux/sched/task_stack.h> | ||
8 | #include <linux/mman.h> | 9 | #include <linux/mman.h> |
9 | #include <linux/uaccess.h> | 10 | #include <linux/uaccess.h> |
10 | #include <asm/cacheflush.h> | 11 | #include <asm/cacheflush.h> |
diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c index cb3e9e0ca049..df5f78ae3d25 100644 --- a/drivers/misc/mei/bus.c +++ b/drivers/misc/mei/bus.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/device.h> | 17 | #include <linux/device.h> |
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched/signal.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/errno.h> | 21 | #include <linux/errno.h> |
22 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c index 68fe37b5bc52..d3e3372424d6 100644 --- a/drivers/misc/mei/client.c +++ b/drivers/misc/mei/client.c | |||
@@ -14,7 +14,7 @@ | |||
14 | * | 14 | * |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/sched.h> | 17 | #include <linux/sched/signal.h> |
18 | #include <linux/wait.h> | 18 | #include <linux/wait.h> |
19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
20 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c index 9d0b7050c79a..bf816449cd40 100644 --- a/drivers/misc/mei/main.c +++ b/drivers/misc/mei/main.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
27 | #include <linux/ioctl.h> | 27 | #include <linux/ioctl.h> |
28 | #include <linux/cdev.h> | 28 | #include <linux/cdev.h> |
29 | #include <linux/sched.h> | 29 | #include <linux/sched/signal.h> |
30 | #include <linux/uuid.h> | 30 | #include <linux/uuid.h> |
31 | #include <linux/compat.h> | 31 | #include <linux/compat.h> |
32 | #include <linux/jiffies.h> | 32 | #include <linux/jiffies.h> |
diff --git a/drivers/misc/mic/cosm/cosm_scif_server.c b/drivers/misc/mic/cosm/cosm_scif_server.c index 5696df4326b5..85f7d09cc65f 100644 --- a/drivers/misc/mic/cosm/cosm_scif_server.c +++ b/drivers/misc/mic/cosm/cosm_scif_server.c | |||
@@ -19,6 +19,8 @@ | |||
19 | * | 19 | * |
20 | */ | 20 | */ |
21 | #include <linux/kthread.h> | 21 | #include <linux/kthread.h> |
22 | #include <linux/sched/signal.h> | ||
23 | |||
22 | #include "cosm_main.h" | 24 | #include "cosm_main.h" |
23 | 25 | ||
24 | /* | 26 | /* |
diff --git a/drivers/misc/mic/cosm_client/cosm_scif_client.c b/drivers/misc/mic/cosm_client/cosm_scif_client.c index 03e98bf1ac15..aa530fcceaa9 100644 --- a/drivers/misc/mic/cosm_client/cosm_scif_client.c +++ b/drivers/misc/mic/cosm_client/cosm_scif_client.c | |||
@@ -22,6 +22,8 @@ | |||
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
23 | #include <linux/reboot.h> | 23 | #include <linux/reboot.h> |
24 | #include <linux/kthread.h> | 24 | #include <linux/kthread.h> |
25 | #include <linux/sched/signal.h> | ||
26 | |||
25 | #include "../cosm/cosm_main.h" | 27 | #include "../cosm/cosm_main.h" |
26 | 28 | ||
27 | #define COSM_SCIF_MAX_RETRIES 10 | 29 | #define COSM_SCIF_MAX_RETRIES 10 |
diff --git a/drivers/misc/mic/scif/scif_main.h b/drivers/misc/mic/scif/scif_main.h index a08f0b600a9e..0e5eff9ad080 100644 --- a/drivers/misc/mic/scif/scif_main.h +++ b/drivers/misc/mic/scif/scif_main.h | |||
@@ -18,7 +18,7 @@ | |||
18 | #ifndef SCIF_MAIN_H | 18 | #ifndef SCIF_MAIN_H |
19 | #define SCIF_MAIN_H | 19 | #define SCIF_MAIN_H |
20 | 20 | ||
21 | #include <linux/sched.h> | 21 | #include <linux/sched/signal.h> |
22 | #include <linux/pci.h> | 22 | #include <linux/pci.h> |
23 | #include <linux/miscdevice.h> | 23 | #include <linux/miscdevice.h> |
24 | #include <linux/dmaengine.h> | 24 | #include <linux/dmaengine.h> |
diff --git a/drivers/misc/mic/scif/scif_rma.c b/drivers/misc/mic/scif/scif_rma.c index f806a4471eb9..329727e00e97 100644 --- a/drivers/misc/mic/scif/scif_rma.c +++ b/drivers/misc/mic/scif/scif_rma.c | |||
@@ -17,6 +17,9 @@ | |||
17 | */ | 17 | */ |
18 | #include <linux/dma_remapping.h> | 18 | #include <linux/dma_remapping.h> |
19 | #include <linux/pagemap.h> | 19 | #include <linux/pagemap.h> |
20 | #include <linux/sched/mm.h> | ||
21 | #include <linux/sched/signal.h> | ||
22 | |||
20 | #include "scif_main.h" | 23 | #include "scif_main.h" |
21 | #include "scif_map.h" | 24 | #include "scif_map.h" |
22 | 25 | ||
diff --git a/drivers/misc/vexpress-syscfg.c b/drivers/misc/vexpress-syscfg.c index c344483fa7d6..2cde80c7bb93 100644 --- a/drivers/misc/vexpress-syscfg.c +++ b/drivers/misc/vexpress-syscfg.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/of.h> | 17 | #include <linux/of.h> |
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched/signal.h> |
20 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
21 | #include <linux/syscore_ops.h> | 21 | #include <linux/syscore_ops.h> |
22 | #include <linux/vexpress.h> | 22 | #include <linux/vexpress.h> |
diff --git a/drivers/misc/vmw_vmci/vmci_context.c b/drivers/misc/vmw_vmci/vmci_context.c index f35f0c8606b9..21d0fa592145 100644 --- a/drivers/misc/vmw_vmci/vmci_context.c +++ b/drivers/misc/vmw_vmci/vmci_context.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
22 | #include <linux/cred.h> | ||
22 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
23 | 24 | ||
24 | #include "vmci_queue_pair.h" | 25 | #include "vmci_queue_pair.h" |
diff --git a/drivers/misc/vmw_vmci/vmci_event.c b/drivers/misc/vmw_vmci/vmci_event.c index 8449516d6ac6..84258a48029d 100644 --- a/drivers/misc/vmw_vmci/vmci_event.c +++ b/drivers/misc/vmw_vmci/vmci_event.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | #include <linux/rculist.h> | ||
22 | 23 | ||
23 | #include "vmci_driver.h" | 24 | #include "vmci_driver.h" |
24 | #include "vmci_event.h" | 25 | #include "vmci_event.h" |
diff --git a/drivers/misc/vmw_vmci/vmci_host.c b/drivers/misc/vmw_vmci/vmci_host.c index ec090105eb4b..8a16a26e9658 100644 --- a/drivers/misc/vmw_vmci/vmci_host.c +++ b/drivers/misc/vmw_vmci/vmci_host.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/mutex.h> | 25 | #include <linux/mutex.h> |
26 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
27 | #include <linux/cred.h> | ||
27 | #include <linux/slab.h> | 28 | #include <linux/slab.h> |
28 | #include <linux/file.h> | 29 | #include <linux/file.h> |
29 | #include <linux/init.h> | 30 | #include <linux/init.h> |
diff --git a/drivers/misc/vmw_vmci/vmci_resource.c b/drivers/misc/vmw_vmci/vmci_resource.c index 9a53a30de445..1ab6e8737a5f 100644 --- a/drivers/misc/vmw_vmci/vmci_resource.c +++ b/drivers/misc/vmw_vmci/vmci_resource.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/hash.h> | 17 | #include <linux/hash.h> |
18 | #include <linux/types.h> | 18 | #include <linux/types.h> |
19 | #include <linux/rculist.h> | 19 | #include <linux/rculist.h> |
20 | #include <linux/completion.h> | ||
20 | 21 | ||
21 | #include "vmci_resource.h" | 22 | #include "vmci_resource.h" |
22 | #include "vmci_driver.h" | 23 | #include "vmci_driver.h" |
diff --git a/drivers/mmc/core/sdio_irq.c b/drivers/mmc/core/sdio_irq.c index d29faf2addfe..6d4b72080d51 100644 --- a/drivers/mmc/core/sdio_irq.c +++ b/drivers/mmc/core/sdio_irq.c | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
18 | #include <uapi/linux/sched/types.h> | ||
18 | #include <linux/kthread.h> | 19 | #include <linux/kthread.h> |
19 | #include <linux/export.h> | 20 | #include <linux/export.h> |
20 | #include <linux/wait.h> | 21 | #include <linux/wait.h> |
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c index 6c062b8251d2..d52139635b67 100644 --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | #include <linux/clk.h> | 21 | #include <linux/clk.h> |
22 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
23 | #include <linux/sched/task_stack.h> | ||
23 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
24 | #include <linux/module.h> | 25 | #include <linux/module.h> |
25 | #include <linux/mtd/partitions.h> | 26 | #include <linux/mtd/partitions.h> |
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 1492c12906f6..b0524f8accb6 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/sched.h> | 36 | #include <linux/sched.h> |
37 | #include <linux/slab.h> | 37 | #include <linux/slab.h> |
38 | #include <linux/mm.h> | 38 | #include <linux/mm.h> |
39 | #include <linux/nmi.h> | ||
39 | #include <linux/types.h> | 40 | #include <linux/types.h> |
40 | #include <linux/mtd/mtd.h> | 41 | #include <linux/mtd/mtd.h> |
41 | #include <linux/mtd/nand.h> | 42 | #include <linux/mtd/nand.h> |
diff --git a/drivers/mtd/tests/mtd_test.h b/drivers/mtd/tests/mtd_test.h index 4b7bee17c924..04afd0e7074f 100644 --- a/drivers/mtd/tests/mtd_test.h +++ b/drivers/mtd/tests/mtd_test.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #include <linux/mtd/mtd.h> | 1 | #include <linux/mtd/mtd.h> |
2 | #include <linux/sched.h> | 2 | #include <linux/sched/signal.h> |
3 | 3 | ||
4 | static inline int mtdtest_relax(void) | 4 | static inline int mtdtest_relax(void) |
5 | { | 5 | { |
diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c index 577e57cad1dc..1bcbb8913e17 100644 --- a/drivers/net/bonding/bond_options.c +++ b/drivers/net/bonding/bond_options.c | |||
@@ -16,6 +16,8 @@ | |||
16 | #include <linux/rcupdate.h> | 16 | #include <linux/rcupdate.h> |
17 | #include <linux/ctype.h> | 17 | #include <linux/ctype.h> |
18 | #include <linux/inet.h> | 18 | #include <linux/inet.h> |
19 | #include <linux/sched/signal.h> | ||
20 | |||
19 | #include <net/bonding.h> | 21 | #include <net/bonding.h> |
20 | 22 | ||
21 | static int bond_option_active_slave_set(struct bonding *bond, | 23 | static int bond_option_active_slave_set(struct bonding *bond, |
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c index e23c3ed737de..770623a0cc01 100644 --- a/drivers/net/bonding/bond_sysfs.c +++ b/drivers/net/bonding/bond_sysfs.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/device.h> | 26 | #include <linux/device.h> |
27 | #include <linux/sched.h> | 27 | #include <linux/sched/signal.h> |
28 | #include <linux/fs.h> | 28 | #include <linux/fs.h> |
29 | #include <linux/types.h> | 29 | #include <linux/types.h> |
30 | #include <linux/string.h> | 30 | #include <linux/string.h> |
diff --git a/drivers/net/can/softing/softing_fw.c b/drivers/net/can/softing/softing_fw.c index 4063215c9b54..aac58ce6e371 100644 --- a/drivers/net/can/softing/softing_fw.c +++ b/drivers/net/can/softing/softing_fw.c | |||
@@ -17,7 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/firmware.h> | 19 | #include <linux/firmware.h> |
20 | #include <linux/sched.h> | 20 | #include <linux/sched/signal.h> |
21 | #include <asm/div64.h> | 21 | #include <asm/div64.h> |
22 | #include <asm/io.h> | 22 | #include <asm/io.h> |
23 | 23 | ||
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index a448177990fe..30d1eb9ebec9 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/moduleparam.h> | 20 | #include <linux/moduleparam.h> |
21 | #include <linux/stringify.h> | 21 | #include <linux/stringify.h> |
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/sched/signal.h> | ||
23 | #include <linux/types.h> | 24 | #include <linux/types.h> |
24 | #include <linux/compiler.h> | 25 | #include <linux/compiler.h> |
25 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
diff --git a/drivers/net/ethernet/cavium/liquidio/octeon_main.h b/drivers/net/ethernet/cavium/liquidio/octeon_main.h index 8cd389148166..aa36e9ae7676 100644 --- a/drivers/net/ethernet/cavium/liquidio/octeon_main.h +++ b/drivers/net/ethernet/cavium/liquidio/octeon_main.h | |||
@@ -23,6 +23,8 @@ | |||
23 | #ifndef _OCTEON_MAIN_H_ | 23 | #ifndef _OCTEON_MAIN_H_ |
24 | #define _OCTEON_MAIN_H_ | 24 | #define _OCTEON_MAIN_H_ |
25 | 25 | ||
26 | #include <linux/sched/signal.h> | ||
27 | |||
26 | #if BITS_PER_LONG == 32 | 28 | #if BITS_PER_LONG == 32 |
27 | #define CVM_CAST64(v) ((long long)(v)) | 29 | #define CVM_CAST64(v) ((long long)(v)) |
28 | #elif BITS_PER_LONG == 64 | 30 | #elif BITS_PER_LONG == 64 |
diff --git a/drivers/net/ethernet/sfc/falcon/falcon.c b/drivers/net/ethernet/sfc/falcon/falcon.c index c6ff0cc5ef18..93c713c1f627 100644 --- a/drivers/net/ethernet/sfc/falcon/falcon.c +++ b/drivers/net/ethernet/sfc/falcon/falcon.c | |||
@@ -16,6 +16,8 @@ | |||
16 | #include <linux/i2c.h> | 16 | #include <linux/i2c.h> |
17 | #include <linux/mii.h> | 17 | #include <linux/mii.h> |
18 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
19 | #include <linux/sched/signal.h> | ||
20 | |||
19 | #include "net_driver.h" | 21 | #include "net_driver.h" |
20 | #include "bitfield.h" | 22 | #include "bitfield.h" |
21 | #include "efx.h" | 23 | #include "efx.h" |
diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c index 6e8f616be48e..1dba16bc7f8d 100644 --- a/drivers/net/irda/pxaficp_ir.c +++ b/drivers/net/irda/pxaficp_ir.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/dma/pxa-dma.h> | 24 | #include <linux/dma/pxa-dma.h> |
25 | #include <linux/gpio.h> | 25 | #include <linux/gpio.h> |
26 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
27 | #include <linux/sched/clock.h> | ||
27 | 28 | ||
28 | #include <net/irda/irda.h> | 29 | #include <net/irda/irda.h> |
29 | #include <net/irda/irmod.h> | 30 | #include <net/irda/irmod.h> |
diff --git a/drivers/net/irda/stir4200.c b/drivers/net/irda/stir4200.c index 42da094b68dd..7ee514879531 100644 --- a/drivers/net/irda/stir4200.c +++ b/drivers/net/irda/stir4200.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/moduleparam.h> | 40 | #include <linux/moduleparam.h> |
41 | 41 | ||
42 | #include <linux/kernel.h> | 42 | #include <linux/kernel.h> |
43 | #include <linux/sched/signal.h> | ||
43 | #include <linux/ktime.h> | 44 | #include <linux/ktime.h> |
44 | #include <linux/types.h> | 45 | #include <linux/types.h> |
45 | #include <linux/time.h> | 46 | #include <linux/time.h> |
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c index a4bfc10b61dd..da85057680d6 100644 --- a/drivers/net/macvtap.c +++ b/drivers/net/macvtap.c | |||
@@ -9,7 +9,7 @@ | |||
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/skbuff.h> | 10 | #include <linux/skbuff.h> |
11 | #include <linux/cache.h> | 11 | #include <linux/cache.h> |
12 | #include <linux/sched.h> | 12 | #include <linux/sched/signal.h> |
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
14 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
15 | #include <linux/wait.h> | 15 | #include <linux/wait.h> |
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c index a411b43a69eb..f9c0e62716ea 100644 --- a/drivers/net/ppp/ppp_generic.c +++ b/drivers/net/ppp/ppp_generic.c | |||
@@ -24,6 +24,7 @@ | |||
24 | 24 | ||
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/sched/signal.h> | ||
27 | #include <linux/kmod.h> | 28 | #include <linux/kmod.h> |
28 | #include <linux/init.h> | 29 | #include <linux/init.h> |
29 | #include <linux/list.h> | 30 | #include <linux/list.h> |
diff --git a/drivers/net/slip/slip.c b/drivers/net/slip/slip.c index 08db4d687533..1da31dc47f86 100644 --- a/drivers/net/slip/slip.c +++ b/drivers/net/slip/slip.c | |||
@@ -66,7 +66,7 @@ | |||
66 | 66 | ||
67 | #include <linux/uaccess.h> | 67 | #include <linux/uaccess.h> |
68 | #include <linux/bitops.h> | 68 | #include <linux/bitops.h> |
69 | #include <linux/sched.h> | 69 | #include <linux/sched/signal.h> |
70 | #include <linux/string.h> | 70 | #include <linux/string.h> |
71 | #include <linux/mm.h> | 71 | #include <linux/mm.h> |
72 | #include <linux/interrupt.h> | 72 | #include <linux/interrupt.h> |
diff --git a/drivers/net/tap.c b/drivers/net/tap.c index 35b55a2fa1a1..4d4173d25dd0 100644 --- a/drivers/net/tap.c +++ b/drivers/net/tap.c | |||
@@ -8,7 +8,7 @@ | |||
8 | #include <linux/module.h> | 8 | #include <linux/module.h> |
9 | #include <linux/skbuff.h> | 9 | #include <linux/skbuff.h> |
10 | #include <linux/cache.h> | 10 | #include <linux/cache.h> |
11 | #include <linux/sched.h> | 11 | #include <linux/sched/signal.h> |
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
14 | #include <linux/wait.h> | 14 | #include <linux/wait.h> |
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 30863e378925..dc1b1dd9157c 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/module.h> | 44 | #include <linux/module.h> |
45 | #include <linux/errno.h> | 45 | #include <linux/errno.h> |
46 | #include <linux/kernel.h> | 46 | #include <linux/kernel.h> |
47 | #include <linux/sched/signal.h> | ||
47 | #include <linux/major.h> | 48 | #include <linux/major.h> |
48 | #include <linux/slab.h> | 49 | #include <linux/slab.h> |
49 | #include <linux/poll.h> | 50 | #include <linux/poll.h> |
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index e7b516342678..4f2e8141dbe2 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c | |||
@@ -52,7 +52,7 @@ | |||
52 | 52 | ||
53 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | 53 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
54 | 54 | ||
55 | #include <linux/sched.h> | 55 | #include <linux/sched/signal.h> |
56 | #include <linux/slab.h> | 56 | #include <linux/slab.h> |
57 | #include <linux/init.h> | 57 | #include <linux/init.h> |
58 | #include <linux/delay.h> | 58 | #include <linux/delay.h> |
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c index 24d5272cdce5..805674550683 100644 --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/sched/signal.h> | ||
14 | #include <linux/netdevice.h> | 15 | #include <linux/netdevice.h> |
15 | #include <linux/ethtool.h> | 16 | #include <linux/ethtool.h> |
16 | #include <linux/etherdevice.h> | 17 | #include <linux/etherdevice.h> |
diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c index 087eb266601f..4ca71bca39ac 100644 --- a/drivers/net/wan/cosa.c +++ b/drivers/net/wan/cosa.c | |||
@@ -78,7 +78,7 @@ | |||
78 | 78 | ||
79 | #include <linux/module.h> | 79 | #include <linux/module.h> |
80 | #include <linux/kernel.h> | 80 | #include <linux/kernel.h> |
81 | #include <linux/sched.h> | 81 | #include <linux/sched/signal.h> |
82 | #include <linux/slab.h> | 82 | #include <linux/slab.h> |
83 | #include <linux/poll.h> | 83 | #include <linux/poll.h> |
84 | #include <linux/fs.h> | 84 | #include <linux/fs.h> |
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index b7fe0af4cb24..363b30a549c2 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/moduleparam.h> | 20 | #include <linux/moduleparam.h> |
21 | #include <linux/inetdevice.h> | 21 | #include <linux/inetdevice.h> |
22 | #include <linux/export.h> | 22 | #include <linux/export.h> |
23 | #include <linux/sched/signal.h> | ||
23 | 24 | ||
24 | #include "core.h" | 25 | #include "core.h" |
25 | #include "cfg80211.h" | 26 | #include "cfg80211.h" |
diff --git a/drivers/net/wireless/broadcom/b43legacy/main.c b/drivers/net/wireless/broadcom/b43legacy/main.c index e97ab2b91663..cdafebb9c936 100644 --- a/drivers/net/wireless/broadcom/b43legacy/main.c +++ b/drivers/net/wireless/broadcom/b43legacy/main.c | |||
@@ -36,7 +36,7 @@ | |||
36 | #include <linux/etherdevice.h> | 36 | #include <linux/etherdevice.h> |
37 | #include <linux/firmware.h> | 37 | #include <linux/firmware.h> |
38 | #include <linux/workqueue.h> | 38 | #include <linux/workqueue.h> |
39 | #include <linux/sched.h> | 39 | #include <linux/sched/signal.h> |
40 | #include <linux/skbuff.h> | 40 | #include <linux/skbuff.h> |
41 | #include <linux/dma-mapping.h> | 41 | #include <linux/dma-mapping.h> |
42 | #include <linux/slab.h> | 42 | #include <linux/slab.h> |
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index c5744b45ec8f..65689469c5a1 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include <linux/pci_ids.h> | 22 | #include <linux/pci_ids.h> |
23 | #include <linux/netdevice.h> | 23 | #include <linux/netdevice.h> |
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
25 | #include <linux/sched.h> | 25 | #include <linux/sched/signal.h> |
26 | #include <linux/mmc/sdio.h> | 26 | #include <linux/mmc/sdio.h> |
27 | #include <linux/mmc/sdio_ids.h> | 27 | #include <linux/mmc/sdio_ids.h> |
28 | #include <linux/mmc/sdio_func.h> | 28 | #include <linux/mmc/sdio_func.h> |
diff --git a/drivers/net/wireless/intersil/hostap/hostap_hw.c b/drivers/net/wireless/intersil/hostap/hostap_hw.c index 544ef7adde7d..04dfd040a650 100644 --- a/drivers/net/wireless/intersil/hostap/hostap_hw.c +++ b/drivers/net/wireless/intersil/hostap/hostap_hw.c | |||
@@ -43,7 +43,7 @@ | |||
43 | #include <linux/delay.h> | 43 | #include <linux/delay.h> |
44 | #include <linux/random.h> | 44 | #include <linux/random.h> |
45 | #include <linux/wait.h> | 45 | #include <linux/wait.h> |
46 | #include <linux/sched.h> | 46 | #include <linux/sched/signal.h> |
47 | #include <linux/rtnetlink.h> | 47 | #include <linux/rtnetlink.h> |
48 | #include <linux/wireless.h> | 48 | #include <linux/wireless.h> |
49 | #include <net/iw_handler.h> | 49 | #include <net/iw_handler.h> |
diff --git a/drivers/net/wireless/intersil/hostap/hostap_ioctl.c b/drivers/net/wireless/intersil/hostap/hostap_ioctl.c index a5656bc0e6aa..b2c6b065b542 100644 --- a/drivers/net/wireless/intersil/hostap/hostap_ioctl.c +++ b/drivers/net/wireless/intersil/hostap/hostap_ioctl.c | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | #include <linux/slab.h> | 3 | #include <linux/slab.h> |
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/sched.h> | 5 | #include <linux/sched/signal.h> |
6 | #include <linux/ethtool.h> | 6 | #include <linux/ethtool.h> |
7 | #include <linux/if_arp.h> | 7 | #include <linux/if_arp.h> |
8 | #include <linux/module.h> | 8 | #include <linux/module.h> |
diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c index a2d326760a72..829b26cd4549 100644 --- a/drivers/net/xen-netback/interface.c +++ b/drivers/net/xen-netback/interface.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include "common.h" | 31 | #include "common.h" |
32 | 32 | ||
33 | #include <linux/kthread.h> | 33 | #include <linux/kthread.h> |
34 | #include <linux/sched/task.h> | ||
34 | #include <linux/ethtool.h> | 35 | #include <linux/ethtool.h> |
35 | #include <linux/rtnetlink.h> | 36 | #include <linux/rtnetlink.h> |
36 | #include <linux/if_vlan.h> | 37 | #include <linux/if_vlan.h> |
diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c index 94e524fea568..a7bcff45f437 100644 --- a/drivers/nvme/target/admin-cmd.c +++ b/drivers/nvme/target/admin-cmd.c | |||
@@ -13,6 +13,8 @@ | |||
13 | */ | 13 | */ |
14 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | 14 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/rculist.h> | ||
17 | |||
16 | #include <generated/utsrelease.h> | 18 | #include <generated/utsrelease.h> |
17 | #include <asm/unaligned.h> | 19 | #include <asm/unaligned.h> |
18 | #include "nvmet.h" | 20 | #include "nvmet.h" |
diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c index 5267ce20c12d..11b0a0a5f661 100644 --- a/drivers/nvme/target/core.c +++ b/drivers/nvme/target/core.c | |||
@@ -14,6 +14,8 @@ | |||
14 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | 14 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/random.h> | 16 | #include <linux/random.h> |
17 | #include <linux/rculist.h> | ||
18 | |||
17 | #include "nvmet.h" | 19 | #include "nvmet.h" |
18 | 20 | ||
19 | static struct nvmet_fabrics_ops *nvmet_transports[NVMF_TRTYPE_MAX]; | 21 | static struct nvmet_fabrics_ops *nvmet_transports[NVMF_TRTYPE_MAX]; |
diff --git a/drivers/oprofile/buffer_sync.c b/drivers/oprofile/buffer_sync.c index 642478d35e99..ac27f3d3fbb4 100644 --- a/drivers/oprofile/buffer_sync.c +++ b/drivers/oprofile/buffer_sync.c | |||
@@ -31,6 +31,8 @@ | |||
31 | #include <linux/fs.h> | 31 | #include <linux/fs.h> |
32 | #include <linux/oprofile.h> | 32 | #include <linux/oprofile.h> |
33 | #include <linux/sched.h> | 33 | #include <linux/sched.h> |
34 | #include <linux/sched/mm.h> | ||
35 | #include <linux/sched/task.h> | ||
34 | #include <linux/gfp.h> | 36 | #include <linux/gfp.h> |
35 | 37 | ||
36 | #include "oprofile_stats.h" | 38 | #include "oprofile_stats.h" |
diff --git a/drivers/oprofile/cpu_buffer.c b/drivers/oprofile/cpu_buffer.c index 0581461c3a67..eda2633a393d 100644 --- a/drivers/oprofile/cpu_buffer.c +++ b/drivers/oprofile/cpu_buffer.c | |||
@@ -23,6 +23,8 @@ | |||
23 | #include <linux/oprofile.h> | 23 | #include <linux/oprofile.h> |
24 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
25 | 25 | ||
26 | #include <asm/ptrace.h> | ||
27 | |||
26 | #include "event_buffer.h" | 28 | #include "event_buffer.h" |
27 | #include "cpu_buffer.h" | 29 | #include "cpu_buffer.h" |
28 | #include "buffer_sync.h" | 30 | #include "buffer_sync.h" |
diff --git a/drivers/oprofile/event_buffer.c b/drivers/oprofile/event_buffer.c index 67935fbbbcab..32888f2bd1a9 100644 --- a/drivers/oprofile/event_buffer.c +++ b/drivers/oprofile/event_buffer.c | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | #include <linux/vmalloc.h> | 15 | #include <linux/vmalloc.h> |
16 | #include <linux/oprofile.h> | 16 | #include <linux/oprofile.h> |
17 | #include <linux/sched.h> | 17 | #include <linux/sched/signal.h> |
18 | #include <linux/capability.h> | 18 | #include <linux/capability.h> |
19 | #include <linux/dcookies.h> | 19 | #include <linux/dcookies.h> |
20 | #include <linux/fs.h> | 20 | #include <linux/fs.h> |
diff --git a/drivers/parisc/power.c b/drivers/parisc/power.c index ef31b77404ef..e2a3112f1c98 100644 --- a/drivers/parisc/power.c +++ b/drivers/parisc/power.c | |||
@@ -39,7 +39,7 @@ | |||
39 | #include <linux/kernel.h> | 39 | #include <linux/kernel.h> |
40 | #include <linux/notifier.h> | 40 | #include <linux/notifier.h> |
41 | #include <linux/reboot.h> | 41 | #include <linux/reboot.h> |
42 | #include <linux/sched.h> | 42 | #include <linux/sched/signal.h> |
43 | #include <linux/kthread.h> | 43 | #include <linux/kthread.h> |
44 | #include <linux/pm.h> | 44 | #include <linux/pm.h> |
45 | 45 | ||
diff --git a/drivers/parport/daisy.c b/drivers/parport/daisy.c index d998d0ed2bec..46eb15fb57ff 100644 --- a/drivers/parport/daisy.c +++ b/drivers/parport/daisy.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <linux/parport.h> | 23 | #include <linux/parport.h> |
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/sched.h> | 26 | #include <linux/sched/signal.h> |
27 | 27 | ||
28 | #include <asm/current.h> | 28 | #include <asm/current.h> |
29 | #include <linux/uaccess.h> | 29 | #include <linux/uaccess.h> |
diff --git a/drivers/parport/ieee1284.c b/drivers/parport/ieee1284.c index f9fd4b33a546..74cc6dd982d2 100644 --- a/drivers/parport/ieee1284.c +++ b/drivers/parport/ieee1284.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
25 | #include <linux/timer.h> | 25 | #include <linux/timer.h> |
26 | #include <linux/sched.h> | 26 | #include <linux/sched/signal.h> |
27 | 27 | ||
28 | #undef DEBUG /* undef me for production */ | 28 | #undef DEBUG /* undef me for production */ |
29 | 29 | ||
diff --git a/drivers/parport/ieee1284_ops.c b/drivers/parport/ieee1284_ops.c index 75071605d22f..a959224d011b 100644 --- a/drivers/parport/ieee1284_ops.c +++ b/drivers/parport/ieee1284_ops.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/parport.h> | 18 | #include <linux/parport.h> |
19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
20 | #include <linux/sched.h> | 20 | #include <linux/sched/signal.h> |
21 | #include <linux/uaccess.h> | 21 | #include <linux/uaccess.h> |
22 | 22 | ||
23 | #undef DEBUG /* undef me for production */ | 23 | #undef DEBUG /* undef me for production */ |
diff --git a/drivers/parport/parport_ip32.c b/drivers/parport/parport_ip32.c index 30e981be14c2..dcbeeb220dda 100644 --- a/drivers/parport/parport_ip32.c +++ b/drivers/parport/parport_ip32.c | |||
@@ -102,7 +102,7 @@ | |||
102 | #include <linux/kernel.h> | 102 | #include <linux/kernel.h> |
103 | #include <linux/module.h> | 103 | #include <linux/module.h> |
104 | #include <linux/parport.h> | 104 | #include <linux/parport.h> |
105 | #include <linux/sched.h> | 105 | #include <linux/sched/signal.h> |
106 | #include <linux/slab.h> | 106 | #include <linux/slab.h> |
107 | #include <linux/spinlock.h> | 107 | #include <linux/spinlock.h> |
108 | #include <linux/stddef.h> | 108 | #include <linux/stddef.h> |
diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c index 3e56e7deab8e..9d42dfe65d44 100644 --- a/drivers/parport/parport_pc.c +++ b/drivers/parport/parport_pc.c | |||
@@ -44,7 +44,7 @@ | |||
44 | 44 | ||
45 | #include <linux/module.h> | 45 | #include <linux/module.h> |
46 | #include <linux/init.h> | 46 | #include <linux/init.h> |
47 | #include <linux/sched.h> | 47 | #include <linux/sched/signal.h> |
48 | #include <linux/delay.h> | 48 | #include <linux/delay.h> |
49 | #include <linux/errno.h> | 49 | #include <linux/errno.h> |
50 | #include <linux/interrupt.h> | 50 | #include <linux/interrupt.h> |
diff --git a/drivers/parport/share.c b/drivers/parport/share.c index 3308427ed9f7..bc090daa850a 100644 --- a/drivers/parport/share.c +++ b/drivers/parport/share.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include <linux/ioport.h> | 27 | #include <linux/ioport.h> |
28 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
29 | #include <linux/slab.h> | 29 | #include <linux/slab.h> |
30 | #include <linux/sched.h> | 30 | #include <linux/sched/signal.h> |
31 | #include <linux/kmod.h> | 31 | #include <linux/kmod.h> |
32 | #include <linux/device.h> | 32 | #include <linux/device.h> |
33 | 33 | ||
diff --git a/drivers/pci/access.c b/drivers/pci/access.c index b9dd37c8c9ce..8b7382705bf2 100644 --- a/drivers/pci/access.c +++ b/drivers/pci/access.c | |||
@@ -1,7 +1,7 @@ | |||
1 | #include <linux/delay.h> | 1 | #include <linux/delay.h> |
2 | #include <linux/pci.h> | 2 | #include <linux/pci.h> |
3 | #include <linux/module.h> | 3 | #include <linux/module.h> |
4 | #include <linux/sched.h> | 4 | #include <linux/sched/signal.h> |
5 | #include <linux/slab.h> | 5 | #include <linux/slab.h> |
6 | #include <linux/ioport.h> | 6 | #include <linux/ioport.h> |
7 | #include <linux/wait.h> | 7 | #include <linux/wait.h> |
diff --git a/drivers/pci/hotplug/cpci_hotplug_core.c b/drivers/pci/hotplug/cpci_hotplug_core.c index 7ec8a8f72c69..95f689f53920 100644 --- a/drivers/pci/hotplug/cpci_hotplug_core.c +++ b/drivers/pci/hotplug/cpci_hotplug_core.c | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
30 | #include <linux/sched/signal.h> | ||
30 | #include <linux/slab.h> | 31 | #include <linux/slab.h> |
31 | #include <linux/pci.h> | 32 | #include <linux/pci.h> |
32 | #include <linux/pci_hotplug.h> | 33 | #include <linux/pci_hotplug.h> |
diff --git a/drivers/pci/hotplug/cpqphp.h b/drivers/pci/hotplug/cpqphp.h index 9103a7b9f3b9..48c8a066a6b7 100644 --- a/drivers/pci/hotplug/cpqphp.h +++ b/drivers/pci/hotplug/cpqphp.h | |||
@@ -32,7 +32,7 @@ | |||
32 | #include <asm/io.h> /* for read? and write? functions */ | 32 | #include <asm/io.h> /* for read? and write? functions */ |
33 | #include <linux/delay.h> /* for delays */ | 33 | #include <linux/delay.h> /* for delays */ |
34 | #include <linux/mutex.h> | 34 | #include <linux/mutex.h> |
35 | #include <linux/sched.h> /* for signal_pending() */ | 35 | #include <linux/sched/signal.h> /* for signal_pending() */ |
36 | 36 | ||
37 | #define MY_NAME "cpqphp" | 37 | #define MY_NAME "cpqphp" |
38 | 38 | ||
diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h index 37d70b5ad22f..06109d40c4ac 100644 --- a/drivers/pci/hotplug/pciehp.h +++ b/drivers/pci/hotplug/pciehp.h | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <linux/pci.h> | 33 | #include <linux/pci.h> |
34 | #include <linux/pci_hotplug.h> | 34 | #include <linux/pci_hotplug.h> |
35 | #include <linux/delay.h> | 35 | #include <linux/delay.h> |
36 | #include <linux/sched.h> /* signal_pending() */ | 36 | #include <linux/sched/signal.h> /* signal_pending() */ |
37 | #include <linux/pcieport_if.h> | 37 | #include <linux/pcieport_if.h> |
38 | #include <linux/mutex.h> | 38 | #include <linux/mutex.h> |
39 | #include <linux/workqueue.h> | 39 | #include <linux/workqueue.h> |
diff --git a/drivers/pci/hotplug/shpchp.h b/drivers/pci/hotplug/shpchp.h index 4da8fc601467..70c7ea6af034 100644 --- a/drivers/pci/hotplug/shpchp.h +++ b/drivers/pci/hotplug/shpchp.h | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <linux/pci.h> | 33 | #include <linux/pci.h> |
34 | #include <linux/pci_hotplug.h> | 34 | #include <linux/pci_hotplug.h> |
35 | #include <linux/delay.h> | 35 | #include <linux/delay.h> |
36 | #include <linux/sched.h> /* signal_pending(), struct timer_list */ | 36 | #include <linux/sched/signal.h> /* signal_pending(), struct timer_list */ |
37 | #include <linux/mutex.h> | 37 | #include <linux/mutex.h> |
38 | #include <linux/workqueue.h> | 38 | #include <linux/workqueue.h> |
39 | 39 | ||
diff --git a/drivers/perf/arm_pmu.c b/drivers/perf/arm_pmu.c index 6d9335865880..9612b84bc3e0 100644 --- a/drivers/perf/arm_pmu.c +++ b/drivers/perf/arm_pmu.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/perf/arm_pmu.h> | 20 | #include <linux/perf/arm_pmu.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
23 | #include <linux/sched/clock.h> | ||
23 | #include <linux/spinlock.h> | 24 | #include <linux/spinlock.h> |
24 | #include <linux/irq.h> | 25 | #include <linux/irq.h> |
25 | #include <linux/irqdesc.h> | 26 | #include <linux/irqdesc.h> |
diff --git a/drivers/platform/x86/intel_ips.c b/drivers/platform/x86/intel_ips.c index 55663b3d7282..58dcee562d64 100644 --- a/drivers/platform/x86/intel_ips.c +++ b/drivers/platform/x86/intel_ips.c | |||
@@ -68,6 +68,7 @@ | |||
68 | #include <linux/module.h> | 68 | #include <linux/module.h> |
69 | #include <linux/pci.h> | 69 | #include <linux/pci.h> |
70 | #include <linux/sched.h> | 70 | #include <linux/sched.h> |
71 | #include <linux/sched/loadavg.h> | ||
71 | #include <linux/seq_file.h> | 72 | #include <linux/seq_file.h> |
72 | #include <linux/string.h> | 73 | #include <linux/string.h> |
73 | #include <linux/tick.h> | 74 | #include <linux/tick.h> |
diff --git a/drivers/ps3/ps3-sys-manager.c b/drivers/ps3/ps3-sys-manager.c index f2ab435954f6..73e496a72113 100644 --- a/drivers/ps3/ps3-sys-manager.c +++ b/drivers/ps3/ps3-sys-manager.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/workqueue.h> | 23 | #include <linux/workqueue.h> |
24 | #include <linux/reboot.h> | 24 | #include <linux/reboot.h> |
25 | #include <linux/sched/signal.h> | ||
25 | 26 | ||
26 | #include <asm/firmware.h> | 27 | #include <asm/firmware.h> |
27 | #include <asm/lv1call.h> | 28 | #include <asm/lv1call.h> |
diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c index a6d9434addf6..6dc8f29697ab 100644 --- a/drivers/rtc/rtc-dev.c +++ b/drivers/rtc/rtc-dev.c | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/rtc.h> | 17 | #include <linux/rtc.h> |
18 | #include <linux/sched.h> | 18 | #include <linux/sched/signal.h> |
19 | #include "rtc-core.h" | 19 | #include "rtc-core.h" |
20 | 20 | ||
21 | static dev_t rtc_devt; | 21 | static dev_t rtc_devt; |
diff --git a/drivers/s390/char/fs3270.c b/drivers/s390/char/fs3270.c index 85eca1cef063..c4518168fd02 100644 --- a/drivers/s390/char/fs3270.c +++ b/drivers/s390/char/fs3270.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/interrupt.h> | 13 | #include <linux/interrupt.h> |
14 | #include <linux/compat.h> | 14 | #include <linux/compat.h> |
15 | #include <linux/sched/signal.h> | ||
15 | #include <linux/module.h> | 16 | #include <linux/module.h> |
16 | #include <linux/list.h> | 17 | #include <linux/list.h> |
17 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
diff --git a/drivers/s390/char/keyboard.c b/drivers/s390/char/keyboard.c index 82c913318b73..ba0e4f93503d 100644 --- a/drivers/s390/char/keyboard.c +++ b/drivers/s390/char/keyboard.c | |||
@@ -7,7 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/sched.h> | 10 | #include <linux/sched/signal.h> |
11 | #include <linux/slab.h> | 11 | #include <linux/slab.h> |
12 | #include <linux/sysrq.h> | 12 | #include <linux/sysrq.h> |
13 | 13 | ||
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c index de6fccc13124..1b350665c823 100644 --- a/drivers/s390/cio/cio.c +++ b/drivers/s390/cio/cio.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include <asm/chpid.h> | 29 | #include <asm/chpid.h> |
30 | #include <asm/airq.h> | 30 | #include <asm/airq.h> |
31 | #include <asm/isc.h> | 31 | #include <asm/isc.h> |
32 | #include <linux/cputime.h> | 32 | #include <linux/sched/cputime.h> |
33 | #include <asm/fcx.h> | 33 | #include <asm/fcx.h> |
34 | #include <asm/nmi.h> | 34 | #include <asm/nmi.h> |
35 | #include <asm/crw.h> | 35 | #include <asm/crw.h> |
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index 79823ee9c100..b8006ea9099c 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/timer.h> | 25 | #include <linux/timer.h> |
26 | #include <linux/kernel_stat.h> | 26 | #include <linux/kernel_stat.h> |
27 | #include <linux/sched/signal.h> | ||
27 | 28 | ||
28 | #include <asm/ccwdev.h> | 29 | #include <asm/ccwdev.h> |
29 | #include <asm/cio.h> | 30 | #include <asm/cio.h> |
diff --git a/drivers/s390/cio/qdio_thinint.c b/drivers/s390/cio/qdio_thinint.c index 8ad98a902a91..c61164f4528e 100644 --- a/drivers/s390/cio/qdio_thinint.c +++ b/drivers/s390/cio/qdio_thinint.c | |||
@@ -8,6 +8,8 @@ | |||
8 | #include <linux/slab.h> | 8 | #include <linux/slab.h> |
9 | #include <linux/kernel_stat.h> | 9 | #include <linux/kernel_stat.h> |
10 | #include <linux/atomic.h> | 10 | #include <linux/atomic.h> |
11 | #include <linux/rculist.h> | ||
12 | |||
11 | #include <asm/debug.h> | 13 | #include <asm/debug.h> |
12 | #include <asm/qdio.h> | 14 | #include <asm/qdio.h> |
13 | #include <asm/airq.h> | 15 | #include <asm/airq.h> |
diff --git a/drivers/scsi/bnx2fc/bnx2fc.h b/drivers/scsi/bnx2fc/bnx2fc.h index fdd4eb4e41b2..4fc8ed5fe067 100644 --- a/drivers/scsi/bnx2fc/bnx2fc.h +++ b/drivers/scsi/bnx2fc/bnx2fc.h | |||
@@ -39,7 +39,7 @@ | |||
39 | #include <linux/bitops.h> | 39 | #include <linux/bitops.h> |
40 | #include <linux/log2.h> | 40 | #include <linux/log2.h> |
41 | #include <linux/interrupt.h> | 41 | #include <linux/interrupt.h> |
42 | #include <linux/sched.h> | 42 | #include <linux/sched/signal.h> |
43 | #include <linux/io.h> | 43 | #include <linux/io.h> |
44 | 44 | ||
45 | #include <scsi/scsi.h> | 45 | #include <scsi/scsi.h> |
diff --git a/drivers/scsi/bnx2i/bnx2i.h b/drivers/scsi/bnx2i/bnx2i.h index ed7f3228e234..89ef1a1678d1 100644 --- a/drivers/scsi/bnx2i/bnx2i.h +++ b/drivers/scsi/bnx2i/bnx2i.h | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <linux/spinlock.h> | 25 | #include <linux/spinlock.h> |
26 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
27 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
28 | #include <linux/sched.h> | 28 | #include <linux/sched/signal.h> |
29 | #include <linux/in.h> | 29 | #include <linux/in.h> |
30 | #include <linux/kfifo.h> | 30 | #include <linux/kfifo.h> |
31 | #include <linux/netdevice.h> | 31 | #include <linux/netdevice.h> |
diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c index 6103231104da..fd501f8dbb11 100644 --- a/drivers/scsi/libfc/fc_disc.c +++ b/drivers/scsi/libfc/fc_disc.c | |||
@@ -36,6 +36,8 @@ | |||
36 | #include <linux/slab.h> | 36 | #include <linux/slab.h> |
37 | #include <linux/err.h> | 37 | #include <linux/err.h> |
38 | #include <linux/export.h> | 38 | #include <linux/export.h> |
39 | #include <linux/rculist.h> | ||
40 | |||
39 | #include <asm/unaligned.h> | 41 | #include <asm/unaligned.h> |
40 | 42 | ||
41 | #include <scsi/fc/fc_gs.h> | 43 | #include <scsi/fc/fc_gs.h> |
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c index c991f3b822f8..b44c3136eb51 100644 --- a/drivers/scsi/libfc/fc_rport.c +++ b/drivers/scsi/libfc/fc_rport.c | |||
@@ -65,6 +65,8 @@ | |||
65 | #include <linux/timer.h> | 65 | #include <linux/timer.h> |
66 | #include <linux/workqueue.h> | 66 | #include <linux/workqueue.h> |
67 | #include <linux/export.h> | 67 | #include <linux/export.h> |
68 | #include <linux/rculist.h> | ||
69 | |||
68 | #include <asm/unaligned.h> | 70 | #include <asm/unaligned.h> |
69 | 71 | ||
70 | #include <scsi/libfc.h> | 72 | #include <scsi/libfc.h> |
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index 834d1212b6d5..07c08ce68d70 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
27 | #include <linux/log2.h> | 27 | #include <linux/log2.h> |
28 | #include <linux/slab.h> | 28 | #include <linux/slab.h> |
29 | #include <linux/sched/signal.h> | ||
29 | #include <linux/module.h> | 30 | #include <linux/module.h> |
30 | #include <asm/unaligned.h> | 31 | #include <asm/unaligned.h> |
31 | #include <net/tcp.h> | 32 | #include <net/tcp.h> |
diff --git a/drivers/scsi/lpfc/lpfc_vport.c b/drivers/scsi/lpfc/lpfc_vport.c index e18bbc66e83b..4e36998a266c 100644 --- a/drivers/scsi/lpfc/lpfc_vport.c +++ b/drivers/scsi/lpfc/lpfc_vport.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/pci.h> | 28 | #include <linux/pci.h> |
29 | #include <linux/slab.h> | 29 | #include <linux/slab.h> |
30 | #include <linux/spinlock.h> | 30 | #include <linux/spinlock.h> |
31 | #include <linux/sched/signal.h> | ||
31 | 32 | ||
32 | #include <scsi/scsi.h> | 33 | #include <scsi/scsi.h> |
33 | #include <scsi/scsi_device.h> | 34 | #include <scsi/scsi_device.h> |
diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c index 75ac662793a3..c47f4b349bac 100644 --- a/drivers/scsi/osst.c +++ b/drivers/scsi/osst.c | |||
@@ -35,7 +35,7 @@ static const char * osst_version = "0.99.4"; | |||
35 | 35 | ||
36 | #include <linux/fs.h> | 36 | #include <linux/fs.h> |
37 | #include <linux/kernel.h> | 37 | #include <linux/kernel.h> |
38 | #include <linux/sched.h> | 38 | #include <linux/sched/signal.h> |
39 | #include <linux/proc_fs.h> | 39 | #include <linux/proc_fs.h> |
40 | #include <linux/mm.h> | 40 | #include <linux/mm.h> |
41 | #include <linux/slab.h> | 41 | #include <linux/slab.h> |
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 81212d4bd9bf..e5ef78a6848e 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c | |||
@@ -23,7 +23,7 @@ static const char *verstr = "20160209"; | |||
23 | 23 | ||
24 | #include <linux/fs.h> | 24 | #include <linux/fs.h> |
25 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
26 | #include <linux/sched.h> | 26 | #include <linux/sched/signal.h> |
27 | #include <linux/mm.h> | 27 | #include <linux/mm.h> |
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/string.h> | 29 | #include <linux/string.h> |
diff --git a/drivers/soc/fsl/qbman/dpaa_sys.h b/drivers/soc/fsl/qbman/dpaa_sys.h index 2eaf3184f61d..2ce394aa4c95 100644 --- a/drivers/soc/fsl/qbman/dpaa_sys.h +++ b/drivers/soc/fsl/qbman/dpaa_sys.h | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/module.h> | 36 | #include <linux/module.h> |
37 | #include <linux/interrupt.h> | 37 | #include <linux/interrupt.h> |
38 | #include <linux/kthread.h> | 38 | #include <linux/kthread.h> |
39 | #include <linux/sched/signal.h> | ||
39 | #include <linux/vmalloc.h> | 40 | #include <linux/vmalloc.h> |
40 | #include <linux/platform_device.h> | 41 | #include <linux/platform_device.h> |
41 | #include <linux/of.h> | 42 | #include <linux/of.h> |
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 44222ef9471e..90b5b2efafbf 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/pm_domain.h> | 33 | #include <linux/pm_domain.h> |
34 | #include <linux/export.h> | 34 | #include <linux/export.h> |
35 | #include <linux/sched/rt.h> | 35 | #include <linux/sched/rt.h> |
36 | #include <uapi/linux/sched/types.h> | ||
36 | #include <linux/delay.h> | 37 | #include <linux/delay.h> |
37 | #include <linux/kthread.h> | 38 | #include <linux/kthread.h> |
38 | #include <linux/ioport.h> | 39 | #include <linux/ioport.h> |
diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index 2c3ffbcbd621..f45115fce4eb 100644 --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/ion/ion.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/debugfs.h> | 36 | #include <linux/debugfs.h> |
37 | #include <linux/dma-buf.h> | 37 | #include <linux/dma-buf.h> |
38 | #include <linux/idr.h> | 38 | #include <linux/idr.h> |
39 | #include <linux/sched/task.h> | ||
39 | 40 | ||
40 | #include "ion.h" | 41 | #include "ion.h" |
41 | #include "ion_priv.h" | 42 | #include "ion_priv.h" |
diff --git a/drivers/staging/android/ion/ion_heap.c b/drivers/staging/android/ion/ion_heap.c index 4e5c0f17f579..c69d0bd53693 100644 --- a/drivers/staging/android/ion/ion_heap.c +++ b/drivers/staging/android/ion/ion_heap.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/mm.h> | 20 | #include <linux/mm.h> |
21 | #include <linux/rtmutex.h> | 21 | #include <linux/rtmutex.h> |
22 | #include <linux/sched.h> | 22 | #include <linux/sched.h> |
23 | #include <uapi/linux/sched/types.h> | ||
23 | #include <linux/scatterlist.h> | 24 | #include <linux/scatterlist.h> |
24 | #include <linux/vmalloc.h> | 25 | #include <linux/vmalloc.h> |
25 | #include "ion.h" | 26 | #include "ion.h" |
diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c index ec3b66561412..054660049395 100644 --- a/drivers/staging/android/lowmemorykiller.c +++ b/drivers/staging/android/lowmemorykiller.c | |||
@@ -37,7 +37,7 @@ | |||
37 | #include <linux/kernel.h> | 37 | #include <linux/kernel.h> |
38 | #include <linux/mm.h> | 38 | #include <linux/mm.h> |
39 | #include <linux/oom.h> | 39 | #include <linux/oom.h> |
40 | #include <linux/sched.h> | 40 | #include <linux/sched/signal.h> |
41 | #include <linux/swap.h> | 41 | #include <linux/swap.h> |
42 | #include <linux/rcupdate.h> | 42 | #include <linux/rcupdate.h> |
43 | #include <linux/profile.h> | 43 | #include <linux/profile.h> |
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index 57e8599b54e6..8deac8d9225d 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
25 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
26 | #include <linux/sched.h> | 26 | #include <linux/sched/signal.h> |
27 | #include <linux/fcntl.h> | 27 | #include <linux/fcntl.h> |
28 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
29 | #include <linux/mm.h> | 29 | #include <linux/mm.h> |
diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c index c63e591631f6..c3b8fc54883d 100644 --- a/drivers/staging/dgnc/dgnc_tty.c +++ b/drivers/staging/dgnc/dgnc_tty.c | |||
@@ -19,7 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/sched.h> /* For jiffies, task states */ | 22 | #include <linux/sched/signal.h> /* For jiffies, task states, etc. */ |
23 | #include <linux/interrupt.h> /* For tasklet and interrupt structs/defines */ | 23 | #include <linux/interrupt.h> /* For tasklet and interrupt structs/defines */ |
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/ctype.h> | 25 | #include <linux/ctype.h> |
diff --git a/drivers/staging/dgnc/dgnc_utils.c b/drivers/staging/dgnc/dgnc_utils.c index 95272f4765fc..6f59240024d1 100644 --- a/drivers/staging/dgnc/dgnc_utils.c +++ b/drivers/staging/dgnc/dgnc_utils.c | |||
@@ -1,5 +1,5 @@ | |||
1 | #include <linux/tty.h> | 1 | #include <linux/tty.h> |
2 | #include <linux/sched.h> | 2 | #include <linux/sched/signal.h> |
3 | #include "dgnc_utils.h" | 3 | #include "dgnc_utils.h" |
4 | 4 | ||
5 | /* | 5 | /* |
diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c index ab0dbf5cab5a..43255e2e9276 100644 --- a/drivers/staging/greybus/uart.c +++ b/drivers/staging/greybus/uart.c | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/sched.h> | 17 | #include <linux/sched/signal.h> |
18 | #include <linux/wait.h> | 18 | #include <linux/wait.h> |
19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | #include <linux/uaccess.h> | 20 | #include <linux/uaccess.h> |
diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-prim.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-prim.c index cf902154f0aa..bcf9f3dd0310 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-prim.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-prim.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #include <linux/module.h> | 34 | #include <linux/module.h> |
35 | #include <linux/kernel.h> | 35 | #include <linux/kernel.h> |
36 | #include <linux/fs_struct.h> | 36 | #include <linux/fs_struct.h> |
37 | #include <linux/sched.h> | 37 | #include <linux/sched/signal.h> |
38 | 38 | ||
39 | #include "../../../include/linux/libcfs/libcfs.h" | 39 | #include "../../../include/linux/libcfs/libcfs.h" |
40 | 40 | ||
diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h index 21aec0ca9ad3..7d8628ce0d3b 100644 --- a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h +++ b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h | |||
@@ -44,6 +44,7 @@ | |||
44 | 44 | ||
45 | #ifdef __KERNEL__ | 45 | #ifdef __KERNEL__ |
46 | # include <linux/quota.h> | 46 | # include <linux/quota.h> |
47 | # include <linux/sched/signal.h> | ||
47 | # include <linux/string.h> /* snprintf() */ | 48 | # include <linux/string.h> /* snprintf() */ |
48 | # include <linux/version.h> | 49 | # include <linux/version.h> |
49 | #else /* !__KERNEL__ */ | 50 | #else /* !__KERNEL__ */ |
diff --git a/drivers/staging/lustre/lustre/include/lustre_compat.h b/drivers/staging/lustre/lustre/include/lustre_compat.h index 300e96fb032a..da9ce195c52e 100644 --- a/drivers/staging/lustre/lustre/include/lustre_compat.h +++ b/drivers/staging/lustre/lustre/include/lustre_compat.h | |||
@@ -35,6 +35,7 @@ | |||
35 | 35 | ||
36 | #include <linux/fs_struct.h> | 36 | #include <linux/fs_struct.h> |
37 | #include <linux/namei.h> | 37 | #include <linux/namei.h> |
38 | #include <linux/cred.h> | ||
38 | 39 | ||
39 | #include "lustre_patchless_compat.h" | 40 | #include "lustre_patchless_compat.h" |
40 | 41 | ||
diff --git a/drivers/staging/lustre/lustre/include/lustre_lib.h b/drivers/staging/lustre/lustre/include/lustre_lib.h index 27f3148c4344..b04d613846ee 100644 --- a/drivers/staging/lustre/lustre/include/lustre_lib.h +++ b/drivers/staging/lustre/lustre/include/lustre_lib.h | |||
@@ -42,7 +42,7 @@ | |||
42 | * @{ | 42 | * @{ |
43 | */ | 43 | */ |
44 | 44 | ||
45 | #include <linux/sched.h> | 45 | #include <linux/sched/signal.h> |
46 | #include <linux/signal.h> | 46 | #include <linux/signal.h> |
47 | #include <linux/types.h> | 47 | #include <linux/types.h> |
48 | #include "../../include/linux/libcfs/libcfs.h" | 48 | #include "../../include/linux/libcfs/libcfs.h" |
diff --git a/drivers/staging/lustre/lustre/include/obd_support.h b/drivers/staging/lustre/lustre/include/obd_support.h index aaedec7d793c..dace6591a0a4 100644 --- a/drivers/staging/lustre/lustre/include/obd_support.h +++ b/drivers/staging/lustre/lustre/include/obd_support.h | |||
@@ -34,6 +34,8 @@ | |||
34 | #define _OBD_SUPPORT | 34 | #define _OBD_SUPPORT |
35 | 35 | ||
36 | #include <linux/slab.h> | 36 | #include <linux/slab.h> |
37 | #include <linux/sched/signal.h> | ||
38 | |||
37 | #include "../../include/linux/libcfs/libcfs.h" | 39 | #include "../../include/linux/libcfs/libcfs.h" |
38 | #include "lustre_compat.h" | 40 | #include "lustre_compat.h" |
39 | #include "lprocfs_status.h" | 41 | #include "lprocfs_status.h" |
diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec.c b/drivers/staging/lustre/lustre/ptlrpc/sec.c index e860df7c45a2..366f2ce20f5e 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/sec.c +++ b/drivers/staging/lustre/lustre/ptlrpc/sec.c | |||
@@ -38,7 +38,9 @@ | |||
38 | 38 | ||
39 | #include "../../include/linux/libcfs/libcfs.h" | 39 | #include "../../include/linux/libcfs/libcfs.h" |
40 | #include <linux/crypto.h> | 40 | #include <linux/crypto.h> |
41 | #include <linux/cred.h> | ||
41 | #include <linux/key.h> | 42 | #include <linux/key.h> |
43 | #include <linux/sched/task.h> | ||
42 | 44 | ||
43 | #include "../include/obd.h" | 45 | #include "../include/obd.h" |
44 | #include "../include/obd_class.h" | 46 | #include "../include/obd_class.h" |
diff --git a/drivers/staging/media/lirc/lirc_sir.c b/drivers/staging/media/lirc/lirc_sir.c index c75ae43095ba..c6c3de94adaa 100644 --- a/drivers/staging/media/lirc/lirc_sir.c +++ b/drivers/staging/media/lirc/lirc_sir.c | |||
@@ -36,7 +36,7 @@ | |||
36 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | 36 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
37 | 37 | ||
38 | #include <linux/module.h> | 38 | #include <linux/module.h> |
39 | #include <linux/sched.h> | 39 | #include <linux/sched/signal.h> |
40 | #include <linux/errno.h> | 40 | #include <linux/errno.h> |
41 | #include <linux/signal.h> | 41 | #include <linux/signal.h> |
42 | #include <linux/fs.h> | 42 | #include <linux/fs.h> |
diff --git a/drivers/staging/media/lirc/lirc_zilog.c b/drivers/staging/media/lirc/lirc_zilog.c index 34aac3e2eb87..e4a533b6beb3 100644 --- a/drivers/staging/media/lirc/lirc_zilog.c +++ b/drivers/staging/media/lirc/lirc_zilog.c | |||
@@ -42,7 +42,7 @@ | |||
42 | #include <linux/module.h> | 42 | #include <linux/module.h> |
43 | #include <linux/kmod.h> | 43 | #include <linux/kmod.h> |
44 | #include <linux/kernel.h> | 44 | #include <linux/kernel.h> |
45 | #include <linux/sched.h> | 45 | #include <linux/sched/signal.h> |
46 | #include <linux/fs.h> | 46 | #include <linux/fs.h> |
47 | #include <linux/poll.h> | 47 | #include <linux/poll.h> |
48 | #include <linux/string.h> | 48 | #include <linux/string.h> |
diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h index ee3f5ee06529..9e390648d93e 100644 --- a/drivers/staging/rtl8188eu/include/osdep_service.h +++ b/drivers/staging/rtl8188eu/include/osdep_service.h | |||
@@ -37,7 +37,7 @@ | |||
37 | #include <linux/io.h> | 37 | #include <linux/io.h> |
38 | #include <linux/mutex.h> | 38 | #include <linux/mutex.h> |
39 | #include <linux/sem.h> | 39 | #include <linux/sem.h> |
40 | #include <linux/sched.h> | 40 | #include <linux/sched/signal.h> |
41 | #include <linux/etherdevice.h> | 41 | #include <linux/etherdevice.h> |
42 | #include <linux/wireless.h> | 42 | #include <linux/wireless.h> |
43 | #include <net/iw_handler.h> | 43 | #include <net/iw_handler.h> |
diff --git a/drivers/staging/rtl8712/osdep_service.h b/drivers/staging/rtl8712/osdep_service.h index b8a170978434..5d33020554cd 100644 --- a/drivers/staging/rtl8712/osdep_service.h +++ b/drivers/staging/rtl8712/osdep_service.h | |||
@@ -33,7 +33,7 @@ | |||
33 | 33 | ||
34 | #include <linux/interrupt.h> | 34 | #include <linux/interrupt.h> |
35 | #include <linux/semaphore.h> | 35 | #include <linux/semaphore.h> |
36 | #include <linux/sched.h> | 36 | #include <linux/sched/signal.h> |
37 | #include <linux/sem.h> | 37 | #include <linux/sem.h> |
38 | #include <linux/netdevice.h> | 38 | #include <linux/netdevice.h> |
39 | #include <linux/etherdevice.h> | 39 | #include <linux/etherdevice.h> |
diff --git a/drivers/staging/rtl8712/rtl8712_cmd.c b/drivers/staging/rtl8712/rtl8712_cmd.c index f19b6b27aa71..5346c657485d 100644 --- a/drivers/staging/rtl8712/rtl8712_cmd.c +++ b/drivers/staging/rtl8712/rtl8712_cmd.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
33 | #include <linux/errno.h> | 33 | #include <linux/errno.h> |
34 | #include <linux/slab.h> | 34 | #include <linux/slab.h> |
35 | #include <linux/sched/signal.h> | ||
35 | #include <linux/module.h> | 36 | #include <linux/module.h> |
36 | #include <linux/kref.h> | 37 | #include <linux/kref.h> |
37 | #include <linux/netdevice.h> | 38 | #include <linux/netdevice.h> |
diff --git a/drivers/staging/speakup/speakup_soft.c b/drivers/staging/speakup/speakup_soft.c index ff68a384f9c2..d2ff0afd685a 100644 --- a/drivers/staging/speakup/speakup_soft.c +++ b/drivers/staging/speakup/speakup_soft.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include <linux/unistd.h> | 22 | #include <linux/unistd.h> |
23 | #include <linux/miscdevice.h> /* for misc_register, and SYNTH_MINOR */ | 23 | #include <linux/miscdevice.h> /* for misc_register, and SYNTH_MINOR */ |
24 | #include <linux/poll.h> /* for poll_wait() */ | 24 | #include <linux/poll.h> /* for poll_wait() */ |
25 | #include <linux/sched.h> /* schedule(), signal_pending(), TASK_INTERRUPTIBLE */ | 25 | #include <linux/sched/signal.h> /* schedule(), signal_pending(), TASK_INTERRUPTIBLE */ |
26 | 26 | ||
27 | #include "spk_priv.h" | 27 | #include "spk_priv.h" |
28 | #include "speakup.h" | 28 | #include "speakup.h" |
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index cb0b7ca36b1e..8a0d214f6e9b 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | |||
@@ -34,6 +34,7 @@ | |||
34 | 34 | ||
35 | #include <linux/kernel.h> | 35 | #include <linux/kernel.h> |
36 | #include <linux/module.h> | 36 | #include <linux/module.h> |
37 | #include <linux/sched/signal.h> | ||
37 | #include <linux/types.h> | 38 | #include <linux/types.h> |
38 | #include <linux/errno.h> | 39 | #include <linux/errno.h> |
39 | #include <linux/cdev.h> | 40 | #include <linux/cdev.h> |
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.h index 4055d4bf9f74..e63964f5a18a 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.h | |||
@@ -47,7 +47,7 @@ | |||
47 | #include <linux/types.h> | 47 | #include <linux/types.h> |
48 | #include <linux/interrupt.h> | 48 | #include <linux/interrupt.h> |
49 | #include <linux/random.h> | 49 | #include <linux/random.h> |
50 | #include <linux/sched.h> | 50 | #include <linux/sched/signal.h> |
51 | #include <linux/ctype.h> | 51 | #include <linux/ctype.h> |
52 | #include <linux/uaccess.h> | 52 | #include <linux/uaccess.h> |
53 | #include <linux/time.h> /* for time_t */ | 53 | #include <linux/time.h> /* for time_t */ |
diff --git a/drivers/target/iscsi/cxgbit/cxgbit_target.c b/drivers/target/iscsi/cxgbit/cxgbit_target.c index 2714e5901d18..bdcc8b4c522a 100644 --- a/drivers/target/iscsi/cxgbit/cxgbit_target.c +++ b/drivers/target/iscsi/cxgbit/cxgbit_target.c | |||
@@ -8,6 +8,8 @@ | |||
8 | 8 | ||
9 | #include <linux/workqueue.h> | 9 | #include <linux/workqueue.h> |
10 | #include <linux/kthread.h> | 10 | #include <linux/kthread.h> |
11 | #include <linux/sched/signal.h> | ||
12 | |||
11 | #include <asm/unaligned.h> | 13 | #include <asm/unaligned.h> |
12 | #include <net/tcp.h> | 14 | #include <net/tcp.h> |
13 | #include <target/target_core_base.h> | 15 | #include <target/target_core_base.h> |
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index 2285988c209b..a91802432f2f 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/vmalloc.h> | 24 | #include <linux/vmalloc.h> |
25 | #include <linux/idr.h> | 25 | #include <linux/idr.h> |
26 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
27 | #include <linux/sched/signal.h> | ||
27 | #include <asm/unaligned.h> | 28 | #include <asm/unaligned.h> |
28 | #include <net/ipv6.h> | 29 | #include <net/ipv6.h> |
29 | #include <scsi/scsi_proto.h> | 30 | #include <scsi/scsi_proto.h> |
diff --git a/drivers/target/iscsi/iscsi_target_erl0.c b/drivers/target/iscsi/iscsi_target_erl0.c index a8bcbc43b047..9a96e17bf7cd 100644 --- a/drivers/target/iscsi/iscsi_target_erl0.c +++ b/drivers/target/iscsi/iscsi_target_erl0.c | |||
@@ -17,6 +17,8 @@ | |||
17 | * GNU General Public License for more details. | 17 | * GNU General Public License for more details. |
18 | ******************************************************************************/ | 18 | ******************************************************************************/ |
19 | 19 | ||
20 | #include <linux/sched/signal.h> | ||
21 | |||
20 | #include <scsi/iscsi_proto.h> | 22 | #include <scsi/iscsi_proto.h> |
21 | #include <target/target_core_base.h> | 23 | #include <target/target_core_base.h> |
22 | #include <target/target_core_fabric.h> | 24 | #include <target/target_core_fabric.h> |
diff --git a/drivers/target/iscsi/iscsi_target_login.c b/drivers/target/iscsi/iscsi_target_login.c index 746b97f8e4f7..ad8f3011bdc2 100644 --- a/drivers/target/iscsi/iscsi_target_login.c +++ b/drivers/target/iscsi/iscsi_target_login.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/string.h> | 21 | #include <linux/string.h> |
22 | #include <linux/kthread.h> | 22 | #include <linux/kthread.h> |
23 | #include <linux/sched/signal.h> | ||
23 | #include <linux/idr.h> | 24 | #include <linux/idr.h> |
24 | #include <linux/tcp.h> /* TCP_NODELAY */ | 25 | #include <linux/tcp.h> /* TCP_NODELAY */ |
25 | #include <net/ipv6.h> /* ipv6_addr_v4mapped() */ | 26 | #include <net/ipv6.h> /* ipv6_addr_v4mapped() */ |
diff --git a/drivers/target/iscsi/iscsi_target_nego.c b/drivers/target/iscsi/iscsi_target_nego.c index 5269e9ef031c..7ccc9c1cbfd1 100644 --- a/drivers/target/iscsi/iscsi_target_nego.c +++ b/drivers/target/iscsi/iscsi_target_nego.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/ctype.h> | 19 | #include <linux/ctype.h> |
20 | #include <linux/kthread.h> | 20 | #include <linux/kthread.h> |
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | #include <linux/sched/signal.h> | ||
22 | #include <net/sock.h> | 23 | #include <net/sock.h> |
23 | #include <scsi/iscsi_proto.h> | 24 | #include <scsi/iscsi_proto.h> |
24 | #include <target/target_core_base.h> | 25 | #include <target/target_core_base.h> |
diff --git a/drivers/thermal/intel_powerclamp.c b/drivers/thermal/intel_powerclamp.c index a47103a659fa..d718cd179ddb 100644 --- a/drivers/thermal/intel_powerclamp.c +++ b/drivers/thermal/intel_powerclamp.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <linux/debugfs.h> | 50 | #include <linux/debugfs.h> |
51 | #include <linux/seq_file.h> | 51 | #include <linux/seq_file.h> |
52 | #include <linux/sched/rt.h> | 52 | #include <linux/sched/rt.h> |
53 | #include <uapi/linux/sched/types.h> | ||
53 | 54 | ||
54 | #include <asm/nmi.h> | 55 | #include <asm/nmi.h> |
55 | #include <asm/msr.h> | 56 | #include <asm/msr.h> |
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index f3932baed07d..55577cf9b6a4 100644 --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c | |||
@@ -39,7 +39,7 @@ | |||
39 | #include <linux/errno.h> | 39 | #include <linux/errno.h> |
40 | #include <linux/signal.h> | 40 | #include <linux/signal.h> |
41 | #include <linux/fcntl.h> | 41 | #include <linux/fcntl.h> |
42 | #include <linux/sched.h> | 42 | #include <linux/sched/signal.h> |
43 | #include <linux/interrupt.h> | 43 | #include <linux/interrupt.h> |
44 | #include <linux/tty.h> | 44 | #include <linux/tty.h> |
45 | #include <linux/ctype.h> | 45 | #include <linux/ctype.h> |
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c index a23fa5ed1d67..66b59a15780d 100644 --- a/drivers/tty/pty.c +++ b/drivers/tty/pty.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <linux/tty.h> | 12 | #include <linux/tty.h> |
13 | #include <linux/tty_flip.h> | 13 | #include <linux/tty_flip.h> |
14 | #include <linux/fcntl.h> | 14 | #include <linux/fcntl.h> |
15 | #include <linux/sched.h> | 15 | #include <linux/sched/signal.h> |
16 | #include <linux/string.h> | 16 | #include <linux/string.h> |
17 | #include <linux/major.h> | 17 | #include <linux/major.h> |
18 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
diff --git a/drivers/tty/serial/crisv10.c b/drivers/tty/serial/crisv10.c index e92c23470e51..59a2a7e18b5a 100644 --- a/drivers/tty/serial/crisv10.c +++ b/drivers/tty/serial/crisv10.c | |||
@@ -12,7 +12,7 @@ static char *serial_version = "$Revision: 1.25 $"; | |||
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
14 | #include <linux/signal.h> | 14 | #include <linux/signal.h> |
15 | #include <linux/sched.h> | 15 | #include <linux/sched/signal.h> |
16 | #include <linux/timer.h> | 16 | #include <linux/timer.h> |
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/tty.h> | 18 | #include <linux/tty.h> |
diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c index 793395451982..ca54ce074a5f 100644 --- a/drivers/tty/serial/sc16is7xx.c +++ b/drivers/tty/serial/sc16is7xx.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/tty_flip.h> | 29 | #include <linux/tty_flip.h> |
30 | #include <linux/spi/spi.h> | 30 | #include <linux/spi/spi.h> |
31 | #include <linux/uaccess.h> | 31 | #include <linux/uaccess.h> |
32 | #include <uapi/linux/sched/types.h> | ||
32 | 33 | ||
33 | #define SC16IS7XX_NAME "sc16is7xx" | 34 | #define SC16IS7XX_NAME "sc16is7xx" |
34 | #define SC16IS7XX_MAX_DEVS 8 | 35 | #define SC16IS7XX_MAX_DEVS 8 |
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index 9939c3d9912b..3fe56894974a 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/tty.h> | 24 | #include <linux/tty.h> |
25 | #include <linux/tty_flip.h> | 25 | #include <linux/tty_flip.h> |
26 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
27 | #include <linux/sched/signal.h> | ||
27 | #include <linux/init.h> | 28 | #include <linux/init.h> |
28 | #include <linux/console.h> | 29 | #include <linux/console.h> |
29 | #include <linux/of.h> | 30 | #include <linux/of.h> |
diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c index 71136742e606..c6fc7141d7b2 100644 --- a/drivers/tty/sysrq.c +++ b/drivers/tty/sysrq.c | |||
@@ -14,8 +14,10 @@ | |||
14 | 14 | ||
15 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | 15 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
16 | 16 | ||
17 | #include <linux/sched.h> | 17 | #include <linux/sched/signal.h> |
18 | #include <linux/sched/rt.h> | 18 | #include <linux/sched/rt.h> |
19 | #include <linux/sched/debug.h> | ||
20 | #include <linux/sched/task.h> | ||
19 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
20 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
21 | #include <linux/fs.h> | 23 | #include <linux/fs.h> |
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index a1fd3f7d487a..e6d1a6510886 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c | |||
@@ -69,7 +69,8 @@ | |||
69 | #include <linux/errno.h> | 69 | #include <linux/errno.h> |
70 | #include <linux/signal.h> | 70 | #include <linux/signal.h> |
71 | #include <linux/fcntl.h> | 71 | #include <linux/fcntl.h> |
72 | #include <linux/sched.h> | 72 | #include <linux/sched/signal.h> |
73 | #include <linux/sched/task.h> | ||
73 | #include <linux/interrupt.h> | 74 | #include <linux/interrupt.h> |
74 | #include <linux/tty.h> | 75 | #include <linux/tty.h> |
75 | #include <linux/tty_driver.h> | 76 | #include <linux/tty_driver.h> |
diff --git a/drivers/tty/tty_ioctl.c b/drivers/tty/tty_ioctl.c index f27fc0f14c11..a9a978731c5b 100644 --- a/drivers/tty/tty_ioctl.c +++ b/drivers/tty/tty_ioctl.c | |||
@@ -9,7 +9,7 @@ | |||
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | #include <linux/termios.h> | 10 | #include <linux/termios.h> |
11 | #include <linux/errno.h> | 11 | #include <linux/errno.h> |
12 | #include <linux/sched.h> | 12 | #include <linux/sched/signal.h> |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/major.h> | 14 | #include <linux/major.h> |
15 | #include <linux/tty.h> | 15 | #include <linux/tty.h> |
diff --git a/drivers/tty/tty_ldsem.c b/drivers/tty/tty_ldsem.c index 9229de43e19d..52b7baef4f7a 100644 --- a/drivers/tty/tty_ldsem.c +++ b/drivers/tty/tty_ldsem.c | |||
@@ -32,6 +32,8 @@ | |||
32 | #include <linux/atomic.h> | 32 | #include <linux/atomic.h> |
33 | #include <linux/tty.h> | 33 | #include <linux/tty.h> |
34 | #include <linux/sched.h> | 34 | #include <linux/sched.h> |
35 | #include <linux/sched/debug.h> | ||
36 | #include <linux/sched/task.h> | ||
35 | 37 | ||
36 | 38 | ||
37 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 39 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
diff --git a/drivers/tty/tty_port.c b/drivers/tty/tty_port.c index 5cd3cd932293..1d21a9c1d33e 100644 --- a/drivers/tty/tty_port.c +++ b/drivers/tty/tty_port.c | |||
@@ -11,7 +11,7 @@ | |||
11 | #include <linux/timer.h> | 11 | #include <linux/timer.h> |
12 | #include <linux/string.h> | 12 | #include <linux/string.h> |
13 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched/signal.h> |
15 | #include <linux/wait.h> | 15 | #include <linux/wait.h> |
16 | #include <linux/bitops.h> | 16 | #include <linux/bitops.h> |
17 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c index 397e1509fe51..c5f0fc906136 100644 --- a/drivers/tty/vt/keyboard.c +++ b/drivers/tty/vt/keyboard.c | |||
@@ -26,7 +26,9 @@ | |||
26 | 26 | ||
27 | #include <linux/consolemap.h> | 27 | #include <linux/consolemap.h> |
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/sched.h> | 29 | #include <linux/sched/signal.h> |
30 | #include <linux/sched/debug.h> | ||
31 | #include <linux/sched/debug.h> | ||
30 | #include <linux/tty.h> | 32 | #include <linux/tty.h> |
31 | #include <linux/tty_flip.h> | 33 | #include <linux/tty_flip.h> |
32 | #include <linux/mm.h> | 34 | #include <linux/mm.h> |
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c index 9d3ce505e7ab..5c4933bb4b53 100644 --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c | |||
@@ -72,7 +72,7 @@ | |||
72 | 72 | ||
73 | #include <linux/module.h> | 73 | #include <linux/module.h> |
74 | #include <linux/types.h> | 74 | #include <linux/types.h> |
75 | #include <linux/sched.h> | 75 | #include <linux/sched/signal.h> |
76 | #include <linux/tty.h> | 76 | #include <linux/tty.h> |
77 | #include <linux/tty_flip.h> | 77 | #include <linux/tty_flip.h> |
78 | #include <linux/kernel.h> | 78 | #include <linux/kernel.h> |
diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c index a56edf2d58eb..0cbfe1ff6f6c 100644 --- a/drivers/tty/vt/vt_ioctl.c +++ b/drivers/tty/vt/vt_ioctl.c | |||
@@ -10,7 +10,7 @@ | |||
10 | 10 | ||
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
13 | #include <linux/sched.h> | 13 | #include <linux/sched/signal.h> |
14 | #include <linux/tty.h> | 14 | #include <linux/tty.h> |
15 | #include <linux/timer.h> | 15 | #include <linux/timer.h> |
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index 31d95dc9c202..60ce7fd54e89 100644 --- a/drivers/uio/uio.c +++ b/drivers/uio/uio.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
21 | #include <linux/mm.h> | 21 | #include <linux/mm.h> |
22 | #include <linux/idr.h> | 22 | #include <linux/idr.h> |
23 | #include <linux/sched.h> | 23 | #include <linux/sched/signal.h> |
24 | #include <linux/string.h> | 24 | #include <linux/string.h> |
25 | #include <linux/kobject.h> | 25 | #include <linux/kobject.h> |
26 | #include <linux/cdev.h> | 26 | #include <linux/cdev.h> |
diff --git a/drivers/usb/atm/usbatm.c b/drivers/usb/atm/usbatm.c index 5a59da0dc98a..3e80aa3b917a 100644 --- a/drivers/usb/atm/usbatm.c +++ b/drivers/usb/atm/usbatm.c | |||
@@ -74,7 +74,7 @@ | |||
74 | #include <linux/moduleparam.h> | 74 | #include <linux/moduleparam.h> |
75 | #include <linux/netdevice.h> | 75 | #include <linux/netdevice.h> |
76 | #include <linux/proc_fs.h> | 76 | #include <linux/proc_fs.h> |
77 | #include <linux/sched.h> | 77 | #include <linux/sched/signal.h> |
78 | #include <linux/signal.h> | 78 | #include <linux/signal.h> |
79 | #include <linux/slab.h> | 79 | #include <linux/slab.h> |
80 | #include <linux/stat.h> | 80 | #include <linux/stat.h> |
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 235e305f8473..d5388938bc7a 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #undef VERBOSE_DEBUG | 32 | #undef VERBOSE_DEBUG |
33 | 33 | ||
34 | #include <linux/kernel.h> | 34 | #include <linux/kernel.h> |
35 | #include <linux/sched/signal.h> | ||
35 | #include <linux/errno.h> | 36 | #include <linux/errno.h> |
36 | #include <linux/init.h> | 37 | #include <linux/init.h> |
37 | #include <linux/slab.h> | 38 | #include <linux/slab.h> |
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c index 071964c7847f..cc61055fb9be 100644 --- a/drivers/usb/class/usblp.c +++ b/drivers/usb/class/usblp.c | |||
@@ -49,7 +49,7 @@ | |||
49 | 49 | ||
50 | #include <linux/module.h> | 50 | #include <linux/module.h> |
51 | #include <linux/kernel.h> | 51 | #include <linux/kernel.h> |
52 | #include <linux/sched.h> | 52 | #include <linux/sched/signal.h> |
53 | #include <linux/signal.h> | 53 | #include <linux/signal.h> |
54 | #include <linux/poll.h> | 54 | #include <linux/poll.h> |
55 | #include <linux/slab.h> | 55 | #include <linux/slab.h> |
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index ca425e8099ea..cfc3cff6e8d5 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c | |||
@@ -36,6 +36,7 @@ | |||
36 | 36 | ||
37 | #include <linux/fs.h> | 37 | #include <linux/fs.h> |
38 | #include <linux/mm.h> | 38 | #include <linux/mm.h> |
39 | #include <linux/sched/signal.h> | ||
39 | #include <linux/slab.h> | 40 | #include <linux/slab.h> |
40 | #include <linux/signal.h> | 41 | #include <linux/signal.h> |
41 | #include <linux/poll.h> | 42 | #include <linux/poll.h> |
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index a56c75e09786..f0dd08198d74 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/moduleparam.h> | 16 | #include <linux/moduleparam.h> |
17 | #include <linux/completion.h> | 17 | #include <linux/completion.h> |
18 | #include <linux/sched.h> | 18 | #include <linux/sched/mm.h> |
19 | #include <linux/list.h> | 19 | #include <linux/list.h> |
20 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
21 | #include <linux/ioctl.h> | 21 | #include <linux/ioctl.h> |
diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c index 87fccf611b69..a5b7cd615698 100644 --- a/drivers/usb/gadget/function/f_fs.c +++ b/drivers/usb/gadget/function/f_fs.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/export.h> | 23 | #include <linux/export.h> |
24 | #include <linux/hid.h> | 24 | #include <linux/hid.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/sched/signal.h> | ||
26 | #include <linux/uio.h> | 27 | #include <linux/uio.h> |
27 | #include <asm/unaligned.h> | 28 | #include <asm/unaligned.h> |
28 | 29 | ||
diff --git a/drivers/usb/gadget/function/f_mass_storage.c b/drivers/usb/gadget/function/f_mass_storage.c index 8f3659b65f53..4c8aacc232c0 100644 --- a/drivers/usb/gadget/function/f_mass_storage.c +++ b/drivers/usb/gadget/function/f_mass_storage.c | |||
@@ -207,6 +207,7 @@ | |||
207 | #include <linux/fs.h> | 207 | #include <linux/fs.h> |
208 | #include <linux/kref.h> | 208 | #include <linux/kref.h> |
209 | #include <linux/kthread.h> | 209 | #include <linux/kthread.h> |
210 | #include <linux/sched/signal.h> | ||
210 | #include <linux/limits.h> | 211 | #include <linux/limits.h> |
211 | #include <linux/rwsem.h> | 212 | #include <linux/rwsem.h> |
212 | #include <linux/slab.h> | 213 | #include <linux/slab.h> |
diff --git a/drivers/usb/image/mdc800.c b/drivers/usb/image/mdc800.c index 5cf2633cdb04..e92540a21b6b 100644 --- a/drivers/usb/image/mdc800.c +++ b/drivers/usb/image/mdc800.c | |||
@@ -85,7 +85,7 @@ | |||
85 | * (20/10/1999) | 85 | * (20/10/1999) |
86 | */ | 86 | */ |
87 | 87 | ||
88 | #include <linux/sched.h> | 88 | #include <linux/sched/signal.h> |
89 | #include <linux/signal.h> | 89 | #include <linux/signal.h> |
90 | #include <linux/spinlock.h> | 90 | #include <linux/spinlock.h> |
91 | #include <linux/errno.h> | 91 | #include <linux/errno.h> |
diff --git a/drivers/usb/misc/adutux.c b/drivers/usb/misc/adutux.c index c5fa584d8f0a..db9a9e6ff6be 100644 --- a/drivers/usb/misc/adutux.c +++ b/drivers/usb/misc/adutux.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | 21 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
22 | 22 | ||
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/sched/signal.h> | ||
24 | #include <linux/errno.h> | 25 | #include <linux/errno.h> |
25 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
26 | #include <linux/module.h> | 27 | #include <linux/module.h> |
diff --git a/drivers/usb/misc/idmouse.c b/drivers/usb/misc/idmouse.c index debc1fd74b0d..8b9fd7534f69 100644 --- a/drivers/usb/misc/idmouse.c +++ b/drivers/usb/misc/idmouse.c | |||
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/sched/signal.h> | ||
20 | #include <linux/errno.h> | 21 | #include <linux/errno.h> |
21 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
22 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
diff --git a/drivers/usb/misc/rio500.c b/drivers/usb/misc/rio500.c index fc329c98a6e8..b106ce76997b 100644 --- a/drivers/usb/misc/rio500.c +++ b/drivers/usb/misc/rio500.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
33 | #include <linux/signal.h> | 33 | #include <linux/signal.h> |
34 | #include <linux/sched.h> | 34 | #include <linux/sched/signal.h> |
35 | #include <linux/mutex.h> | 35 | #include <linux/mutex.h> |
36 | #include <linux/errno.h> | 36 | #include <linux/errno.h> |
37 | #include <linux/random.h> | 37 | #include <linux/random.h> |
diff --git a/drivers/usb/misc/uss720.c b/drivers/usb/misc/uss720.c index 0a643fa74cab..e45a3a680db8 100644 --- a/drivers/usb/misc/uss720.c +++ b/drivers/usb/misc/uss720.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <linux/completion.h> | 50 | #include <linux/completion.h> |
51 | #include <linux/kref.h> | 51 | #include <linux/kref.h> |
52 | #include <linux/slab.h> | 52 | #include <linux/slab.h> |
53 | #include <linux/sched/signal.h> | ||
53 | 54 | ||
54 | /* | 55 | /* |
55 | * Version Information | 56 | * Version Information |
diff --git a/drivers/usb/mon/mon_bin.c b/drivers/usb/mon/mon_bin.c index 9fb8b1e6ecc2..b6d8bf475c92 100644 --- a/drivers/usb/mon/mon_bin.c +++ b/drivers/usb/mon/mon_bin.c | |||
@@ -8,6 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/sched/signal.h> | ||
11 | #include <linux/types.h> | 12 | #include <linux/types.h> |
12 | #include <linux/fs.h> | 13 | #include <linux/fs.h> |
13 | #include <linux/cdev.h> | 14 | #include <linux/cdev.h> |
diff --git a/drivers/usb/mon/mon_text.c b/drivers/usb/mon/mon_text.c index db1a4abf2806..19c416d69eb9 100644 --- a/drivers/usb/mon/mon_text.c +++ b/drivers/usb/mon/mon_text.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/list.h> | 8 | #include <linux/list.h> |
9 | #include <linux/usb.h> | 9 | #include <linux/usb.h> |
10 | #include <linux/slab.h> | 10 | #include <linux/slab.h> |
11 | #include <linux/sched/signal.h> | ||
11 | #include <linux/time.h> | 12 | #include <linux/time.h> |
12 | #include <linux/ktime.h> | 13 | #include <linux/ktime.h> |
13 | #include <linux/export.h> | 14 | #include <linux/export.h> |
diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c index eb433922598c..ab78111e0968 100644 --- a/drivers/usb/serial/digi_acceleport.c +++ b/drivers/usb/serial/digi_acceleport.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/uaccess.h> | 27 | #include <linux/uaccess.h> |
28 | #include <linux/usb.h> | 28 | #include <linux/usb.h> |
29 | #include <linux/wait.h> | 29 | #include <linux/wait.h> |
30 | #include <linux/sched/signal.h> | ||
30 | #include <linux/usb/serial.h> | 31 | #include <linux/usb/serial.h> |
31 | 32 | ||
32 | /* Defines */ | 33 | /* Defines */ |
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index 944de657a07a..49ce2be90fa0 100644 --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/sched/signal.h> | ||
13 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
14 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
15 | #include <linux/sysrq.h> | 16 | #include <linux/sysrq.h> |
diff --git a/drivers/usb/usbip/usbip_common.h b/drivers/usb/usbip/usbip_common.h index 9f490375ac92..f8573a52e41a 100644 --- a/drivers/usb/usbip/usbip_common.h +++ b/drivers/usb/usbip/usbip_common.h | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/types.h> | 31 | #include <linux/types.h> |
32 | #include <linux/usb.h> | 32 | #include <linux/usb.h> |
33 | #include <linux/wait.h> | 33 | #include <linux/wait.h> |
34 | #include <linux/sched/task.h> | ||
34 | #include <uapi/linux/usbip.h> | 35 | #include <uapi/linux/usbip.h> |
35 | 36 | ||
36 | #define USBIP_VERSION "1.0.0" | 37 | #define USBIP_VERSION "1.0.0" |
diff --git a/drivers/vfio/vfio_iommu_spapr_tce.c b/drivers/vfio/vfio_iommu_spapr_tce.c index 59b3f62a2d64..cf3de91fbfe7 100644 --- a/drivers/vfio/vfio_iommu_spapr_tce.c +++ b/drivers/vfio/vfio_iommu_spapr_tce.c | |||
@@ -20,6 +20,9 @@ | |||
20 | #include <linux/err.h> | 20 | #include <linux/err.h> |
21 | #include <linux/vfio.h> | 21 | #include <linux/vfio.h> |
22 | #include <linux/vmalloc.h> | 22 | #include <linux/vmalloc.h> |
23 | #include <linux/sched/mm.h> | ||
24 | #include <linux/sched/signal.h> | ||
25 | |||
23 | #include <asm/iommu.h> | 26 | #include <asm/iommu.h> |
24 | #include <asm/tce.h> | 27 | #include <asm/tce.h> |
25 | #include <asm/mmu_context.h> | 28 | #include <asm/mmu_context.h> |
diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c index bd6f293c4ebd..c26fa1f3ed86 100644 --- a/drivers/vfio/vfio_iommu_type1.c +++ b/drivers/vfio/vfio_iommu_type1.c | |||
@@ -31,7 +31,8 @@ | |||
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/mm.h> | 32 | #include <linux/mm.h> |
33 | #include <linux/rbtree.h> | 33 | #include <linux/rbtree.h> |
34 | #include <linux/sched.h> | 34 | #include <linux/sched/signal.h> |
35 | #include <linux/sched/mm.h> | ||
35 | #include <linux/slab.h> | 36 | #include <linux/slab.h> |
36 | #include <linux/uaccess.h> | 37 | #include <linux/uaccess.h> |
37 | #include <linux/vfio.h> | 38 | #include <linux/vfio.h> |
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 2fe35354f20e..9b519897cc17 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c | |||
@@ -17,6 +17,8 @@ | |||
17 | #include <linux/workqueue.h> | 17 | #include <linux/workqueue.h> |
18 | #include <linux/file.h> | 18 | #include <linux/file.h> |
19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | #include <linux/sched/clock.h> | ||
21 | #include <linux/sched/signal.h> | ||
20 | #include <linux/vmalloc.h> | 22 | #include <linux/vmalloc.h> |
21 | 23 | ||
22 | #include <linux/net.h> | 24 | #include <linux/net.h> |
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 9469364eefd7..f0ba362d4c10 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c | |||
@@ -27,6 +27,8 @@ | |||
27 | #include <linux/cgroup.h> | 27 | #include <linux/cgroup.h> |
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/sort.h> | 29 | #include <linux/sort.h> |
30 | #include <linux/sched/mm.h> | ||
31 | #include <linux/sched/signal.h> | ||
30 | #include <linux/interval_tree_generic.h> | 32 | #include <linux/interval_tree_generic.h> |
31 | 33 | ||
32 | #include "vhost.h" | 34 | #include "vhost.h" |
diff --git a/drivers/video/fbdev/auo_k190x.c b/drivers/video/fbdev/auo_k190x.c index 9580374667ba..0d06038324e0 100644 --- a/drivers/video/fbdev/auo_k190x.c +++ b/drivers/video/fbdev/auo_k190x.c | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/sched/mm.h> | ||
12 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
13 | #include <linux/gpio.h> | 14 | #include <linux/gpio.h> |
14 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
diff --git a/drivers/video/fbdev/cobalt_lcdfb.c b/drivers/video/fbdev/cobalt_lcdfb.c index 038ac6934fe9..9da90bd242f4 100644 --- a/drivers/video/fbdev/cobalt_lcdfb.c +++ b/drivers/video/fbdev/cobalt_lcdfb.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/uaccess.h> | 26 | #include <linux/uaccess.h> |
27 | #include <linux/platform_device.h> | 27 | #include <linux/platform_device.h> |
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/sched/signal.h> | ||
29 | 30 | ||
30 | /* | 31 | /* |
31 | * Cursor position address | 32 | * Cursor position address |
diff --git a/drivers/video/fbdev/nvidia/nv_accel.c b/drivers/video/fbdev/nvidia/nv_accel.c index ad6472a894ea..7341fed63e35 100644 --- a/drivers/video/fbdev/nvidia/nv_accel.c +++ b/drivers/video/fbdev/nvidia/nv_accel.c | |||
@@ -48,6 +48,8 @@ | |||
48 | */ | 48 | */ |
49 | 49 | ||
50 | #include <linux/fb.h> | 50 | #include <linux/fb.h> |
51 | #include <linux/nmi.h> | ||
52 | |||
51 | #include "nv_type.h" | 53 | #include "nv_type.h" |
52 | #include "nv_proto.h" | 54 | #include "nv_proto.h" |
53 | #include "nv_dma.h" | 55 | #include "nv_dma.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c index 8b810696a42b..fd2b372d0264 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/jiffies.h> | 19 | #include <linux/jiffies.h> |
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/sched.h> | 22 | #include <linux/sched/signal.h> |
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | #include <linux/workqueue.h> | 24 | #include <linux/workqueue.h> |
25 | #include <linux/of_device.h> | 25 | #include <linux/of_device.h> |
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index a2a4386d9836..4e1191508228 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/wait.h> | 31 | #include <linux/wait.h> |
32 | #include <linux/mm.h> | 32 | #include <linux/mm.h> |
33 | #include <linux/mount.h> | 33 | #include <linux/mount.h> |
34 | #include <linux/magic.h> | ||
34 | 35 | ||
35 | /* | 36 | /* |
36 | * Balloon device works in 4K page units. So each page is pointed to by | 37 | * Balloon device works in 4K page units. So each page is pointed to by |
diff --git a/drivers/w1/w1_family.c b/drivers/w1/w1_family.c index df1c9bb90eb5..2096f460498f 100644 --- a/drivers/w1/w1_family.c +++ b/drivers/w1/w1_family.c | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
16 | #include <linux/list.h> | 16 | #include <linux/list.h> |
17 | #include <linux/sched.h> /* schedule_timeout() */ | 17 | #include <linux/sched/signal.h> |
18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
19 | #include <linux/export.h> | 19 | #include <linux/export.h> |
20 | 20 | ||
diff --git a/drivers/w1/w1_int.c b/drivers/w1/w1_int.c index 4ce1b66d5092..2cae7b29bb5f 100644 --- a/drivers/w1/w1_int.c +++ b/drivers/w1/w1_int.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
18 | #include <linux/kthread.h> | 18 | #include <linux/kthread.h> |
19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | #include <linux/sched/signal.h> | ||
20 | #include <linux/export.h> | 21 | #include <linux/export.h> |
21 | #include <linux/moduleparam.h> | 22 | #include <linux/moduleparam.h> |
22 | 23 | ||
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index db107fa50ca1..a6d4378eb8d9 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/cpu.h> | 41 | #include <linux/cpu.h> |
42 | #include <linux/kernel.h> | 42 | #include <linux/kernel.h> |
43 | #include <linux/sched.h> | 43 | #include <linux/sched.h> |
44 | #include <linux/cred.h> | ||
44 | #include <linux/errno.h> | 45 | #include <linux/errno.h> |
45 | #include <linux/mm.h> | 46 | #include <linux/mm.h> |
46 | #include <linux/bootmem.h> | 47 | #include <linux/bootmem.h> |
diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c index 2ef2b61b69df..c77a0751a311 100644 --- a/drivers/xen/gntdev.c +++ b/drivers/xen/gntdev.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/types.h> | 32 | #include <linux/types.h> |
33 | #include <linux/uaccess.h> | 33 | #include <linux/uaccess.h> |
34 | #include <linux/sched.h> | 34 | #include <linux/sched.h> |
35 | #include <linux/sched/mm.h> | ||
35 | #include <linux/spinlock.h> | 36 | #include <linux/spinlock.h> |
36 | #include <linux/slab.h> | 37 | #include <linux/slab.h> |
37 | #include <linux/highmem.h> | 38 | #include <linux/highmem.h> |
diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c index 072e7599583a..a89f3cfe3c7d 100644 --- a/fs/9p/v9fs.c +++ b/fs/9p/v9fs.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/errno.h> | 29 | #include <linux/errno.h> |
30 | #include <linux/fs.h> | 30 | #include <linux/fs.h> |
31 | #include <linux/sched.h> | 31 | #include <linux/sched.h> |
32 | #include <linux/cred.h> | ||
32 | #include <linux/parser.h> | 33 | #include <linux/parser.h> |
33 | #include <linux/idr.h> | 34 | #include <linux/idr.h> |
34 | #include <linux/slab.h> | 35 | #include <linux/slab.h> |
diff --git a/fs/affs/inode.c b/fs/affs/inode.c index a5e6097eb5a9..abcc59899229 100644 --- a/fs/affs/inode.c +++ b/fs/affs/inode.c | |||
@@ -10,6 +10,7 @@ | |||
10 | * (C) 1991 Linus Torvalds - minix filesystem | 10 | * (C) 1991 Linus Torvalds - minix filesystem |
11 | */ | 11 | */ |
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/cred.h> | ||
13 | #include <linux/gfp.h> | 14 | #include <linux/gfp.h> |
14 | #include "affs.h" | 15 | #include "affs.h" |
15 | 16 | ||
diff --git a/fs/affs/super.c b/fs/affs/super.c index 37532538e8ab..c2c27a8f128e 100644 --- a/fs/affs/super.c +++ b/fs/affs/super.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/parser.h> | 16 | #include <linux/parser.h> |
17 | #include <linux/magic.h> | 17 | #include <linux/magic.h> |
18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
19 | #include <linux/cred.h> | ||
19 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
20 | #include <linux/writeback.h> | 21 | #include <linux/writeback.h> |
21 | #include <linux/blkdev.h> | 22 | #include <linux/blkdev.h> |
diff --git a/fs/afs/rxrpc.c b/fs/afs/rxrpc.c index f3c1b40eb11f..419ef05dcb5e 100644 --- a/fs/afs/rxrpc.c +++ b/fs/afs/rxrpc.c | |||
@@ -10,6 +10,8 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/slab.h> | 12 | #include <linux/slab.h> |
13 | #include <linux/sched/signal.h> | ||
14 | |||
13 | #include <net/sock.h> | 15 | #include <net/sock.h> |
14 | #include <net/af_rxrpc.h> | 16 | #include <net/af_rxrpc.h> |
15 | #include <rxrpc/packet.h> | 17 | #include <rxrpc/packet.h> |
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/backing-dev.h> | 20 | #include <linux/backing-dev.h> |
21 | #include <linux/uio.h> | 21 | #include <linux/uio.h> |
22 | 22 | ||
23 | #include <linux/sched.h> | 23 | #include <linux/sched/signal.h> |
24 | #include <linux/fs.h> | 24 | #include <linux/fs.h> |
25 | #include <linux/file.h> | 25 | #include <linux/file.h> |
26 | #include <linux/mm.h> | 26 | #include <linux/mm.h> |
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/time.h> | 9 | #include <linux/time.h> |
10 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
11 | #include <linux/string.h> | 11 | #include <linux/string.h> |
12 | #include <linux/sched/signal.h> | ||
12 | #include <linux/capability.h> | 13 | #include <linux/capability.h> |
13 | #include <linux/fsnotify.h> | 14 | #include <linux/fsnotify.h> |
14 | #include <linux/fcntl.h> | 15 | #include <linux/fcntl.h> |
diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h index c885daae68c8..beef981aa54f 100644 --- a/fs/autofs4/autofs_i.h +++ b/fs/autofs4/autofs_i.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/mutex.h> | 14 | #include <linux/mutex.h> |
15 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
16 | #include <linux/list.h> | 16 | #include <linux/list.h> |
17 | #include <linux/completion.h> | ||
17 | 18 | ||
18 | /* This is the range of ioctl() numbers we claim as ours */ | 19 | /* This is the range of ioctl() numbers we claim as ours */ |
19 | #define AUTOFS_IOC_FIRST AUTOFS_IOC_READY | 20 | #define AUTOFS_IOC_FIRST AUTOFS_IOC_READY |
diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c index 806df746f1a9..734cbf8d9676 100644 --- a/fs/autofs4/dev-ioctl.c +++ b/fs/autofs4/dev-ioctl.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/file.h> | 17 | #include <linux/file.h> |
18 | #include <linux/fdtable.h> | 18 | #include <linux/fdtable.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/cred.h> | ||
20 | #include <linux/compat.h> | 21 | #include <linux/compat.h> |
21 | #include <linux/syscalls.h> | 22 | #include <linux/syscalls.h> |
22 | #include <linux/magic.h> | 23 | #include <linux/magic.h> |
diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c index 79fbd85db4ba..24a58bf9ca72 100644 --- a/fs/autofs4/waitq.c +++ b/fs/autofs4/waitq.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/slab.h> | 10 | #include <linux/slab.h> |
11 | #include <linux/time.h> | 11 | #include <linux/time.h> |
12 | #include <linux/signal.h> | 12 | #include <linux/signal.h> |
13 | #include <linux/sched/signal.h> | ||
13 | #include <linux/file.h> | 14 | #include <linux/file.h> |
14 | #include "autofs_i.h" | 15 | #include "autofs_i.h" |
15 | 16 | ||
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index 19407165f4aa..c500e954debb 100644 --- a/fs/befs/linuxvfs.c +++ b/fs/befs/linuxvfs.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/parser.h> | 18 | #include <linux/parser.h> |
19 | #include <linux/namei.h> | 19 | #include <linux/namei.h> |
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/cred.h> | ||
21 | #include <linux/exportfs.h> | 22 | #include <linux/exportfs.h> |
22 | 23 | ||
23 | #include "befs.h" | 24 | #include "befs.h" |
diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c index 2a59139f520b..9be82c4e14a4 100644 --- a/fs/binfmt_aout.c +++ b/fs/binfmt_aout.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
26 | #include <linux/coredump.h> | 26 | #include <linux/coredump.h> |
27 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
28 | #include <linux/sched/task_stack.h> | ||
28 | 29 | ||
29 | #include <linux/uaccess.h> | 30 | #include <linux/uaccess.h> |
30 | #include <asm/cacheflush.h> | 31 | #include <asm/cacheflush.h> |
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 443a6f537d56..5075fd5c62c8 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c | |||
@@ -35,6 +35,10 @@ | |||
35 | #include <linux/utsname.h> | 35 | #include <linux/utsname.h> |
36 | #include <linux/coredump.h> | 36 | #include <linux/coredump.h> |
37 | #include <linux/sched.h> | 37 | #include <linux/sched.h> |
38 | #include <linux/sched/coredump.h> | ||
39 | #include <linux/sched/task_stack.h> | ||
40 | #include <linux/sched/cputime.h> | ||
41 | #include <linux/cred.h> | ||
38 | #include <linux/dax.h> | 42 | #include <linux/dax.h> |
39 | #include <linux/uaccess.h> | 43 | #include <linux/uaccess.h> |
40 | #include <asm/param.h> | 44 | #include <asm/param.h> |
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c index ffca4bbc3d63..cf93a4fad012 100644 --- a/fs/binfmt_elf_fdpic.c +++ b/fs/binfmt_elf_fdpic.c | |||
@@ -15,6 +15,9 @@ | |||
15 | #include <linux/fs.h> | 15 | #include <linux/fs.h> |
16 | #include <linux/stat.h> | 16 | #include <linux/stat.h> |
17 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
18 | #include <linux/sched/coredump.h> | ||
19 | #include <linux/sched/task_stack.h> | ||
20 | #include <linux/sched/cputime.h> | ||
18 | #include <linux/mm.h> | 21 | #include <linux/mm.h> |
19 | #include <linux/mman.h> | 22 | #include <linux/mman.h> |
20 | #include <linux/errno.h> | 23 | #include <linux/errno.h> |
diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c index 9b2917a30294..2edcefc0a294 100644 --- a/fs/binfmt_flat.c +++ b/fs/binfmt_flat.c | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
22 | #include <linux/sched/task_stack.h> | ||
22 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
23 | #include <linux/mman.h> | 24 | #include <linux/mman.h> |
24 | #include <linux/errno.h> | 25 | #include <linux/errno.h> |
diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c index 9b4688ab1d8e..bee1a36bc2ec 100644 --- a/fs/binfmt_misc.c +++ b/fs/binfmt_misc.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/sched.h> | 15 | #include <linux/sched/mm.h> |
16 | #include <linux/magic.h> | 16 | #include <linux/magic.h> |
17 | #include <linux/binfmts.h> | 17 | #include <linux/binfmts.h> |
18 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 00e3518a26ef..29b7fc28c607 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -20,6 +20,7 @@ | |||
20 | #define __BTRFS_CTREE__ | 20 | #define __BTRFS_CTREE__ |
21 | 21 | ||
22 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
23 | #include <linux/sched/signal.h> | ||
23 | #include <linux/highmem.h> | 24 | #include <linux/highmem.h> |
24 | #include <linux/fs.h> | 25 | #include <linux/fs.h> |
25 | #include <linux/rwsem.h> | 26 | #include <linux/rwsem.h> |
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 60794658ffd8..be5477676cc8 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -16,6 +16,7 @@ | |||
16 | * Boston, MA 021110-1307, USA. | 16 | * Boston, MA 021110-1307, USA. |
17 | */ | 17 | */ |
18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
19 | #include <linux/sched/signal.h> | ||
19 | #include <linux/pagemap.h> | 20 | #include <linux/pagemap.h> |
20 | #include <linux/writeback.h> | 21 | #include <linux/writeback.h> |
21 | #include <linux/blkdev.h> | 22 | #include <linux/blkdev.h> |
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index 7dcf0b100dcd..da6841efac26 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <linux/pagemap.h> | 19 | #include <linux/pagemap.h> |
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/sched/signal.h> | ||
21 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
22 | #include <linux/math64.h> | 23 | #include <linux/math64.h> |
23 | #include <linux/ratelimit.h> | 24 | #include <linux/ratelimit.h> |
diff --git a/fs/buffer.c b/fs/buffer.c index 28484b3ebc98..9196f2a270da 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -19,6 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/sched/signal.h> | ||
22 | #include <linux/syscalls.h> | 23 | #include <linux/syscalls.h> |
23 | #include <linux/fs.h> | 24 | #include <linux/fs.h> |
24 | #include <linux/iomap.h> | 25 | #include <linux/iomap.h> |
diff --git a/fs/cachefiles/internal.h b/fs/cachefiles/internal.h index cd1effee8a49..9bf90bcc56ac 100644 --- a/fs/cachefiles/internal.h +++ b/fs/cachefiles/internal.h | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/fscache-cache.h> | 19 | #include <linux/fscache-cache.h> |
20 | #include <linux/timer.h> | 20 | #include <linux/timer.h> |
21 | #include <linux/wait.h> | 21 | #include <linux/wait.h> |
22 | #include <linux/cred.h> | ||
22 | #include <linux/workqueue.h> | 23 | #include <linux/workqueue.h> |
23 | #include <linux/security.h> | 24 | #include <linux/security.h> |
24 | 25 | ||
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index f297a9e18642..1a3e1b40799a 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/slab.h> | 8 | #include <linux/slab.h> |
9 | #include <linux/pagevec.h> | 9 | #include <linux/pagevec.h> |
10 | #include <linux/task_io_accounting_ops.h> | 10 | #include <linux/task_io_accounting_ops.h> |
11 | #include <linux/signal.h> | ||
11 | 12 | ||
12 | #include "super.h" | 13 | #include "super.h" |
13 | #include "mds_client.h" | 14 | #include "mds_client.h" |
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index cd966f276a8d..68c78be19d5b 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | #include <linux/fs.h> | 3 | #include <linux/fs.h> |
4 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
5 | #include <linux/sched.h> | 5 | #include <linux/sched/signal.h> |
6 | #include <linux/slab.h> | 6 | #include <linux/slab.h> |
7 | #include <linux/vmalloc.h> | 7 | #include <linux/vmalloc.h> |
8 | #include <linux/wait.h> | 8 | #include <linux/wait.h> |
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 8a3ecef30d3c..3aa457f83214 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/fs.h> | 21 | #include <linux/fs.h> |
22 | #include <linux/net.h> | 22 | #include <linux/net.h> |
23 | #include <linux/string.h> | 23 | #include <linux/string.h> |
24 | #include <linux/sched/signal.h> | ||
24 | #include <linux/list.h> | 25 | #include <linux/list.h> |
25 | #include <linux/wait.h> | 26 | #include <linux/wait.h> |
26 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 7ab5be7944aa..1858fc20eb7d 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
@@ -23,6 +23,8 @@ | |||
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | #include <linux/pagemap.h> | 24 | #include <linux/pagemap.h> |
25 | #include <linux/freezer.h> | 25 | #include <linux/freezer.h> |
26 | #include <linux/sched/signal.h> | ||
27 | |||
26 | #include <asm/div64.h> | 28 | #include <asm/div64.h> |
27 | #include "cifsfs.h" | 29 | #include "cifsfs.h" |
28 | #include "cifspdu.h" | 30 | #include "cifspdu.h" |
diff --git a/fs/coda/psdev.c b/fs/coda/psdev.c index 822629126e89..f40e3953e7fe 100644 --- a/fs/coda/psdev.c +++ b/fs/coda/psdev.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/major.h> | 23 | #include <linux/major.h> |
24 | #include <linux/time.h> | 24 | #include <linux/time.h> |
25 | #include <linux/sched.h> | 25 | #include <linux/sched/signal.h> |
26 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
27 | #include <linux/ioport.h> | 27 | #include <linux/ioport.h> |
28 | #include <linux/fcntl.h> | 28 | #include <linux/fcntl.h> |
diff --git a/fs/coda/upcall.c b/fs/coda/upcall.c index f6c6c8adbc01..e82357c89979 100644 --- a/fs/coda/upcall.c +++ b/fs/coda/upcall.c | |||
@@ -15,7 +15,7 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/signal.h> | 17 | #include <linux/signal.h> |
18 | #include <linux/sched.h> | 18 | #include <linux/sched/signal.h> |
19 | #include <linux/types.h> | 19 | #include <linux/types.h> |
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/mm.h> | 21 | #include <linux/mm.h> |
diff --git a/fs/compat.c b/fs/compat.c index e50a2114f474..c61b506f5bc9 100644 --- a/fs/compat.c +++ b/fs/compat.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/compat.h> | 21 | #include <linux/compat.h> |
22 | #include <linux/errno.h> | 22 | #include <linux/errno.h> |
23 | #include <linux/time.h> | 23 | #include <linux/time.h> |
24 | #include <linux/cred.h> | ||
24 | #include <linux/fs.h> | 25 | #include <linux/fs.h> |
25 | #include <linux/fcntl.h> | 26 | #include <linux/fcntl.h> |
26 | #include <linux/namei.h> | 27 | #include <linux/namei.h> |
diff --git a/fs/coredump.c b/fs/coredump.c index ae6b05629ca1..592683711c64 100644 --- a/fs/coredump.c +++ b/fs/coredump.c | |||
@@ -16,6 +16,9 @@ | |||
16 | #include <linux/personality.h> | 16 | #include <linux/personality.h> |
17 | #include <linux/binfmts.h> | 17 | #include <linux/binfmts.h> |
18 | #include <linux/coredump.h> | 18 | #include <linux/coredump.h> |
19 | #include <linux/sched/coredump.h> | ||
20 | #include <linux/sched/signal.h> | ||
21 | #include <linux/sched/task_stack.h> | ||
19 | #include <linux/utsname.h> | 22 | #include <linux/utsname.h> |
20 | #include <linux/pid_namespace.h> | 23 | #include <linux/pid_namespace.h> |
21 | #include <linux/module.h> | 24 | #include <linux/module.h> |
@@ -33,7 +36,6 @@ | |||
33 | #include <linux/pipe_fs_i.h> | 36 | #include <linux/pipe_fs_i.h> |
34 | #include <linux/oom.h> | 37 | #include <linux/oom.h> |
35 | #include <linux/compat.h> | 38 | #include <linux/compat.h> |
36 | #include <linux/sched.h> | ||
37 | #include <linux/fs.h> | 39 | #include <linux/fs.h> |
38 | #include <linux/path.h> | 40 | #include <linux/path.h> |
39 | #include <linux/timekeeping.h> | 41 | #include <linux/timekeeping.h> |
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/pagevec.h> | 27 | #include <linux/pagevec.h> |
28 | #include <linux/pmem.h> | 28 | #include <linux/pmem.h> |
29 | #include <linux/sched.h> | 29 | #include <linux/sched.h> |
30 | #include <linux/sched/signal.h> | ||
30 | #include <linux/uio.h> | 31 | #include <linux/uio.h> |
31 | #include <linux/vmstat.h> | 32 | #include <linux/vmstat.h> |
32 | #include <linux/pfn_t.h> | 33 | #include <linux/pfn_t.h> |
diff --git a/fs/dlm/user.c b/fs/dlm/user.c index 1ce908c2232c..23488f559cf9 100644 --- a/fs/dlm/user.c +++ b/fs/dlm/user.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/dlm.h> | 17 | #include <linux/dlm.h> |
18 | #include <linux/dlm_device.h> | 18 | #include <linux/dlm_device.h> |
19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | #include <linux/sched/signal.h> | ||
20 | 21 | ||
21 | #include "dlm_internal.h" | 22 | #include "dlm_internal.h" |
22 | #include "lockspace.h" | 23 | #include "lockspace.h" |
diff --git a/fs/ecryptfs/read_write.c b/fs/ecryptfs/read_write.c index 158a3a39f82d..039e627194a9 100644 --- a/fs/ecryptfs/read_write.c +++ b/fs/ecryptfs/read_write.c | |||
@@ -22,6 +22,8 @@ | |||
22 | 22 | ||
23 | #include <linux/fs.h> | 23 | #include <linux/fs.h> |
24 | #include <linux/pagemap.h> | 24 | #include <linux/pagemap.h> |
25 | #include <linux/sched/signal.h> | ||
26 | |||
25 | #include "ecryptfs_kernel.h" | 27 | #include "ecryptfs_kernel.h" |
26 | 28 | ||
27 | /** | 29 | /** |
diff --git a/fs/eventfd.c b/fs/eventfd.c index 1231cd1999d8..68b9fffcb2c8 100644 --- a/fs/eventfd.c +++ b/fs/eventfd.c | |||
@@ -9,7 +9,7 @@ | |||
9 | #include <linux/poll.h> | 9 | #include <linux/poll.h> |
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
11 | #include <linux/fs.h> | 11 | #include <linux/fs.h> |
12 | #include <linux/sched.h> | 12 | #include <linux/sched/signal.h> |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
15 | #include <linux/list.h> | 15 | #include <linux/list.h> |
diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 5ec16313da1a..341251421ced 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c | |||
@@ -13,7 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched/signal.h> |
17 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
18 | #include <linux/file.h> | 18 | #include <linux/file.h> |
19 | #include <linux/signal.h> | 19 | #include <linux/signal.h> |
@@ -32,6 +32,11 @@ | |||
32 | #include <linux/swap.h> | 32 | #include <linux/swap.h> |
33 | #include <linux/string.h> | 33 | #include <linux/string.h> |
34 | #include <linux/init.h> | 34 | #include <linux/init.h> |
35 | #include <linux/sched/mm.h> | ||
36 | #include <linux/sched/coredump.h> | ||
37 | #include <linux/sched/signal.h> | ||
38 | #include <linux/sched/numa_balancing.h> | ||
39 | #include <linux/sched/task.h> | ||
35 | #include <linux/pagemap.h> | 40 | #include <linux/pagemap.h> |
36 | #include <linux/perf_event.h> | 41 | #include <linux/perf_event.h> |
37 | #include <linux/highmem.h> | 42 | #include <linux/highmem.h> |
@@ -1088,7 +1093,7 @@ static int de_thread(struct task_struct *tsk) | |||
1088 | struct task_struct *leader = tsk->group_leader; | 1093 | struct task_struct *leader = tsk->group_leader; |
1089 | 1094 | ||
1090 | for (;;) { | 1095 | for (;;) { |
1091 | threadgroup_change_begin(tsk); | 1096 | cgroup_threadgroup_change_begin(tsk); |
1092 | write_lock_irq(&tasklist_lock); | 1097 | write_lock_irq(&tasklist_lock); |
1093 | /* | 1098 | /* |
1094 | * Do this under tasklist_lock to ensure that | 1099 | * Do this under tasklist_lock to ensure that |
@@ -1099,7 +1104,7 @@ static int de_thread(struct task_struct *tsk) | |||
1099 | break; | 1104 | break; |
1100 | __set_current_state(TASK_KILLABLE); | 1105 | __set_current_state(TASK_KILLABLE); |
1101 | write_unlock_irq(&tasklist_lock); | 1106 | write_unlock_irq(&tasklist_lock); |
1102 | threadgroup_change_end(tsk); | 1107 | cgroup_threadgroup_change_end(tsk); |
1103 | schedule(); | 1108 | schedule(); |
1104 | if (unlikely(__fatal_signal_pending(tsk))) | 1109 | if (unlikely(__fatal_signal_pending(tsk))) |
1105 | goto killed; | 1110 | goto killed; |
@@ -1157,7 +1162,7 @@ static int de_thread(struct task_struct *tsk) | |||
1157 | if (unlikely(leader->ptrace)) | 1162 | if (unlikely(leader->ptrace)) |
1158 | __wake_up_parent(leader, leader->parent); | 1163 | __wake_up_parent(leader, leader->parent); |
1159 | write_unlock_irq(&tasklist_lock); | 1164 | write_unlock_irq(&tasklist_lock); |
1160 | threadgroup_change_end(tsk); | 1165 | cgroup_threadgroup_change_end(tsk); |
1161 | 1166 | ||
1162 | release_task(leader); | 1167 | release_task(leader); |
1163 | } | 1168 | } |
diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c index a4b531be9168..9ec1038f937e 100644 --- a/fs/exportfs/expfs.c +++ b/fs/exportfs/expfs.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/mount.h> | 15 | #include <linux/mount.h> |
16 | #include <linux/namei.h> | 16 | #include <linux/namei.h> |
17 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
18 | #include <linux/cred.h> | ||
18 | 19 | ||
19 | #define dprintk(fmt, args...) do{}while(0) | 20 | #define dprintk(fmt, args...) do{}while(0) |
20 | 21 | ||
diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c index 4c40c0786e16..d0bdb74f0e15 100644 --- a/fs/ext2/balloc.c +++ b/fs/ext2/balloc.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/quotaops.h> | 15 | #include <linux/quotaops.h> |
16 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
17 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
18 | #include <linux/cred.h> | ||
18 | #include <linux/buffer_head.h> | 19 | #include <linux/buffer_head.h> |
19 | #include <linux/capability.h> | 20 | #include <linux/capability.h> |
20 | 21 | ||
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 2fd17e8e4984..77798a46b0c6 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/timer.h> | 28 | #include <linux/timer.h> |
29 | #include <linux/version.h> | 29 | #include <linux/version.h> |
30 | #include <linux/wait.h> | 30 | #include <linux/wait.h> |
31 | #include <linux/sched/signal.h> | ||
31 | #include <linux/blockgroup_lock.h> | 32 | #include <linux/blockgroup_lock.h> |
32 | #include <linux/percpu_counter.h> | 33 | #include <linux/percpu_counter.h> |
33 | #include <linux/ratelimit.h> | 34 | #include <linux/ratelimit.h> |
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index b14bae2598bc..17bc043308f3 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c | |||
@@ -21,6 +21,8 @@ | |||
21 | #include <linux/random.h> | 21 | #include <linux/random.h> |
22 | #include <linux/bitops.h> | 22 | #include <linux/bitops.h> |
23 | #include <linux/blkdev.h> | 23 | #include <linux/blkdev.h> |
24 | #include <linux/cred.h> | ||
25 | |||
24 | #include <asm/byteorder.h> | 26 | #include <asm/byteorder.h> |
25 | 27 | ||
26 | #include "ext4.h" | 28 | #include "ext4.h" |
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 1375fef11146..1602b4bccae6 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
23 | #include <linux/memcontrol.h> | 23 | #include <linux/memcontrol.h> |
24 | #include <linux/cleancache.h> | 24 | #include <linux/cleancache.h> |
25 | #include <linux/sched/signal.h> | ||
25 | 26 | ||
26 | #include "f2fs.h" | 27 | #include "f2fs.h" |
27 | #include "node.h" | 28 | #include "node.h" |
diff --git a/fs/fcntl.c b/fs/fcntl.c index e1c54f20325c..be8fbe289087 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/syscalls.h> | 7 | #include <linux/syscalls.h> |
8 | #include <linux/init.h> | 8 | #include <linux/init.h> |
9 | #include <linux/mm.h> | 9 | #include <linux/mm.h> |
10 | #include <linux/sched/task.h> | ||
10 | #include <linux/fs.h> | 11 | #include <linux/fs.h> |
11 | #include <linux/file.h> | 12 | #include <linux/file.h> |
12 | #include <linux/fdtable.h> | 13 | #include <linux/fdtable.h> |
@@ -12,7 +12,7 @@ | |||
12 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
13 | #include <linux/mmzone.h> | 13 | #include <linux/mmzone.h> |
14 | #include <linux/time.h> | 14 | #include <linux/time.h> |
15 | #include <linux/sched.h> | 15 | #include <linux/sched/signal.h> |
16 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
17 | #include <linux/vmalloc.h> | 17 | #include <linux/vmalloc.h> |
18 | #include <linux/file.h> | 18 | #include <linux/file.h> |
diff --git a/fs/file_table.c b/fs/file_table.c index 6d982b57de92..954d510b765a 100644 --- a/fs/file_table.c +++ b/fs/file_table.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/fs.h> | 14 | #include <linux/fs.h> |
15 | #include <linux/security.h> | 15 | #include <linux/security.h> |
16 | #include <linux/cred.h> | ||
16 | #include <linux/eventpoll.h> | 17 | #include <linux/eventpoll.h> |
17 | #include <linux/rcupdate.h> | 18 | #include <linux/rcupdate.h> |
18 | #include <linux/mount.h> | 19 | #include <linux/mount.h> |
diff --git a/fs/fs_struct.c b/fs/fs_struct.c index 7dca743b2ce1..be0250788b73 100644 --- a/fs/fs_struct.c +++ b/fs/fs_struct.c | |||
@@ -1,5 +1,6 @@ | |||
1 | #include <linux/export.h> | 1 | #include <linux/export.h> |
2 | #include <linux/sched.h> | 2 | #include <linux/sched/signal.h> |
3 | #include <linux/sched/task.h> | ||
3 | #include <linux/fs.h> | 4 | #include <linux/fs.h> |
4 | #include <linux/path.h> | 5 | #include <linux/path.h> |
5 | #include <linux/slab.h> | 6 | #include <linux/slab.h> |
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index f11792672977..b681b43c766e 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/poll.h> | 13 | #include <linux/poll.h> |
14 | #include <linux/sched/signal.h> | ||
14 | #include <linux/uio.h> | 15 | #include <linux/uio.h> |
15 | #include <linux/miscdevice.h> | 16 | #include <linux/miscdevice.h> |
16 | #include <linux/pagemap.h> | 17 | #include <linux/pagemap.h> |
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index eb7724b8578a..9d28f55fbd1d 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/buffer_head.h> | 13 | #include <linux/buffer_head.h> |
14 | #include <linux/namei.h> | 14 | #include <linux/namei.h> |
15 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
16 | #include <linux/cred.h> | ||
16 | #include <linux/xattr.h> | 17 | #include <linux/xattr.h> |
17 | #include <linux/posix_acl.h> | 18 | #include <linux/posix_acl.h> |
18 | #include <linux/gfs2_ondisk.h> | 19 | #include <linux/gfs2_ondisk.h> |
diff --git a/fs/gfs2/lock_dlm.c b/fs/gfs2/lock_dlm.c index 8b907c5cc913..0515f0a68637 100644 --- a/fs/gfs2/lock_dlm.c +++ b/fs/gfs2/lock_dlm.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
17 | #include <linux/gfs2_ondisk.h> | 17 | #include <linux/gfs2_ondisk.h> |
18 | #include <linux/sched/signal.h> | ||
18 | 19 | ||
19 | #include "incore.h" | 20 | #include "incore.h" |
20 | #include "glock.h" | 21 | #include "glock.h" |
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index e3ee387a6dfe..361796a84fce 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c | |||
@@ -10,7 +10,7 @@ | |||
10 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | 10 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
11 | 11 | ||
12 | #include <linux/bio.h> | 12 | #include <linux/bio.h> |
13 | #include <linux/sched.h> | 13 | #include <linux/sched/signal.h> |
14 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
15 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
16 | #include <linux/completion.h> | 16 | #include <linux/completion.h> |
diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c index f8d30e41d1d3..7a515345610c 100644 --- a/fs/gfs2/sys.c +++ b/fs/gfs2/sys.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | 10 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
11 | 11 | ||
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/cred.h> | ||
13 | #include <linux/spinlock.h> | 14 | #include <linux/spinlock.h> |
14 | #include <linux/completion.h> | 15 | #include <linux/completion.h> |
15 | #include <linux/buffer_head.h> | 16 | #include <linux/buffer_head.h> |
diff --git a/fs/hfs/inode.c b/fs/hfs/inode.c index f776acf2378a..bfbba799430f 100644 --- a/fs/hfs/inode.c +++ b/fs/hfs/inode.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/pagemap.h> | 14 | #include <linux/pagemap.h> |
15 | #include <linux/mpage.h> | 15 | #include <linux/mpage.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/cred.h> | ||
17 | #include <linux/uio.h> | 18 | #include <linux/uio.h> |
18 | #include <linux/xattr.h> | 19 | #include <linux/xattr.h> |
19 | 20 | ||
diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c index 2e796f8302ff..e8638d528195 100644 --- a/fs/hfsplus/inode.c +++ b/fs/hfsplus/inode.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/pagemap.h> | 14 | #include <linux/pagemap.h> |
15 | #include <linux/mpage.h> | 15 | #include <linux/mpage.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/cred.h> | ||
17 | #include <linux/uio.h> | 18 | #include <linux/uio.h> |
18 | 19 | ||
19 | #include "hfsplus_fs.h" | 20 | #include "hfsplus_fs.h" |
diff --git a/fs/hpfs/hpfs_fn.h b/fs/hpfs/hpfs_fn.h index aebb78f9e47f..d352f3a6af7f 100644 --- a/fs/hpfs/hpfs_fn.h +++ b/fs/hpfs/hpfs_fn.h | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/pagemap.h> | 18 | #include <linux/pagemap.h> |
19 | #include <linux/buffer_head.h> | 19 | #include <linux/buffer_head.h> |
20 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
21 | #include <linux/sched.h> | 21 | #include <linux/sched/signal.h> |
22 | #include <linux/blkdev.h> | 22 | #include <linux/blkdev.h> |
23 | #include <asm/unaligned.h> | 23 | #include <asm/unaligned.h> |
24 | 24 | ||
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index 54de77e78775..8f96461236f6 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c | |||
@@ -11,7 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/thread_info.h> | 12 | #include <linux/thread_info.h> |
13 | #include <asm/current.h> | 13 | #include <asm/current.h> |
14 | #include <linux/sched.h> /* remove ASAP */ | 14 | #include <linux/sched/signal.h> /* remove ASAP */ |
15 | #include <linux/falloc.h> | 15 | #include <linux/falloc.h> |
16 | #include <linux/fs.h> | 16 | #include <linux/fs.h> |
17 | #include <linux/mount.h> | 17 | #include <linux/mount.h> |
diff --git a/fs/ioctl.c b/fs/ioctl.c index cb9b02940805..569db68d02b3 100644 --- a/fs/ioctl.c +++ b/fs/ioctl.c | |||
@@ -15,6 +15,8 @@ | |||
15 | #include <linux/writeback.h> | 15 | #include <linux/writeback.h> |
16 | #include <linux/buffer_head.h> | 16 | #include <linux/buffer_head.h> |
17 | #include <linux/falloc.h> | 17 | #include <linux/falloc.h> |
18 | #include <linux/sched/signal.h> | ||
19 | |||
18 | #include "internal.h" | 20 | #include "internal.h" |
19 | 21 | ||
20 | #include <asm/ioctls.h> | 22 | #include <asm/ioctls.h> |
diff --git a/fs/iomap.c b/fs/iomap.c index 0f85f2410605..3ca1a8e44135 100644 --- a/fs/iomap.c +++ b/fs/iomap.c | |||
@@ -26,6 +26,8 @@ | |||
26 | #include <linux/buffer_head.h> | 26 | #include <linux/buffer_head.h> |
27 | #include <linux/task_io_accounting_ops.h> | 27 | #include <linux/task_io_accounting_ops.h> |
28 | #include <linux/dax.h> | 28 | #include <linux/dax.h> |
29 | #include <linux/sched/signal.h> | ||
30 | |||
29 | #include "internal.h" | 31 | #include "internal.h" |
30 | 32 | ||
31 | /* | 33 | /* |
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c index 871c8b392099..020ba0936146 100644 --- a/fs/isofs/inode.c +++ b/fs/isofs/inode.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | 16 | ||
17 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
18 | #include <linux/cred.h> | ||
18 | #include <linux/nls.h> | 19 | #include <linux/nls.h> |
19 | #include <linux/ctype.h> | 20 | #include <linux/ctype.h> |
20 | #include <linux/statfs.h> | 21 | #include <linux/statfs.h> |
diff --git a/fs/jffs2/background.c b/fs/jffs2/background.c index e5c1783ab64a..453a6a1fff34 100644 --- a/fs/jffs2/background.c +++ b/fs/jffs2/background.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/jffs2.h> | 16 | #include <linux/jffs2.h> |
17 | #include <linux/mtd/mtd.h> | 17 | #include <linux/mtd/mtd.h> |
18 | #include <linux/completion.h> | 18 | #include <linux/completion.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched/signal.h> |
20 | #include <linux/freezer.h> | 20 | #include <linux/freezer.h> |
21 | #include <linux/kthread.h> | 21 | #include <linux/kthread.h> |
22 | #include "nodelist.h" | 22 | #include "nodelist.h" |
diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c index 567653f7c0ce..76fa814df3d1 100644 --- a/fs/jffs2/fs.c +++ b/fs/jffs2/fs.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/capability.h> | 15 | #include <linux/capability.h> |
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
18 | #include <linux/cred.h> | ||
18 | #include <linux/fs.h> | 19 | #include <linux/fs.h> |
19 | #include <linux/list.h> | 20 | #include <linux/list.h> |
20 | #include <linux/mtd/mtd.h> | 21 | #include <linux/mtd/mtd.h> |
diff --git a/fs/jffs2/nodemgmt.c b/fs/jffs2/nodemgmt.c index cda0774c2c9c..a7bbe879cfc3 100644 --- a/fs/jffs2/nodemgmt.c +++ b/fs/jffs2/nodemgmt.c | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/mtd/mtd.h> | 15 | #include <linux/mtd/mtd.h> |
16 | #include <linux/compiler.h> | 16 | #include <linux/compiler.h> |
17 | #include <linux/sched.h> /* For cond_resched() */ | 17 | #include <linux/sched/signal.h> |
18 | #include "nodelist.h" | 18 | #include "nodelist.h" |
19 | #include "debug.h" | 19 | #include "debug.h" |
20 | 20 | ||
diff --git a/fs/kernfs/file.c b/fs/kernfs/file.c index 35043a8c4529..8e4dc7ab584c 100644 --- a/fs/kernfs/file.c +++ b/fs/kernfs/file.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
14 | #include <linux/poll.h> | 14 | #include <linux/poll.h> |
15 | #include <linux/pagemap.h> | 15 | #include <linux/pagemap.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched/mm.h> |
17 | #include <linux/fsnotify.h> | 17 | #include <linux/fsnotify.h> |
18 | 18 | ||
19 | #include "kernfs-internal.h" | 19 | #include "kernfs-internal.h" |
diff --git a/fs/libfs.c b/fs/libfs.c index 28d6f35feed6..217896ca4fae 100644 --- a/fs/libfs.c +++ b/fs/libfs.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/export.h> | 7 | #include <linux/export.h> |
8 | #include <linux/pagemap.h> | 8 | #include <linux/pagemap.h> |
9 | #include <linux/slab.h> | 9 | #include <linux/slab.h> |
10 | #include <linux/cred.h> | ||
10 | #include <linux/mount.h> | 11 | #include <linux/mount.h> |
11 | #include <linux/vfs.h> | 12 | #include <linux/vfs.h> |
12 | #include <linux/quotaops.h> | 13 | #include <linux/quotaops.h> |
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c index 7e4ea3b9f472..e7c8b9c76e48 100644 --- a/fs/lockd/svc.c +++ b/fs/lockd/svc.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/sysctl.h> | 17 | #include <linux/sysctl.h> |
18 | #include <linux/moduleparam.h> | 18 | #include <linux/moduleparam.h> |
19 | 19 | ||
20 | #include <linux/sched.h> | 20 | #include <linux/sched/signal.h> |
21 | #include <linux/errno.h> | 21 | #include <linux/errno.h> |
22 | #include <linux/in.h> | 22 | #include <linux/in.h> |
23 | #include <linux/uio.h> | 23 | #include <linux/uio.h> |
diff --git a/fs/namespace.c b/fs/namespace.c index 8bfad42c1ccf..cc1375eff88c 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/user_namespace.h> | 15 | #include <linux/user_namespace.h> |
16 | #include <linux/namei.h> | 16 | #include <linux/namei.h> |
17 | #include <linux/security.h> | 17 | #include <linux/security.h> |
18 | #include <linux/cred.h> | ||
18 | #include <linux/idr.h> | 19 | #include <linux/idr.h> |
19 | #include <linux/init.h> /* init_rootfs */ | 20 | #include <linux/init.h> /* init_rootfs */ |
20 | #include <linux/fs_struct.h> /* get_fs_root et.al. */ | 21 | #include <linux/fs_struct.h> /* get_fs_root et.al. */ |
@@ -24,6 +25,8 @@ | |||
24 | #include <linux/magic.h> | 25 | #include <linux/magic.h> |
25 | #include <linux/bootmem.h> | 26 | #include <linux/bootmem.h> |
26 | #include <linux/task_work.h> | 27 | #include <linux/task_work.h> |
28 | #include <linux/sched/task.h> | ||
29 | |||
27 | #include "pnode.h" | 30 | #include "pnode.h" |
28 | #include "internal.h" | 31 | #include "internal.h" |
29 | 32 | ||
diff --git a/fs/ncpfs/inode.c b/fs/ncpfs/inode.c index 7eb89c23c847..d5606099712a 100644 --- a/fs/ncpfs/inode.c +++ b/fs/ncpfs/inode.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/vfs.h> | 30 | #include <linux/vfs.h> |
31 | #include <linux/mount.h> | 31 | #include <linux/mount.h> |
32 | #include <linux/seq_file.h> | 32 | #include <linux/seq_file.h> |
33 | #include <linux/sched/signal.h> | ||
33 | #include <linux/namei.h> | 34 | #include <linux/namei.h> |
34 | 35 | ||
35 | #include <net/sock.h> | 36 | #include <net/sock.h> |
diff --git a/fs/ncpfs/ioctl.c b/fs/ncpfs/ioctl.c index 4434e4977cf3..12550c2320cc 100644 --- a/fs/ncpfs/ioctl.c +++ b/fs/ncpfs/ioctl.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/highuid.h> | 19 | #include <linux/highuid.h> |
20 | #include <linux/vmalloc.h> | 20 | #include <linux/vmalloc.h> |
21 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
22 | #include <linux/cred.h> | ||
22 | 23 | ||
23 | #include <linux/uaccess.h> | 24 | #include <linux/uaccess.h> |
24 | 25 | ||
diff --git a/fs/ncpfs/sock.c b/fs/ncpfs/sock.c index 4bfeae289b00..98b6db0ed63e 100644 --- a/fs/ncpfs/sock.c +++ b/fs/ncpfs/sock.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/fcntl.h> | 16 | #include <linux/fcntl.h> |
17 | #include <linux/stat.h> | 17 | #include <linux/stat.h> |
18 | #include <linux/string.h> | 18 | #include <linux/string.h> |
19 | #include <linux/sched/signal.h> | ||
19 | #include <linux/uaccess.h> | 20 | #include <linux/uaccess.h> |
20 | #include <linux/in.h> | 21 | #include <linux/in.h> |
21 | #include <linux/net.h> | 22 | #include <linux/net.h> |
diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index 484bebc20bca..bb79972dc638 100644 --- a/fs/nfs/callback.c +++ b/fs/nfs/callback.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/completion.h> | 9 | #include <linux/completion.h> |
10 | #include <linux/ip.h> | 10 | #include <linux/ip.h> |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/sched/signal.h> | ||
12 | #include <linux/sunrpc/svc.h> | 13 | #include <linux/sunrpc/svc.h> |
13 | #include <linux/sunrpc/svcsock.h> | 14 | #include <linux/sunrpc/svcsock.h> |
14 | #include <linux/nfs_fs.h> | 15 | #include <linux/nfs_fs.h> |
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 5ca4d96b1942..685565b229c3 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/sched.h> | 18 | #include <linux/sched/signal.h> |
19 | #include <linux/time.h> | 19 | #include <linux/time.h> |
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/mm.h> | 21 | #include <linux/mm.h> |
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c index efd66da99201..786a4a2cb2d7 100644 --- a/fs/nfsd/nfssvc.c +++ b/fs/nfsd/nfssvc.c | |||
@@ -6,7 +6,7 @@ | |||
6 | * Copyright (C) 1995, 1996, 1997 Olaf Kirch <okir@monad.swb.de> | 6 | * Copyright (C) 1995, 1996, 1997 Olaf Kirch <okir@monad.swb.de> |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/sched.h> | 9 | #include <linux/sched/signal.h> |
10 | #include <linux/freezer.h> | 10 | #include <linux/freezer.h> |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/fs_struct.h> | 12 | #include <linux/fs_struct.h> |
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c index 7d18d62e8e07..febed1217b3f 100644 --- a/fs/nilfs2/segment.c +++ b/fs/nilfs2/segment.c | |||
@@ -30,6 +30,8 @@ | |||
30 | #include <linux/crc32.h> | 30 | #include <linux/crc32.h> |
31 | #include <linux/pagevec.h> | 31 | #include <linux/pagevec.h> |
32 | #include <linux/slab.h> | 32 | #include <linux/slab.h> |
33 | #include <linux/sched/signal.h> | ||
34 | |||
33 | #include "nilfs.h" | 35 | #include "nilfs.h" |
34 | #include "btnode.h" | 36 | #include "btnode.h" |
35 | #include "page.h" | 37 | #include "page.h" |
diff --git a/fs/notify/fanotify/fanotify.c b/fs/notify/fanotify/fanotify.c index a4c46221755e..e5f7e47de68e 100644 --- a/fs/notify/fanotify/fanotify.c +++ b/fs/notify/fanotify/fanotify.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/kernel.h> /* UINT_MAX */ | 6 | #include <linux/kernel.h> /* UINT_MAX */ |
7 | #include <linux/mount.h> | 7 | #include <linux/mount.h> |
8 | #include <linux/sched.h> | 8 | #include <linux/sched.h> |
9 | #include <linux/sched/user.h> | ||
9 | #include <linux/types.h> | 10 | #include <linux/types.h> |
10 | #include <linux/wait.h> | 11 | #include <linux/wait.h> |
11 | 12 | ||
diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c index 7ebfca6a1427..2b37f2785834 100644 --- a/fs/notify/fanotify/fanotify_user.c +++ b/fs/notify/fanotify/fanotify_user.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
15 | #include <linux/uaccess.h> | 15 | #include <linux/uaccess.h> |
16 | #include <linux/compat.h> | 16 | #include <linux/compat.h> |
17 | #include <linux/sched/signal.h> | ||
17 | 18 | ||
18 | #include <asm/ioctls.h> | 19 | #include <asm/ioctls.h> |
19 | 20 | ||
diff --git a/fs/notify/inotify/inotify_fsnotify.c b/fs/notify/inotify/inotify_fsnotify.c index f36c29398de3..1aeb837ae414 100644 --- a/fs/notify/inotify/inotify_fsnotify.c +++ b/fs/notify/inotify/inotify_fsnotify.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/slab.h> /* kmem_* */ | 30 | #include <linux/slab.h> /* kmem_* */ |
31 | #include <linux/types.h> | 31 | #include <linux/types.h> |
32 | #include <linux/sched.h> | 32 | #include <linux/sched.h> |
33 | #include <linux/sched/user.h> | ||
33 | 34 | ||
34 | #include "inotify.h" | 35 | #include "inotify.h" |
35 | 36 | ||
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c index 1cf41c623be1..498d609b26c7 100644 --- a/fs/notify/inotify/inotify_user.c +++ b/fs/notify/inotify/inotify_user.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include <linux/inotify.h> | 30 | #include <linux/inotify.h> |
31 | #include <linux/kernel.h> /* roundup() */ | 31 | #include <linux/kernel.h> /* roundup() */ |
32 | #include <linux/namei.h> /* LOOKUP_FOLLOW */ | 32 | #include <linux/namei.h> /* LOOKUP_FOLLOW */ |
33 | #include <linux/sched.h> /* struct user */ | 33 | #include <linux/sched/signal.h> |
34 | #include <linux/slab.h> /* struct kmem_cache */ | 34 | #include <linux/slab.h> /* struct kmem_cache */ |
35 | #include <linux/syscalls.h> | 35 | #include <linux/syscalls.h> |
36 | #include <linux/types.h> | 36 | #include <linux/types.h> |
diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c index 358ed7e1195a..c4f68c338735 100644 --- a/fs/ntfs/file.c +++ b/fs/ntfs/file.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include <linux/gfp.h> | 24 | #include <linux/gfp.h> |
25 | #include <linux/pagemap.h> | 25 | #include <linux/pagemap.h> |
26 | #include <linux/pagevec.h> | 26 | #include <linux/pagevec.h> |
27 | #include <linux/sched.h> | 27 | #include <linux/sched/signal.h> |
28 | #include <linux/swap.h> | 28 | #include <linux/swap.h> |
29 | #include <linux/uio.h> | 29 | #include <linux/uio.h> |
30 | #include <linux/writeback.h> | 30 | #include <linux/writeback.h> |
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index d4ec0d8961a6..fb15a96df0b6 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/swap.h> | 30 | #include <linux/swap.h> |
31 | #include <linux/quotaops.h> | 31 | #include <linux/quotaops.h> |
32 | #include <linux/blkdev.h> | 32 | #include <linux/blkdev.h> |
33 | #include <linux/sched/signal.h> | ||
33 | 34 | ||
34 | #include <cluster/masklog.h> | 35 | #include <cluster/masklog.h> |
35 | 36 | ||
diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c index ec000575e863..4348027384f5 100644 --- a/fs/ocfs2/cluster/tcp.c +++ b/fs/ocfs2/cluster/tcp.c | |||
@@ -54,6 +54,7 @@ | |||
54 | */ | 54 | */ |
55 | 55 | ||
56 | #include <linux/kernel.h> | 56 | #include <linux/kernel.h> |
57 | #include <linux/sched/mm.h> | ||
57 | #include <linux/jiffies.h> | 58 | #include <linux/jiffies.h> |
58 | #include <linux/slab.h> | 59 | #include <linux/slab.h> |
59 | #include <linux/idr.h> | 60 | #include <linux/idr.h> |
diff --git a/fs/ocfs2/dlm/dlmdomain.c b/fs/ocfs2/dlm/dlmdomain.c index 32fd261ae13d..a2b19fbdcf46 100644 --- a/fs/ocfs2/dlm/dlmdomain.c +++ b/fs/ocfs2/dlm/dlmdomain.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/delay.h> | 33 | #include <linux/delay.h> |
34 | #include <linux/err.h> | 34 | #include <linux/err.h> |
35 | #include <linux/debugfs.h> | 35 | #include <linux/debugfs.h> |
36 | #include <linux/sched/signal.h> | ||
36 | 37 | ||
37 | #include "cluster/heartbeat.h" | 38 | #include "cluster/heartbeat.h" |
38 | #include "cluster/nodemanager.h" | 39 | #include "cluster/nodemanager.h" |
diff --git a/fs/ocfs2/dlmfs/userdlm.c b/fs/ocfs2/dlmfs/userdlm.c index f70cda2f090d..9cecf4857195 100644 --- a/fs/ocfs2/dlmfs/userdlm.c +++ b/fs/ocfs2/dlmfs/userdlm.c | |||
@@ -28,6 +28,7 @@ | |||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/signal.h> | 30 | #include <linux/signal.h> |
31 | #include <linux/sched/signal.h> | ||
31 | 32 | ||
32 | #include <linux/module.h> | 33 | #include <linux/module.h> |
33 | #include <linux/fs.h> | 34 | #include <linux/fs.h> |
diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c index 8dce4099a6ca..3b7c937a36b5 100644 --- a/fs/ocfs2/dlmglue.c +++ b/fs/ocfs2/dlmglue.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/seq_file.h> | 33 | #include <linux/seq_file.h> |
34 | #include <linux/time.h> | 34 | #include <linux/time.h> |
35 | #include <linux/quotaops.h> | 35 | #include <linux/quotaops.h> |
36 | #include <linux/sched/signal.h> | ||
36 | 37 | ||
37 | #define MLOG_MASK_PREFIX ML_DLM_GLUE | 38 | #define MLOG_MASK_PREFIX ML_DLM_GLUE |
38 | #include <cluster/masklog.h> | 39 | #include <cluster/masklog.h> |
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index a24e42f95341..ca1646fbcaef 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/seq_file.h> | 42 | #include <linux/seq_file.h> |
43 | #include <linux/quotaops.h> | 43 | #include <linux/quotaops.h> |
44 | #include <linux/cleancache.h> | 44 | #include <linux/cleancache.h> |
45 | #include <linux/signal.h> | ||
45 | 46 | ||
46 | #define CREATE_TRACE_POINTS | 47 | #define CREATE_TRACE_POINTS |
47 | #include "ocfs2_trace.h" | 48 | #include "ocfs2_trace.h" |
diff --git a/fs/omfs/inode.c b/fs/omfs/inode.c index df7ea8543a2e..8c9034ee7383 100644 --- a/fs/omfs/inode.c +++ b/fs/omfs/inode.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/slab.h> | 8 | #include <linux/slab.h> |
9 | #include <linux/fs.h> | 9 | #include <linux/fs.h> |
10 | #include <linux/vfs.h> | 10 | #include <linux/vfs.h> |
11 | #include <linux/cred.h> | ||
11 | #include <linux/parser.h> | 12 | #include <linux/parser.h> |
12 | #include <linux/buffer_head.h> | 13 | #include <linux/buffer_head.h> |
13 | #include <linux/vmalloc.h> | 14 | #include <linux/vmalloc.h> |
diff --git a/fs/orangefs/orangefs-kernel.h b/fs/orangefs/orangefs-kernel.h index 70355a9a2596..8948683b367f 100644 --- a/fs/orangefs/orangefs-kernel.h +++ b/fs/orangefs/orangefs-kernel.h | |||
@@ -41,7 +41,7 @@ | |||
41 | #include <linux/uaccess.h> | 41 | #include <linux/uaccess.h> |
42 | #include <linux/atomic.h> | 42 | #include <linux/atomic.h> |
43 | #include <linux/uio.h> | 43 | #include <linux/uio.h> |
44 | #include <linux/sched.h> | 44 | #include <linux/sched/signal.h> |
45 | #include <linux/mm.h> | 45 | #include <linux/mm.h> |
46 | #include <linux/wait.h> | 46 | #include <linux/wait.h> |
47 | #include <linux/dcache.h> | 47 | #include <linux/dcache.h> |
diff --git a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c index f57043dace62..a34aa7aa2563 100644 --- a/fs/overlayfs/copy_up.c +++ b/fs/overlayfs/copy_up.c | |||
@@ -15,7 +15,8 @@ | |||
15 | #include <linux/xattr.h> | 15 | #include <linux/xattr.h> |
16 | #include <linux/security.h> | 16 | #include <linux/security.h> |
17 | #include <linux/uaccess.h> | 17 | #include <linux/uaccess.h> |
18 | #include <linux/sched.h> | 18 | #include <linux/sched/signal.h> |
19 | #include <linux/cred.h> | ||
19 | #include <linux/namei.h> | 20 | #include <linux/namei.h> |
20 | #include <linux/fdtable.h> | 21 | #include <linux/fdtable.h> |
21 | #include <linux/ratelimit.h> | 22 | #include <linux/ratelimit.h> |
diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c index 08643ac44a02..6639f487f835 100644 --- a/fs/overlayfs/inode.c +++ b/fs/overlayfs/inode.c | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/fs.h> | 10 | #include <linux/fs.h> |
11 | #include <linux/slab.h> | 11 | #include <linux/slab.h> |
12 | #include <linux/cred.h> | ||
12 | #include <linux/xattr.h> | 13 | #include <linux/xattr.h> |
13 | #include <linux/posix_acl.h> | 14 | #include <linux/posix_acl.h> |
14 | #include "overlayfs.h" | 15 | #include "overlayfs.h" |
diff --git a/fs/overlayfs/namei.c b/fs/overlayfs/namei.c index 023bb0b03352..b8b077821fb0 100644 --- a/fs/overlayfs/namei.c +++ b/fs/overlayfs/namei.c | |||
@@ -8,6 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/fs.h> | 10 | #include <linux/fs.h> |
11 | #include <linux/cred.h> | ||
11 | #include <linux/namei.h> | 12 | #include <linux/namei.h> |
12 | #include <linux/xattr.h> | 13 | #include <linux/xattr.h> |
13 | #include <linux/ratelimit.h> | 14 | #include <linux/ratelimit.h> |
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index 20f48abbb82f..9aa37c2f7f7d 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c | |||
@@ -7,6 +7,7 @@ | |||
7 | * the Free Software Foundation. | 7 | * the Free Software Foundation. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <uapi/linux/magic.h> | ||
10 | #include <linux/fs.h> | 11 | #include <linux/fs.h> |
11 | #include <linux/namei.h> | 12 | #include <linux/namei.h> |
12 | #include <linux/xattr.h> | 13 | #include <linux/xattr.h> |
diff --git a/fs/overlayfs/util.c b/fs/overlayfs/util.c index 952286f4826c..9dc1c0af586b 100644 --- a/fs/overlayfs/util.c +++ b/fs/overlayfs/util.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/fs.h> | 10 | #include <linux/fs.h> |
11 | #include <linux/mount.h> | 11 | #include <linux/mount.h> |
12 | #include <linux/slab.h> | 12 | #include <linux/slab.h> |
13 | #include <linux/cred.h> | ||
13 | #include <linux/xattr.h> | 14 | #include <linux/xattr.h> |
14 | #include "overlayfs.h" | 15 | #include "overlayfs.h" |
15 | #include "ovl_entry.h" | 16 | #include "ovl_entry.h" |
diff --git a/fs/posix_acl.c b/fs/posix_acl.c index c9d48dc78495..eebf5f6cf6d5 100644 --- a/fs/posix_acl.c +++ b/fs/posix_acl.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/atomic.h> | 15 | #include <linux/atomic.h> |
16 | #include <linux/fs.h> | 16 | #include <linux/fs.h> |
17 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
18 | #include <linux/cred.h> | ||
18 | #include <linux/posix_acl.h> | 19 | #include <linux/posix_acl.h> |
19 | #include <linux/posix_acl_xattr.h> | 20 | #include <linux/posix_acl_xattr.h> |
20 | #include <linux/xattr.h> | 21 | #include <linux/xattr.h> |
diff --git a/fs/proc/array.c b/fs/proc/array.c index fe12b519d09b..88c355574aa0 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c | |||
@@ -60,6 +60,10 @@ | |||
60 | #include <linux/tty.h> | 60 | #include <linux/tty.h> |
61 | #include <linux/string.h> | 61 | #include <linux/string.h> |
62 | #include <linux/mman.h> | 62 | #include <linux/mman.h> |
63 | #include <linux/sched/mm.h> | ||
64 | #include <linux/sched/numa_balancing.h> | ||
65 | #include <linux/sched/task.h> | ||
66 | #include <linux/sched/cputime.h> | ||
63 | #include <linux/proc_fs.h> | 67 | #include <linux/proc_fs.h> |
64 | #include <linux/ioport.h> | 68 | #include <linux/ioport.h> |
65 | #include <linux/uaccess.h> | 69 | #include <linux/uaccess.h> |
diff --git a/fs/proc/base.c b/fs/proc/base.c index 1e1e182d571b..2dae60075f6e 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -85,6 +85,11 @@ | |||
85 | #include <linux/user_namespace.h> | 85 | #include <linux/user_namespace.h> |
86 | #include <linux/fs_struct.h> | 86 | #include <linux/fs_struct.h> |
87 | #include <linux/slab.h> | 87 | #include <linux/slab.h> |
88 | #include <linux/sched/autogroup.h> | ||
89 | #include <linux/sched/mm.h> | ||
90 | #include <linux/sched/coredump.h> | ||
91 | #include <linux/sched/debug.h> | ||
92 | #include <linux/sched/stat.h> | ||
88 | #include <linux/flex_array.h> | 93 | #include <linux/flex_array.h> |
89 | #include <linux/posix-timers.h> | 94 | #include <linux/posix-timers.h> |
90 | #ifdef CONFIG_HARDWALL | 95 | #ifdef CONFIG_HARDWALL |
diff --git a/fs/proc/fd.c b/fs/proc/fd.c index 00ce1531b2f5..c330495c3115 100644 --- a/fs/proc/fd.c +++ b/fs/proc/fd.c | |||
@@ -1,4 +1,4 @@ | |||
1 | #include <linux/sched.h> | 1 | #include <linux/sched/signal.h> |
2 | #include <linux/errno.h> | 2 | #include <linux/errno.h> |
3 | #include <linux/dcache.h> | 3 | #include <linux/dcache.h> |
4 | #include <linux/path.h> | 4 | #include <linux/path.h> |
diff --git a/fs/proc/internal.h b/fs/proc/internal.h index 5d6960f5f1c0..26a6daf02185 100644 --- a/fs/proc/internal.h +++ b/fs/proc/internal.h | |||
@@ -14,6 +14,8 @@ | |||
14 | #include <linux/spinlock.h> | 14 | #include <linux/spinlock.h> |
15 | #include <linux/atomic.h> | 15 | #include <linux/atomic.h> |
16 | #include <linux/binfmts.h> | 16 | #include <linux/binfmts.h> |
17 | #include <linux/sched/coredump.h> | ||
18 | #include <linux/sched/task.h> | ||
17 | 19 | ||
18 | struct ctl_table_header; | 20 | struct ctl_table_header; |
19 | struct mempolicy; | 21 | struct mempolicy; |
diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c index ea9f3d1ae830..4ee55274f155 100644 --- a/fs/proc/kcore.c +++ b/fs/proc/kcore.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/list.h> | 28 | #include <linux/list.h> |
29 | #include <linux/ioport.h> | 29 | #include <linux/ioport.h> |
30 | #include <linux/memory.h> | 30 | #include <linux/memory.h> |
31 | #include <linux/sched/task.h> | ||
31 | #include <asm/sections.h> | 32 | #include <asm/sections.h> |
32 | #include "internal.h" | 33 | #include "internal.h" |
33 | 34 | ||
diff --git a/fs/proc/loadavg.c b/fs/proc/loadavg.c index aec66e6c2060..983fce5c2418 100644 --- a/fs/proc/loadavg.c +++ b/fs/proc/loadavg.c | |||
@@ -3,6 +3,8 @@ | |||
3 | #include <linux/pid_namespace.h> | 3 | #include <linux/pid_namespace.h> |
4 | #include <linux/proc_fs.h> | 4 | #include <linux/proc_fs.h> |
5 | #include <linux/sched.h> | 5 | #include <linux/sched.h> |
6 | #include <linux/sched/loadavg.h> | ||
7 | #include <linux/sched/stat.h> | ||
6 | #include <linux/seq_file.h> | 8 | #include <linux/seq_file.h> |
7 | #include <linux/seqlock.h> | 9 | #include <linux/seqlock.h> |
8 | #include <linux/time.h> | 10 | #include <linux/time.h> |
diff --git a/fs/proc/proc_net.c b/fs/proc/proc_net.c index ffd72a6c6e04..5cbc65d7a1e1 100644 --- a/fs/proc/proc_net.c +++ b/fs/proc/proc_net.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/sched/task.h> | ||
20 | #include <linux/module.h> | 21 | #include <linux/module.h> |
21 | #include <linux/bitops.h> | 22 | #include <linux/bitops.h> |
22 | #include <linux/mount.h> | 23 | #include <linux/mount.h> |
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index 3e64c6502dc8..3d203b1f5a02 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/printk.h> | 8 | #include <linux/printk.h> |
9 | #include <linux/security.h> | 9 | #include <linux/security.h> |
10 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
11 | #include <linux/cred.h> | ||
11 | #include <linux/namei.h> | 12 | #include <linux/namei.h> |
12 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
13 | #include <linux/module.h> | 14 | #include <linux/module.h> |
diff --git a/fs/proc/root.c b/fs/proc/root.c index b90da888b81a..a50ba388255f 100644 --- a/fs/proc/root.c +++ b/fs/proc/root.c | |||
@@ -14,12 +14,14 @@ | |||
14 | #include <linux/stat.h> | 14 | #include <linux/stat.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/sched/stat.h> | ||
17 | #include <linux/module.h> | 18 | #include <linux/module.h> |
18 | #include <linux/bitops.h> | 19 | #include <linux/bitops.h> |
19 | #include <linux/user_namespace.h> | 20 | #include <linux/user_namespace.h> |
20 | #include <linux/mount.h> | 21 | #include <linux/mount.h> |
21 | #include <linux/pid_namespace.h> | 22 | #include <linux/pid_namespace.h> |
22 | #include <linux/parser.h> | 23 | #include <linux/parser.h> |
24 | #include <linux/cred.h> | ||
23 | 25 | ||
24 | #include "internal.h" | 26 | #include "internal.h" |
25 | 27 | ||
diff --git a/fs/proc/stat.c b/fs/proc/stat.c index e47c3e8c4dfe..bd4e55f4aa20 100644 --- a/fs/proc/stat.c +++ b/fs/proc/stat.c | |||
@@ -5,11 +5,12 @@ | |||
5 | #include <linux/kernel_stat.h> | 5 | #include <linux/kernel_stat.h> |
6 | #include <linux/proc_fs.h> | 6 | #include <linux/proc_fs.h> |
7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
8 | #include <linux/sched/stat.h> | ||
8 | #include <linux/seq_file.h> | 9 | #include <linux/seq_file.h> |
9 | #include <linux/slab.h> | 10 | #include <linux/slab.h> |
10 | #include <linux/time.h> | 11 | #include <linux/time.h> |
11 | #include <linux/irqnr.h> | 12 | #include <linux/irqnr.h> |
12 | #include <linux/cputime.h> | 13 | #include <linux/sched/cputime.h> |
13 | #include <linux/tick.h> | 14 | #include <linux/tick.h> |
14 | 15 | ||
15 | #ifndef arch_irq_stat_cpu | 16 | #ifndef arch_irq_stat_cpu |
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index ee3efb229ef6..f08bd31c1081 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/mempolicy.h> | 11 | #include <linux/mempolicy.h> |
12 | #include <linux/rmap.h> | 12 | #include <linux/rmap.h> |
13 | #include <linux/swap.h> | 13 | #include <linux/swap.h> |
14 | #include <linux/sched/mm.h> | ||
14 | #include <linux/swapops.h> | 15 | #include <linux/swapops.h> |
15 | #include <linux/mmu_notifier.h> | 16 | #include <linux/mmu_notifier.h> |
16 | #include <linux/page_idle.h> | 17 | #include <linux/page_idle.h> |
diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c index 1ef97cfcf422..23266694db11 100644 --- a/fs/proc/task_nommu.c +++ b/fs/proc/task_nommu.c | |||
@@ -7,6 +7,8 @@ | |||
7 | #include <linux/ptrace.h> | 7 | #include <linux/ptrace.h> |
8 | #include <linux/slab.h> | 8 | #include <linux/slab.h> |
9 | #include <linux/seq_file.h> | 9 | #include <linux/seq_file.h> |
10 | #include <linux/sched/mm.h> | ||
11 | |||
10 | #include "internal.h" | 12 | #include "internal.h" |
11 | 13 | ||
12 | /* | 14 | /* |
diff --git a/fs/proc_namespace.c b/fs/proc_namespace.c index 3f1190d18991..b5713fefb4c1 100644 --- a/fs/proc_namespace.c +++ b/fs/proc_namespace.c | |||
@@ -10,6 +10,8 @@ | |||
10 | #include <linux/nsproxy.h> | 10 | #include <linux/nsproxy.h> |
11 | #include <linux/security.h> | 11 | #include <linux/security.h> |
12 | #include <linux/fs_struct.h> | 12 | #include <linux/fs_struct.h> |
13 | #include <linux/sched/task.h> | ||
14 | |||
13 | #include "proc/internal.h" /* only for get_proc_task() in ->open() */ | 15 | #include "proc/internal.h" /* only for get_proc_task() in ->open() */ |
14 | 16 | ||
15 | #include "pnode.h" | 17 | #include "pnode.h" |
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index 406fed92362a..74b489e3714d 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c | |||
@@ -72,6 +72,7 @@ | |||
72 | #include <linux/proc_fs.h> | 72 | #include <linux/proc_fs.h> |
73 | #include <linux/security.h> | 73 | #include <linux/security.h> |
74 | #include <linux/sched.h> | 74 | #include <linux/sched.h> |
75 | #include <linux/cred.h> | ||
75 | #include <linux/kmod.h> | 76 | #include <linux/kmod.h> |
76 | #include <linux/namei.h> | 77 | #include <linux/namei.h> |
77 | #include <linux/capability.h> | 78 | #include <linux/capability.h> |
diff --git a/fs/read_write.c b/fs/read_write.c index f2ed9fdc98fd..c4f88afbc67f 100644 --- a/fs/read_write.c +++ b/fs/read_write.c | |||
@@ -4,8 +4,9 @@ | |||
4 | * Copyright (C) 1991, 1992 Linus Torvalds | 4 | * Copyright (C) 1991, 1992 Linus Torvalds |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/slab.h> | 7 | #include <linux/slab.h> |
8 | #include <linux/stat.h> | 8 | #include <linux/stat.h> |
9 | #include <linux/sched/xacct.h> | ||
9 | #include <linux/fcntl.h> | 10 | #include <linux/fcntl.h> |
10 | #include <linux/file.h> | 11 | #include <linux/file.h> |
11 | #include <linux/uio.h> | 12 | #include <linux/uio.h> |
diff --git a/fs/select.c b/fs/select.c index 305c0daf5d67..e2112270d75a 100644 --- a/fs/select.c +++ b/fs/select.c | |||
@@ -15,7 +15,8 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/sched.h> | 18 | #include <linux/sched/signal.h> |
19 | #include <linux/sched/rt.h> | ||
19 | #include <linux/syscalls.h> | 20 | #include <linux/syscalls.h> |
20 | #include <linux/export.h> | 21 | #include <linux/export.h> |
21 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
@@ -26,7 +27,6 @@ | |||
26 | #include <linux/fs.h> | 27 | #include <linux/fs.h> |
27 | #include <linux/rcupdate.h> | 28 | #include <linux/rcupdate.h> |
28 | #include <linux/hrtimer.h> | 29 | #include <linux/hrtimer.h> |
29 | #include <linux/sched/rt.h> | ||
30 | #include <linux/freezer.h> | 30 | #include <linux/freezer.h> |
31 | #include <net/busy_poll.h> | 31 | #include <net/busy_poll.h> |
32 | #include <linux/vmalloc.h> | 32 | #include <linux/vmalloc.h> |
diff --git a/fs/splice.c b/fs/splice.c index eaafa3d8869a..006ba50f4ece 100644 --- a/fs/splice.c +++ b/fs/splice.c | |||
@@ -33,6 +33,8 @@ | |||
33 | #include <linux/gfp.h> | 33 | #include <linux/gfp.h> |
34 | #include <linux/socket.h> | 34 | #include <linux/socket.h> |
35 | #include <linux/compat.h> | 35 | #include <linux/compat.h> |
36 | #include <linux/sched/signal.h> | ||
37 | |||
36 | #include "internal.h" | 38 | #include "internal.h" |
37 | 39 | ||
38 | /* | 40 | /* |
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/fs.h> | 12 | #include <linux/fs.h> |
13 | #include <linux/namei.h> | 13 | #include <linux/namei.h> |
14 | #include <linux/security.h> | 14 | #include <linux/security.h> |
15 | #include <linux/cred.h> | ||
15 | #include <linux/syscalls.h> | 16 | #include <linux/syscalls.h> |
16 | #include <linux/pagemap.h> | 17 | #include <linux/pagemap.h> |
17 | 18 | ||
diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c index 3c421d06a18e..973607df579d 100644 --- a/fs/userfaultfd.c +++ b/fs/userfaultfd.c | |||
@@ -14,7 +14,8 @@ | |||
14 | 14 | ||
15 | #include <linux/list.h> | 15 | #include <linux/list.h> |
16 | #include <linux/hashtable.h> | 16 | #include <linux/hashtable.h> |
17 | #include <linux/sched.h> | 17 | #include <linux/sched/signal.h> |
18 | #include <linux/sched/mm.h> | ||
18 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
19 | #include <linux/poll.h> | 20 | #include <linux/poll.h> |
20 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
diff --git a/fs/xfs/kmem.c b/fs/xfs/kmem.c index 339c696bbc01..2dfdc62f795e 100644 --- a/fs/xfs/kmem.c +++ b/fs/xfs/kmem.c | |||
@@ -16,6 +16,7 @@ | |||
16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
17 | */ | 17 | */ |
18 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
19 | #include <linux/sched/mm.h> | ||
19 | #include <linux/highmem.h> | 20 | #include <linux/highmem.h> |
20 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
21 | #include <linux/swap.h> | 22 | #include <linux/swap.h> |
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index 8c7d01b75922..b6208728ba39 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/migrate.h> | 33 | #include <linux/migrate.h> |
34 | #include <linux/backing-dev.h> | 34 | #include <linux/backing-dev.h> |
35 | #include <linux/freezer.h> | 35 | #include <linux/freezer.h> |
36 | #include <linux/sched/mm.h> | ||
36 | 37 | ||
37 | #include "xfs_format.h" | 38 | #include "xfs_format.h" |
38 | #include "xfs_log_format.h" | 39 | #include "xfs_log_format.h" |
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c index cf1363dbf32b..2fd7fdf5438f 100644 --- a/fs/xfs/xfs_ioctl.c +++ b/fs/xfs/xfs_ioctl.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include "xfs_acl.h" | 43 | #include "xfs_acl.h" |
44 | 44 | ||
45 | #include <linux/capability.h> | 45 | #include <linux/capability.h> |
46 | #include <linux/cred.h> | ||
46 | #include <linux/dcache.h> | 47 | #include <linux/dcache.h> |
47 | #include <linux/mount.h> | 48 | #include <linux/mount.h> |
48 | #include <linux/namei.h> | 49 | #include <linux/namei.h> |
diff --git a/fs/xfs/xfs_linux.h b/fs/xfs/xfs_linux.h index 7a989de224f4..592fdf7111cb 100644 --- a/fs/xfs/xfs_linux.h +++ b/fs/xfs/xfs_linux.h | |||
@@ -55,7 +55,7 @@ typedef __u32 xfs_nlink_t; | |||
55 | #include <linux/file.h> | 55 | #include <linux/file.h> |
56 | #include <linux/swap.h> | 56 | #include <linux/swap.h> |
57 | #include <linux/errno.h> | 57 | #include <linux/errno.h> |
58 | #include <linux/sched.h> | 58 | #include <linux/sched/signal.h> |
59 | #include <linux/bitops.h> | 59 | #include <linux/bitops.h> |
60 | #include <linux/major.h> | 60 | #include <linux/major.h> |
61 | #include <linux/pagemap.h> | 61 | #include <linux/pagemap.h> |
diff --git a/include/drm/drm_mm.h b/include/drm/drm_mm.h index d81b0ba9921f..2ef16bf25826 100644 --- a/include/drm/drm_mm.h +++ b/include/drm/drm_mm.h | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/bug.h> | 40 | #include <linux/bug.h> |
41 | #include <linux/rbtree.h> | 41 | #include <linux/rbtree.h> |
42 | #include <linux/kernel.h> | 42 | #include <linux/kernel.h> |
43 | #include <linux/mm_types.h> | ||
43 | #include <linux/list.h> | 44 | #include <linux/list.h> |
44 | #include <linux/spinlock.h> | 45 | #include <linux/spinlock.h> |
45 | #ifdef CONFIG_DRM_DEBUG_MM | 46 | #ifdef CONFIG_DRM_DEBUG_MM |
diff --git a/include/drm/drm_os_linux.h b/include/drm/drm_os_linux.h index 86ab99bc0ac5..35e1482ba8a1 100644 --- a/include/drm/drm_os_linux.h +++ b/include/drm/drm_os_linux.h | |||
@@ -4,6 +4,7 @@ | |||
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <linux/interrupt.h> /* For task queue support */ | 6 | #include <linux/interrupt.h> /* For task queue support */ |
7 | #include <linux/sched/signal.h> | ||
7 | #include <linux/delay.h> | 8 | #include <linux/delay.h> |
8 | 9 | ||
9 | #ifndef readq | 10 | #ifndef readq |
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index 1303b570b18c..05488da3aee9 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h | |||
@@ -6,6 +6,8 @@ | |||
6 | #include <asm/exec.h> | 6 | #include <asm/exec.h> |
7 | #include <uapi/linux/binfmts.h> | 7 | #include <uapi/linux/binfmts.h> |
8 | 8 | ||
9 | struct filename; | ||
10 | |||
9 | #define CORENAME_MAX_SIZE 128 | 11 | #define CORENAME_MAX_SIZE 128 |
10 | 12 | ||
11 | /* | 13 | /* |
@@ -123,4 +125,12 @@ extern void install_exec_creds(struct linux_binprm *bprm); | |||
123 | extern void set_binfmt(struct linux_binfmt *new); | 125 | extern void set_binfmt(struct linux_binfmt *new); |
124 | extern ssize_t read_code(struct file *, unsigned long, loff_t, size_t); | 126 | extern ssize_t read_code(struct file *, unsigned long, loff_t, size_t); |
125 | 127 | ||
128 | extern int do_execve(struct filename *, | ||
129 | const char __user * const __user *, | ||
130 | const char __user * const __user *); | ||
131 | extern int do_execveat(int, struct filename *, | ||
132 | const char __user * const __user *, | ||
133 | const char __user * const __user *, | ||
134 | int); | ||
135 | |||
126 | #endif /* _LINUX_BINFMTS_H */ | 136 | #endif /* _LINUX_BINFMTS_H */ |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index aecca0e7d9ca..796016e63c1d 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _LINUX_BLKDEV_H | 2 | #define _LINUX_BLKDEV_H |
3 | 3 | ||
4 | #include <linux/sched.h> | 4 | #include <linux/sched.h> |
5 | #include <linux/sched/clock.h> | ||
5 | 6 | ||
6 | #ifdef CONFIG_BLOCK | 7 | #ifdef CONFIG_BLOCK |
7 | 8 | ||
diff --git a/include/linux/cgroup-defs.h b/include/linux/cgroup-defs.h index 3c02404cfce9..6a3f850cabab 100644 --- a/include/linux/cgroup-defs.h +++ b/include/linux/cgroup-defs.h | |||
@@ -531,8 +531,8 @@ extern struct percpu_rw_semaphore cgroup_threadgroup_rwsem; | |||
531 | * cgroup_threadgroup_change_begin - threadgroup exclusion for cgroups | 531 | * cgroup_threadgroup_change_begin - threadgroup exclusion for cgroups |
532 | * @tsk: target task | 532 | * @tsk: target task |
533 | * | 533 | * |
534 | * Called from threadgroup_change_begin() and allows cgroup operations to | 534 | * Allows cgroup operations to synchronize against threadgroup changes |
535 | * synchronize against threadgroup changes using a percpu_rw_semaphore. | 535 | * using a percpu_rw_semaphore. |
536 | */ | 536 | */ |
537 | static inline void cgroup_threadgroup_change_begin(struct task_struct *tsk) | 537 | static inline void cgroup_threadgroup_change_begin(struct task_struct *tsk) |
538 | { | 538 | { |
@@ -543,8 +543,7 @@ static inline void cgroup_threadgroup_change_begin(struct task_struct *tsk) | |||
543 | * cgroup_threadgroup_change_end - threadgroup exclusion for cgroups | 543 | * cgroup_threadgroup_change_end - threadgroup exclusion for cgroups |
544 | * @tsk: target task | 544 | * @tsk: target task |
545 | * | 545 | * |
546 | * Called from threadgroup_change_end(). Counterpart of | 546 | * Counterpart of cgroup_threadcgroup_change_begin(). |
547 | * cgroup_threadcgroup_change_begin(). | ||
548 | */ | 547 | */ |
549 | static inline void cgroup_threadgroup_change_end(struct task_struct *tsk) | 548 | static inline void cgroup_threadgroup_change_end(struct task_struct *tsk) |
550 | { | 549 | { |
@@ -555,7 +554,11 @@ static inline void cgroup_threadgroup_change_end(struct task_struct *tsk) | |||
555 | 554 | ||
556 | #define CGROUP_SUBSYS_COUNT 0 | 555 | #define CGROUP_SUBSYS_COUNT 0 |
557 | 556 | ||
558 | static inline void cgroup_threadgroup_change_begin(struct task_struct *tsk) {} | 557 | static inline void cgroup_threadgroup_change_begin(struct task_struct *tsk) |
558 | { | ||
559 | might_sleep(); | ||
560 | } | ||
561 | |||
559 | static inline void cgroup_threadgroup_change_end(struct task_struct *tsk) {} | 562 | static inline void cgroup_threadgroup_change_end(struct task_struct *tsk) {} |
560 | 563 | ||
561 | #endif /* CONFIG_CGROUPS */ | 564 | #endif /* CONFIG_CGROUPS */ |
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 21f9c74496e7..f92081234afd 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -30,6 +30,8 @@ struct cpu { | |||
30 | 30 | ||
31 | extern void boot_cpu_init(void); | 31 | extern void boot_cpu_init(void); |
32 | extern void boot_cpu_state_init(void); | 32 | extern void boot_cpu_state_init(void); |
33 | extern void cpu_init(void); | ||
34 | extern void trap_init(void); | ||
33 | 35 | ||
34 | extern int register_cpu(struct cpu *cpu, int num); | 36 | extern int register_cpu(struct cpu *cpu, int num); |
35 | extern struct device *get_cpu_device(unsigned cpu); | 37 | extern struct device *get_cpu_device(unsigned cpu); |
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index bfc204e70338..611fce58d670 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
@@ -9,6 +9,8 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <linux/sched/topology.h> | ||
13 | #include <linux/sched/task.h> | ||
12 | #include <linux/cpumask.h> | 14 | #include <linux/cpumask.h> |
13 | #include <linux/nodemask.h> | 15 | #include <linux/nodemask.h> |
14 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
diff --git a/include/linux/cputime.h b/include/linux/cputime.h deleted file mode 100644 index a691dc4ddc13..000000000000 --- a/include/linux/cputime.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | #ifndef __LINUX_CPUTIME_H | ||
2 | #define __LINUX_CPUTIME_H | ||
3 | |||
4 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE | ||
5 | #include <asm/cputime.h> | ||
6 | |||
7 | #ifndef cputime_to_nsecs | ||
8 | # define cputime_to_nsecs(__ct) \ | ||
9 | (cputime_to_usecs(__ct) * NSEC_PER_USEC) | ||
10 | #endif | ||
11 | |||
12 | #endif /* CONFIG_VIRT_CPU_ACCOUNTING_NATIVE */ | ||
13 | #endif /* __LINUX_CPUTIME_H */ | ||
diff --git a/include/linux/cred.h b/include/linux/cred.h index f0e70a1bb3ac..b03e7d049a64 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h | |||
@@ -18,8 +18,9 @@ | |||
18 | #include <linux/selinux.h> | 18 | #include <linux/selinux.h> |
19 | #include <linux/atomic.h> | 19 | #include <linux/atomic.h> |
20 | #include <linux/uidgid.h> | 20 | #include <linux/uidgid.h> |
21 | #include <linux/sched.h> | ||
22 | #include <linux/sched/user.h> | ||
21 | 23 | ||
22 | struct user_struct; | ||
23 | struct cred; | 24 | struct cred; |
24 | struct inode; | 25 | struct inode; |
25 | 26 | ||
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 591b6c16f9c1..d2e38dc6172c 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/rcupdate.h> | 11 | #include <linux/rcupdate.h> |
12 | #include <linux/lockref.h> | 12 | #include <linux/lockref.h> |
13 | #include <linux/stringhash.h> | 13 | #include <linux/stringhash.h> |
14 | #include <linux/wait.h> | ||
14 | 15 | ||
15 | struct path; | 16 | struct path; |
16 | struct vfsmount; | 17 | struct vfsmount; |
diff --git a/include/linux/delayacct.h b/include/linux/delayacct.h index 00e60f79a9cc..4178d2493547 100644 --- a/include/linux/delayacct.h +++ b/include/linux/delayacct.h | |||
@@ -18,8 +18,6 @@ | |||
18 | #define _LINUX_DELAYACCT_H | 18 | #define _LINUX_DELAYACCT_H |
19 | 19 | ||
20 | #include <uapi/linux/taskstats.h> | 20 | #include <uapi/linux/taskstats.h> |
21 | #include <linux/sched.h> | ||
22 | #include <linux/slab.h> | ||
23 | 21 | ||
24 | /* | 22 | /* |
25 | * Per-task flags relevant to delay accounting | 23 | * Per-task flags relevant to delay accounting |
@@ -30,7 +28,43 @@ | |||
30 | #define DELAYACCT_PF_BLKIO 0x00000002 /* I am waiting on IO */ | 28 | #define DELAYACCT_PF_BLKIO 0x00000002 /* I am waiting on IO */ |
31 | 29 | ||
32 | #ifdef CONFIG_TASK_DELAY_ACCT | 30 | #ifdef CONFIG_TASK_DELAY_ACCT |
31 | struct task_delay_info { | ||
32 | spinlock_t lock; | ||
33 | unsigned int flags; /* Private per-task flags */ | ||
34 | |||
35 | /* For each stat XXX, add following, aligned appropriately | ||
36 | * | ||
37 | * struct timespec XXX_start, XXX_end; | ||
38 | * u64 XXX_delay; | ||
39 | * u32 XXX_count; | ||
40 | * | ||
41 | * Atomicity of updates to XXX_delay, XXX_count protected by | ||
42 | * single lock above (split into XXX_lock if contention is an issue). | ||
43 | */ | ||
44 | |||
45 | /* | ||
46 | * XXX_count is incremented on every XXX operation, the delay | ||
47 | * associated with the operation is added to XXX_delay. | ||
48 | * XXX_delay contains the accumulated delay time in nanoseconds. | ||
49 | */ | ||
50 | u64 blkio_start; /* Shared by blkio, swapin */ | ||
51 | u64 blkio_delay; /* wait for sync block io completion */ | ||
52 | u64 swapin_delay; /* wait for swapin block io completion */ | ||
53 | u32 blkio_count; /* total count of the number of sync block */ | ||
54 | /* io operations performed */ | ||
55 | u32 swapin_count; /* total count of the number of swapin block */ | ||
56 | /* io operations performed */ | ||
57 | |||
58 | u64 freepages_start; | ||
59 | u64 freepages_delay; /* wait for memory reclaim */ | ||
60 | u32 freepages_count; /* total count of memory reclaim */ | ||
61 | }; | ||
62 | #endif | ||
33 | 63 | ||
64 | #include <linux/sched.h> | ||
65 | #include <linux/slab.h> | ||
66 | |||
67 | #ifdef CONFIG_TASK_DELAY_ACCT | ||
34 | extern int delayacct_on; /* Delay accounting turned on/off */ | 68 | extern int delayacct_on; /* Delay accounting turned on/off */ |
35 | extern struct kmem_cache *delayacct_cache; | 69 | extern struct kmem_cache *delayacct_cache; |
36 | extern void delayacct_init(void); | 70 | extern void delayacct_init(void); |
diff --git a/include/linux/dmar.h b/include/linux/dmar.h index e9bc9292bd3a..e8ffba1052d3 100644 --- a/include/linux/dmar.h +++ b/include/linux/dmar.h | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <linux/msi.h> | 26 | #include <linux/msi.h> |
27 | #include <linux/irqreturn.h> | 27 | #include <linux/irqreturn.h> |
28 | #include <linux/rwsem.h> | 28 | #include <linux/rwsem.h> |
29 | #include <linux/rcupdate.h> | 29 | #include <linux/rculist.h> |
30 | 30 | ||
31 | struct acpi_dmar_header; | 31 | struct acpi_dmar_header; |
32 | 32 | ||
diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h index 698d51a0eea3..c8240a12c42d 100644 --- a/include/linux/elfcore.h +++ b/include/linux/elfcore.h | |||
@@ -3,6 +3,8 @@ | |||
3 | 3 | ||
4 | #include <linux/user.h> | 4 | #include <linux/user.h> |
5 | #include <linux/bug.h> | 5 | #include <linux/bug.h> |
6 | #include <linux/sched/task_stack.h> | ||
7 | |||
6 | #include <asm/elf.h> | 8 | #include <asm/elf.h> |
7 | #include <uapi/linux/elfcore.h> | 9 | #include <uapi/linux/elfcore.h> |
8 | 10 | ||
diff --git a/include/linux/fault-inject.h b/include/linux/fault-inject.h index 9f4956d8601c..728d4e0292aa 100644 --- a/include/linux/fault-inject.h +++ b/include/linux/fault-inject.h | |||
@@ -61,6 +61,8 @@ static inline struct dentry *fault_create_debugfs_attr(const char *name, | |||
61 | 61 | ||
62 | #endif /* CONFIG_FAULT_INJECTION */ | 62 | #endif /* CONFIG_FAULT_INJECTION */ |
63 | 63 | ||
64 | struct kmem_cache; | ||
65 | |||
64 | #ifdef CONFIG_FAILSLAB | 66 | #ifdef CONFIG_FAILSLAB |
65 | extern bool should_failslab(struct kmem_cache *s, gfp_t gfpflags); | 67 | extern bool should_failslab(struct kmem_cache *s, gfp_t gfpflags); |
66 | #else | 68 | #else |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index e52b427223ba..249e579ecd4c 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/ktime.h> | 19 | #include <linux/ktime.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/list.h> | 21 | #include <linux/list.h> |
22 | #include <linux/wait.h> | ||
23 | #include <linux/percpu.h> | 22 | #include <linux/percpu.h> |
24 | #include <linux/timer.h> | 23 | #include <linux/timer.h> |
25 | #include <linux/timerqueue.h> | 24 | #include <linux/timerqueue.h> |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index bed8fbb45f31..6b183521c616 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/device.h> /* for struct device */ | 30 | #include <linux/device.h> /* for struct device */ |
31 | #include <linux/sched.h> /* for completion */ | 31 | #include <linux/sched.h> /* for completion */ |
32 | #include <linux/mutex.h> | 32 | #include <linux/mutex.h> |
33 | #include <linux/rtmutex.h> | ||
33 | #include <linux/irqdomain.h> /* for Host Notify IRQ */ | 34 | #include <linux/irqdomain.h> /* for Host Notify IRQ */ |
34 | #include <linux/of.h> /* for struct device_node */ | 35 | #include <linux/of.h> /* for struct device_node */ |
35 | #include <linux/swab.h> /* for swab16 */ | 36 | #include <linux/swab.h> /* for swab16 */ |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 3a85d61f7614..91d9049f0039 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -12,8 +12,10 @@ | |||
12 | #include <linux/securebits.h> | 12 | #include <linux/securebits.h> |
13 | #include <linux/seqlock.h> | 13 | #include <linux/seqlock.h> |
14 | #include <linux/rbtree.h> | 14 | #include <linux/rbtree.h> |
15 | #include <linux/sched/autogroup.h> | ||
15 | #include <net/net_namespace.h> | 16 | #include <net/net_namespace.h> |
16 | #include <linux/sched/rt.h> | 17 | #include <linux/sched/rt.h> |
18 | #include <linux/mm_types.h> | ||
17 | 19 | ||
18 | #include <asm/thread_info.h> | 20 | #include <asm/thread_info.h> |
19 | 21 | ||
@@ -149,8 +151,6 @@ extern struct group_info init_groups; | |||
149 | 151 | ||
150 | extern struct cred init_cred; | 152 | extern struct cred init_cred; |
151 | 153 | ||
152 | extern struct task_group root_task_group; | ||
153 | |||
154 | #ifdef CONFIG_CGROUP_SCHED | 154 | #ifdef CONFIG_CGROUP_SCHED |
155 | # define INIT_CGROUP_SCHED(tsk) \ | 155 | # define INIT_CGROUP_SCHED(tsk) \ |
156 | .sched_task_group = &root_task_group, | 156 | .sched_task_group = &root_task_group, |
diff --git a/include/linux/kasan.h b/include/linux/kasan.h index c908b25bf5a5..ceb3fe78a0d3 100644 --- a/include/linux/kasan.h +++ b/include/linux/kasan.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _LINUX_KASAN_H | 1 | #ifndef _LINUX_KASAN_H |
2 | #define _LINUX_KASAN_H | 2 | #define _LINUX_KASAN_H |
3 | 3 | ||
4 | #include <linux/sched.h> | ||
5 | #include <linux/types.h> | 4 | #include <linux/types.h> |
6 | 5 | ||
7 | struct kmem_cache; | 6 | struct kmem_cache; |
@@ -30,16 +29,10 @@ static inline void *kasan_mem_to_shadow(const void *addr) | |||
30 | } | 29 | } |
31 | 30 | ||
32 | /* Enable reporting bugs after kasan_disable_current() */ | 31 | /* Enable reporting bugs after kasan_disable_current() */ |
33 | static inline void kasan_enable_current(void) | 32 | extern void kasan_enable_current(void); |
34 | { | ||
35 | current->kasan_depth++; | ||
36 | } | ||
37 | 33 | ||
38 | /* Disable reporting bugs for current task */ | 34 | /* Disable reporting bugs for current task */ |
39 | static inline void kasan_disable_current(void) | 35 | extern void kasan_disable_current(void); |
40 | { | ||
41 | current->kasan_depth--; | ||
42 | } | ||
43 | 36 | ||
44 | void kasan_unpoison_shadow(const void *address, size_t size); | 37 | void kasan_unpoison_shadow(const void *address, size_t size); |
45 | 38 | ||
diff --git a/include/linux/khugepaged.h b/include/linux/khugepaged.h index 1e032a1ddb3e..5d9a400af509 100644 --- a/include/linux/khugepaged.h +++ b/include/linux/khugepaged.h | |||
@@ -1,7 +1,8 @@ | |||
1 | #ifndef _LINUX_KHUGEPAGED_H | 1 | #ifndef _LINUX_KHUGEPAGED_H |
2 | #define _LINUX_KHUGEPAGED_H | 2 | #define _LINUX_KHUGEPAGED_H |
3 | 3 | ||
4 | #include <linux/sched.h> /* MMF_VM_HUGEPAGE */ | 4 | #include <linux/sched/coredump.h> /* MMF_VM_HUGEPAGE */ |
5 | |||
5 | 6 | ||
6 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | 7 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE |
7 | extern struct attribute_group khugepaged_attr_group; | 8 | extern struct attribute_group khugepaged_attr_group; |
diff --git a/include/linux/ksm.h b/include/linux/ksm.h index 481c8c4627ca..e1cfda4bee58 100644 --- a/include/linux/ksm.h +++ b/include/linux/ksm.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/pagemap.h> | 12 | #include <linux/pagemap.h> |
13 | #include <linux/rmap.h> | 13 | #include <linux/rmap.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
15 | #include <linux/sched/coredump.h> | ||
15 | 16 | ||
16 | struct stable_node; | 17 | struct stable_node; |
17 | struct mem_cgroup; | 18 | struct mem_cgroup; |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 4f6d440ad785..f60f45fe226f 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
@@ -1,9 +1,9 @@ | |||
1 | #ifndef _LINUX_MM_TYPES_H | 1 | #ifndef _LINUX_MM_TYPES_H |
2 | #define _LINUX_MM_TYPES_H | 2 | #define _LINUX_MM_TYPES_H |
3 | 3 | ||
4 | #include <linux/mm_types_task.h> | ||
5 | |||
4 | #include <linux/auxvec.h> | 6 | #include <linux/auxvec.h> |
5 | #include <linux/types.h> | ||
6 | #include <linux/threads.h> | ||
7 | #include <linux/list.h> | 7 | #include <linux/list.h> |
8 | #include <linux/spinlock.h> | 8 | #include <linux/spinlock.h> |
9 | #include <linux/rbtree.h> | 9 | #include <linux/rbtree.h> |
@@ -13,7 +13,7 @@ | |||
13 | #include <linux/uprobes.h> | 13 | #include <linux/uprobes.h> |
14 | #include <linux/page-flags-layout.h> | 14 | #include <linux/page-flags-layout.h> |
15 | #include <linux/workqueue.h> | 15 | #include <linux/workqueue.h> |
16 | #include <asm/page.h> | 16 | |
17 | #include <asm/mmu.h> | 17 | #include <asm/mmu.h> |
18 | 18 | ||
19 | #ifndef AT_VECTOR_SIZE_ARCH | 19 | #ifndef AT_VECTOR_SIZE_ARCH |
@@ -24,11 +24,6 @@ | |||
24 | struct address_space; | 24 | struct address_space; |
25 | struct mem_cgroup; | 25 | struct mem_cgroup; |
26 | 26 | ||
27 | #define USE_SPLIT_PTE_PTLOCKS (NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS) | ||
28 | #define USE_SPLIT_PMD_PTLOCKS (USE_SPLIT_PTE_PTLOCKS && \ | ||
29 | IS_ENABLED(CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK)) | ||
30 | #define ALLOC_SPLIT_PTLOCKS (SPINLOCK_SIZE > BITS_PER_LONG/8) | ||
31 | |||
32 | /* | 27 | /* |
33 | * Each physical page in the system has a struct page associated with | 28 | * Each physical page in the system has a struct page associated with |
34 | * it to keep track of whatever it is we are using the page for at the | 29 | * it to keep track of whatever it is we are using the page for at the |
@@ -231,17 +226,6 @@ struct page { | |||
231 | #endif | 226 | #endif |
232 | ; | 227 | ; |
233 | 228 | ||
234 | struct page_frag { | ||
235 | struct page *page; | ||
236 | #if (BITS_PER_LONG > 32) || (PAGE_SIZE >= 65536) | ||
237 | __u32 offset; | ||
238 | __u32 size; | ||
239 | #else | ||
240 | __u16 offset; | ||
241 | __u16 size; | ||
242 | #endif | ||
243 | }; | ||
244 | |||
245 | #define PAGE_FRAG_CACHE_MAX_SIZE __ALIGN_MASK(32768, ~PAGE_MASK) | 229 | #define PAGE_FRAG_CACHE_MAX_SIZE __ALIGN_MASK(32768, ~PAGE_MASK) |
246 | #define PAGE_FRAG_CACHE_MAX_ORDER get_order(PAGE_FRAG_CACHE_MAX_SIZE) | 230 | #define PAGE_FRAG_CACHE_MAX_ORDER get_order(PAGE_FRAG_CACHE_MAX_SIZE) |
247 | 231 | ||
@@ -371,27 +355,6 @@ struct core_state { | |||
371 | struct completion startup; | 355 | struct completion startup; |
372 | }; | 356 | }; |
373 | 357 | ||
374 | enum { | ||
375 | MM_FILEPAGES, /* Resident file mapping pages */ | ||
376 | MM_ANONPAGES, /* Resident anonymous pages */ | ||
377 | MM_SWAPENTS, /* Anonymous swap entries */ | ||
378 | MM_SHMEMPAGES, /* Resident shared memory pages */ | ||
379 | NR_MM_COUNTERS | ||
380 | }; | ||
381 | |||
382 | #if USE_SPLIT_PTE_PTLOCKS && defined(CONFIG_MMU) | ||
383 | #define SPLIT_RSS_COUNTING | ||
384 | /* per-thread cached information, */ | ||
385 | struct task_rss_stat { | ||
386 | int events; /* for synchronization threshold */ | ||
387 | int count[NR_MM_COUNTERS]; | ||
388 | }; | ||
389 | #endif /* USE_SPLIT_PTE_PTLOCKS */ | ||
390 | |||
391 | struct mm_rss_stat { | ||
392 | atomic_long_t count[NR_MM_COUNTERS]; | ||
393 | }; | ||
394 | |||
395 | struct kioctx_table; | 358 | struct kioctx_table; |
396 | struct mm_struct { | 359 | struct mm_struct { |
397 | struct vm_area_struct *mmap; /* list of VMAs */ | 360 | struct vm_area_struct *mmap; /* list of VMAs */ |
@@ -534,6 +497,8 @@ struct mm_struct { | |||
534 | struct work_struct async_put_work; | 497 | struct work_struct async_put_work; |
535 | }; | 498 | }; |
536 | 499 | ||
500 | extern struct mm_struct init_mm; | ||
501 | |||
537 | static inline void mm_init_cpumask(struct mm_struct *mm) | 502 | static inline void mm_init_cpumask(struct mm_struct *mm) |
538 | { | 503 | { |
539 | #ifdef CONFIG_CPUMASK_OFFSTACK | 504 | #ifdef CONFIG_CPUMASK_OFFSTACK |
diff --git a/include/linux/mm_types_task.h b/include/linux/mm_types_task.h new file mode 100644 index 000000000000..136dfdf63ba1 --- /dev/null +++ b/include/linux/mm_types_task.h | |||
@@ -0,0 +1,87 @@ | |||
1 | #ifndef _LINUX_MM_TYPES_TASK_H | ||
2 | #define _LINUX_MM_TYPES_TASK_H | ||
3 | |||
4 | /* | ||
5 | * Here are the definitions of the MM data types that are embedded in 'struct task_struct'. | ||
6 | * | ||
7 | * (These are defined separately to decouple sched.h from mm_types.h as much as possible.) | ||
8 | */ | ||
9 | |||
10 | #include <linux/types.h> | ||
11 | #include <linux/threads.h> | ||
12 | #include <linux/atomic.h> | ||
13 | #include <linux/cpumask.h> | ||
14 | |||
15 | #include <asm/page.h> | ||
16 | |||
17 | #define USE_SPLIT_PTE_PTLOCKS (NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS) | ||
18 | #define USE_SPLIT_PMD_PTLOCKS (USE_SPLIT_PTE_PTLOCKS && \ | ||
19 | IS_ENABLED(CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK)) | ||
20 | #define ALLOC_SPLIT_PTLOCKS (SPINLOCK_SIZE > BITS_PER_LONG/8) | ||
21 | |||
22 | /* | ||
23 | * The per task VMA cache array: | ||
24 | */ | ||
25 | #define VMACACHE_BITS 2 | ||
26 | #define VMACACHE_SIZE (1U << VMACACHE_BITS) | ||
27 | #define VMACACHE_MASK (VMACACHE_SIZE - 1) | ||
28 | |||
29 | struct vmacache { | ||
30 | u32 seqnum; | ||
31 | struct vm_area_struct *vmas[VMACACHE_SIZE]; | ||
32 | }; | ||
33 | |||
34 | enum { | ||
35 | MM_FILEPAGES, /* Resident file mapping pages */ | ||
36 | MM_ANONPAGES, /* Resident anonymous pages */ | ||
37 | MM_SWAPENTS, /* Anonymous swap entries */ | ||
38 | MM_SHMEMPAGES, /* Resident shared memory pages */ | ||
39 | NR_MM_COUNTERS | ||
40 | }; | ||
41 | |||
42 | #if USE_SPLIT_PTE_PTLOCKS && defined(CONFIG_MMU) | ||
43 | #define SPLIT_RSS_COUNTING | ||
44 | /* per-thread cached information, */ | ||
45 | struct task_rss_stat { | ||
46 | int events; /* for synchronization threshold */ | ||
47 | int count[NR_MM_COUNTERS]; | ||
48 | }; | ||
49 | #endif /* USE_SPLIT_PTE_PTLOCKS */ | ||
50 | |||
51 | struct mm_rss_stat { | ||
52 | atomic_long_t count[NR_MM_COUNTERS]; | ||
53 | }; | ||
54 | |||
55 | struct page_frag { | ||
56 | struct page *page; | ||
57 | #if (BITS_PER_LONG > 32) || (PAGE_SIZE >= 65536) | ||
58 | __u32 offset; | ||
59 | __u32 size; | ||
60 | #else | ||
61 | __u16 offset; | ||
62 | __u16 size; | ||
63 | #endif | ||
64 | }; | ||
65 | |||
66 | /* Track pages that require TLB flushes */ | ||
67 | struct tlbflush_unmap_batch { | ||
68 | #ifdef CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH | ||
69 | /* | ||
70 | * Each bit set is a CPU that potentially has a TLB entry for one of | ||
71 | * the PFNs being flushed. See set_tlb_ubc_flush_pending(). | ||
72 | */ | ||
73 | struct cpumask cpumask; | ||
74 | |||
75 | /* True if any bit in cpumask is set */ | ||
76 | bool flush_required; | ||
77 | |||
78 | /* | ||
79 | * If true then the PTE was dirty when unmapped. The entry must be | ||
80 | * flushed before IO is initiated or a stale TLB entry potentially | ||
81 | * allows an update without redirtying the page. | ||
82 | */ | ||
83 | bool writable; | ||
84 | #endif | ||
85 | }; | ||
86 | |||
87 | #endif /* _LINUX_MM_TYPES_TASK_H */ | ||
diff --git a/include/linux/nmi.h b/include/linux/nmi.h index 0a3fadc32693..aa3cd0878270 100644 --- a/include/linux/nmi.h +++ b/include/linux/nmi.h | |||
@@ -7,6 +7,43 @@ | |||
7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
8 | #include <asm/irq.h> | 8 | #include <asm/irq.h> |
9 | 9 | ||
10 | #ifdef CONFIG_LOCKUP_DETECTOR | ||
11 | extern void touch_softlockup_watchdog_sched(void); | ||
12 | extern void touch_softlockup_watchdog(void); | ||
13 | extern void touch_softlockup_watchdog_sync(void); | ||
14 | extern void touch_all_softlockup_watchdogs(void); | ||
15 | extern int proc_dowatchdog_thresh(struct ctl_table *table, int write, | ||
16 | void __user *buffer, | ||
17 | size_t *lenp, loff_t *ppos); | ||
18 | extern unsigned int softlockup_panic; | ||
19 | extern unsigned int hardlockup_panic; | ||
20 | void lockup_detector_init(void); | ||
21 | #else | ||
22 | static inline void touch_softlockup_watchdog_sched(void) | ||
23 | { | ||
24 | } | ||
25 | static inline void touch_softlockup_watchdog(void) | ||
26 | { | ||
27 | } | ||
28 | static inline void touch_softlockup_watchdog_sync(void) | ||
29 | { | ||
30 | } | ||
31 | static inline void touch_all_softlockup_watchdogs(void) | ||
32 | { | ||
33 | } | ||
34 | static inline void lockup_detector_init(void) | ||
35 | { | ||
36 | } | ||
37 | #endif | ||
38 | |||
39 | #ifdef CONFIG_DETECT_HUNG_TASK | ||
40 | void reset_hung_task_detector(void); | ||
41 | #else | ||
42 | static inline void reset_hung_task_detector(void) | ||
43 | { | ||
44 | } | ||
45 | #endif | ||
46 | |||
10 | /* | 47 | /* |
11 | * The run state of the lockup detectors is controlled by the content of the | 48 | * The run state of the lockup detectors is controlled by the content of the |
12 | * 'watchdog_enabled' variable. Each lockup detector has its dedicated bit - | 49 | * 'watchdog_enabled' variable. Each lockup detector has its dedicated bit - |
diff --git a/include/linux/oom.h b/include/linux/oom.h index b4e36e92bc87..8a266e2be5a6 100644 --- a/include/linux/oom.h +++ b/include/linux/oom.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define __INCLUDE_LINUX_OOM_H | 2 | #define __INCLUDE_LINUX_OOM_H |
3 | 3 | ||
4 | 4 | ||
5 | #include <linux/sched.h> | 5 | #include <linux/sched/signal.h> |
6 | #include <linux/types.h> | 6 | #include <linux/types.h> |
7 | #include <linux/nodemask.h> | 7 | #include <linux/nodemask.h> |
8 | #include <uapi/linux/oom.h> | 8 | #include <uapi/linux/oom.h> |
diff --git a/include/linux/perf_regs.h b/include/linux/perf_regs.h index a5f98d53d732..9b7dd59fe28d 100644 --- a/include/linux/perf_regs.h +++ b/include/linux/perf_regs.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _LINUX_PERF_REGS_H | 1 | #ifndef _LINUX_PERF_REGS_H |
2 | #define _LINUX_PERF_REGS_H | 2 | #define _LINUX_PERF_REGS_H |
3 | 3 | ||
4 | #include <linux/sched/task_stack.h> | ||
5 | |||
4 | struct perf_regs { | 6 | struct perf_regs { |
5 | __u64 abi; | 7 | __u64 abi; |
6 | struct pt_regs *regs; | 8 | struct pt_regs *regs; |
diff --git a/include/linux/pid.h b/include/linux/pid.h index 298ead5512e5..4d179316e431 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef _LINUX_PID_H | 1 | #ifndef _LINUX_PID_H |
2 | #define _LINUX_PID_H | 2 | #define _LINUX_PID_H |
3 | 3 | ||
4 | #include <linux/rcupdate.h> | 4 | #include <linux/rculist.h> |
5 | 5 | ||
6 | enum pid_type | 6 | enum pid_type |
7 | { | 7 | { |
diff --git a/include/linux/preempt.h b/include/linux/preempt.h index 7eeceac52dea..cae461224948 100644 --- a/include/linux/preempt.h +++ b/include/linux/preempt.h | |||
@@ -55,6 +55,27 @@ | |||
55 | /* We use the MSB mostly because its available */ | 55 | /* We use the MSB mostly because its available */ |
56 | #define PREEMPT_NEED_RESCHED 0x80000000 | 56 | #define PREEMPT_NEED_RESCHED 0x80000000 |
57 | 57 | ||
58 | #define PREEMPT_DISABLED (PREEMPT_DISABLE_OFFSET + PREEMPT_ENABLED) | ||
59 | |||
60 | /* | ||
61 | * Disable preemption until the scheduler is running -- use an unconditional | ||
62 | * value so that it also works on !PREEMPT_COUNT kernels. | ||
63 | * | ||
64 | * Reset by start_kernel()->sched_init()->init_idle()->init_idle_preempt_count(). | ||
65 | */ | ||
66 | #define INIT_PREEMPT_COUNT PREEMPT_OFFSET | ||
67 | |||
68 | /* | ||
69 | * Initial preempt_count value; reflects the preempt_count schedule invariant | ||
70 | * which states that during context switches: | ||
71 | * | ||
72 | * preempt_count() == 2*PREEMPT_DISABLE_OFFSET | ||
73 | * | ||
74 | * Note: PREEMPT_DISABLE_OFFSET is 0 for !PREEMPT_COUNT kernels. | ||
75 | * Note: See finish_task_switch(). | ||
76 | */ | ||
77 | #define FORK_PREEMPT_COUNT (2*PREEMPT_DISABLE_OFFSET + PREEMPT_ENABLED) | ||
78 | |||
58 | /* preempt_count() and related functions, depends on PREEMPT_NEED_RESCHED */ | 79 | /* preempt_count() and related functions, depends on PREEMPT_NEED_RESCHED */ |
59 | #include <asm/preempt.h> | 80 | #include <asm/preempt.h> |
60 | 81 | ||
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index e0e539321ab9..422bc2e4cb6a 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/compiler.h> /* For unlikely. */ | 4 | #include <linux/compiler.h> /* For unlikely. */ |
5 | #include <linux/sched.h> /* For struct task_struct. */ | 5 | #include <linux/sched.h> /* For struct task_struct. */ |
6 | #include <linux/sched/signal.h> /* For send_sig(), same_thread_group(), etc. */ | ||
6 | #include <linux/err.h> /* for IS_ERR_VALUE */ | 7 | #include <linux/err.h> /* for IS_ERR_VALUE */ |
7 | #include <linux/bug.h> /* For BUG_ON. */ | 8 | #include <linux/bug.h> /* For BUG_ON. */ |
8 | #include <linux/pid_namespace.h> /* For task_active_pid_ns. */ | 9 | #include <linux/pid_namespace.h> /* For task_active_pid_ns. */ |
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 6ade6a52d9d4..de88b33c0974 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -40,7 +40,6 @@ | |||
40 | #include <linux/cpumask.h> | 40 | #include <linux/cpumask.h> |
41 | #include <linux/seqlock.h> | 41 | #include <linux/seqlock.h> |
42 | #include <linux/lockdep.h> | 42 | #include <linux/lockdep.h> |
43 | #include <linux/completion.h> | ||
44 | #include <linux/debugobjects.h> | 43 | #include <linux/debugobjects.h> |
45 | #include <linux/bug.h> | 44 | #include <linux/bug.h> |
46 | #include <linux/compiler.h> | 45 | #include <linux/compiler.h> |
@@ -226,45 +225,6 @@ void call_rcu_sched(struct rcu_head *head, | |||
226 | 225 | ||
227 | void synchronize_sched(void); | 226 | void synchronize_sched(void); |
228 | 227 | ||
229 | /* | ||
230 | * Structure allowing asynchronous waiting on RCU. | ||
231 | */ | ||
232 | struct rcu_synchronize { | ||
233 | struct rcu_head head; | ||
234 | struct completion completion; | ||
235 | }; | ||
236 | void wakeme_after_rcu(struct rcu_head *head); | ||
237 | |||
238 | void __wait_rcu_gp(bool checktiny, int n, call_rcu_func_t *crcu_array, | ||
239 | struct rcu_synchronize *rs_array); | ||
240 | |||
241 | #define _wait_rcu_gp(checktiny, ...) \ | ||
242 | do { \ | ||
243 | call_rcu_func_t __crcu_array[] = { __VA_ARGS__ }; \ | ||
244 | struct rcu_synchronize __rs_array[ARRAY_SIZE(__crcu_array)]; \ | ||
245 | __wait_rcu_gp(checktiny, ARRAY_SIZE(__crcu_array), \ | ||
246 | __crcu_array, __rs_array); \ | ||
247 | } while (0) | ||
248 | |||
249 | #define wait_rcu_gp(...) _wait_rcu_gp(false, __VA_ARGS__) | ||
250 | |||
251 | /** | ||
252 | * synchronize_rcu_mult - Wait concurrently for multiple grace periods | ||
253 | * @...: List of call_rcu() functions for the flavors to wait on. | ||
254 | * | ||
255 | * This macro waits concurrently for multiple flavors of RCU grace periods. | ||
256 | * For example, synchronize_rcu_mult(call_rcu, call_rcu_bh) would wait | ||
257 | * on concurrent RCU and RCU-bh grace periods. Waiting on a give SRCU | ||
258 | * domain requires you to write a wrapper function for that SRCU domain's | ||
259 | * call_srcu() function, supplying the corresponding srcu_struct. | ||
260 | * | ||
261 | * If Tiny RCU, tell _wait_rcu_gp() not to bother waiting for RCU | ||
262 | * or RCU-bh, given that anywhere synchronize_rcu_mult() can be called | ||
263 | * is automatically a grace period. | ||
264 | */ | ||
265 | #define synchronize_rcu_mult(...) \ | ||
266 | _wait_rcu_gp(IS_ENABLED(CONFIG_TINY_RCU), __VA_ARGS__) | ||
267 | |||
268 | /** | 228 | /** |
269 | * call_rcu_tasks() - Queue an RCU for invocation task-based grace period | 229 | * call_rcu_tasks() - Queue an RCU for invocation task-based grace period |
270 | * @head: structure to be used for queueing the RCU updates. | 230 | * @head: structure to be used for queueing the RCU updates. |
diff --git a/include/linux/rcupdate_wait.h b/include/linux/rcupdate_wait.h new file mode 100644 index 000000000000..e774b4f5f220 --- /dev/null +++ b/include/linux/rcupdate_wait.h | |||
@@ -0,0 +1,50 @@ | |||
1 | #ifndef _LINUX_SCHED_RCUPDATE_WAIT_H | ||
2 | #define _LINUX_SCHED_RCUPDATE_WAIT_H | ||
3 | |||
4 | /* | ||
5 | * RCU synchronization types and methods: | ||
6 | */ | ||
7 | |||
8 | #include <linux/rcupdate.h> | ||
9 | #include <linux/completion.h> | ||
10 | |||
11 | /* | ||
12 | * Structure allowing asynchronous waiting on RCU. | ||
13 | */ | ||
14 | struct rcu_synchronize { | ||
15 | struct rcu_head head; | ||
16 | struct completion completion; | ||
17 | }; | ||
18 | void wakeme_after_rcu(struct rcu_head *head); | ||
19 | |||
20 | void __wait_rcu_gp(bool checktiny, int n, call_rcu_func_t *crcu_array, | ||
21 | struct rcu_synchronize *rs_array); | ||
22 | |||
23 | #define _wait_rcu_gp(checktiny, ...) \ | ||
24 | do { \ | ||
25 | call_rcu_func_t __crcu_array[] = { __VA_ARGS__ }; \ | ||
26 | struct rcu_synchronize __rs_array[ARRAY_SIZE(__crcu_array)]; \ | ||
27 | __wait_rcu_gp(checktiny, ARRAY_SIZE(__crcu_array), \ | ||
28 | __crcu_array, __rs_array); \ | ||
29 | } while (0) | ||
30 | |||
31 | #define wait_rcu_gp(...) _wait_rcu_gp(false, __VA_ARGS__) | ||
32 | |||
33 | /** | ||
34 | * synchronize_rcu_mult - Wait concurrently for multiple grace periods | ||
35 | * @...: List of call_rcu() functions for the flavors to wait on. | ||
36 | * | ||
37 | * This macro waits concurrently for multiple flavors of RCU grace periods. | ||
38 | * For example, synchronize_rcu_mult(call_rcu, call_rcu_bh) would wait | ||
39 | * on concurrent RCU and RCU-bh grace periods. Waiting on a give SRCU | ||
40 | * domain requires you to write a wrapper function for that SRCU domain's | ||
41 | * call_srcu() function, supplying the corresponding srcu_struct. | ||
42 | * | ||
43 | * If Tiny RCU, tell _wait_rcu_gp() not to bother waiting for RCU | ||
44 | * or RCU-bh, given that anywhere synchronize_rcu_mult() can be called | ||
45 | * is automatically a grace period. | ||
46 | */ | ||
47 | #define synchronize_rcu_mult(...) \ | ||
48 | _wait_rcu_gp(IS_ENABLED(CONFIG_TINY_RCU), __VA_ARGS__) | ||
49 | |||
50 | #endif /* _LINUX_SCHED_RCUPDATE_WAIT_H */ | ||
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h index 4f9b2fa2173d..b452953e21c8 100644 --- a/include/linux/rcutiny.h +++ b/include/linux/rcutiny.h | |||
@@ -53,15 +53,8 @@ static inline void cond_synchronize_sched(unsigned long oldstate) | |||
53 | might_sleep(); | 53 | might_sleep(); |
54 | } | 54 | } |
55 | 55 | ||
56 | static inline void rcu_barrier_bh(void) | 56 | extern void rcu_barrier_bh(void); |
57 | { | 57 | extern void rcu_barrier_sched(void); |
58 | wait_rcu_gp(call_rcu_bh); | ||
59 | } | ||
60 | |||
61 | static inline void rcu_barrier_sched(void) | ||
62 | { | ||
63 | wait_rcu_gp(call_rcu_sched); | ||
64 | } | ||
65 | 58 | ||
66 | static inline void synchronize_rcu_expedited(void) | 59 | static inline void synchronize_rcu_expedited(void) |
67 | { | 60 | { |
diff --git a/include/linux/rhashtable.h b/include/linux/rhashtable.h index f2e12a845910..092292b6675e 100644 --- a/include/linux/rhashtable.h +++ b/include/linux/rhashtable.h | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <linux/list_nulls.h> | 25 | #include <linux/list_nulls.h> |
26 | #include <linux/workqueue.h> | 26 | #include <linux/workqueue.h> |
27 | #include <linux/mutex.h> | 27 | #include <linux/mutex.h> |
28 | #include <linux/rcupdate.h> | 28 | #include <linux/rculist.h> |
29 | 29 | ||
30 | /* | 30 | /* |
31 | * The end of the chain is marked with a special nulls marks which has | 31 | * The end of the chain is marked with a special nulls marks which has |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 4a28deb5f210..d67eee84fd43 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1,197 +1,57 @@ | |||
1 | #ifndef _LINUX_SCHED_H | 1 | #ifndef _LINUX_SCHED_H |
2 | #define _LINUX_SCHED_H | 2 | #define _LINUX_SCHED_H |
3 | 3 | ||
4 | #include <uapi/linux/sched.h> | 4 | /* |
5 | 5 | * Define 'struct task_struct' and provide the main scheduler | |
6 | #include <linux/sched/prio.h> | 6 | * APIs (schedule(), wakeup variants, etc.) |
7 | 7 | */ | |
8 | |||
9 | struct sched_param { | ||
10 | int sched_priority; | ||
11 | }; | ||
12 | |||
13 | #include <asm/param.h> /* for HZ */ | ||
14 | 8 | ||
15 | #include <linux/capability.h> | 9 | #include <uapi/linux/sched.h> |
16 | #include <linux/threads.h> | ||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/types.h> | ||
19 | #include <linux/timex.h> | ||
20 | #include <linux/jiffies.h> | ||
21 | #include <linux/plist.h> | ||
22 | #include <linux/rbtree.h> | ||
23 | #include <linux/thread_info.h> | ||
24 | #include <linux/cpumask.h> | ||
25 | #include <linux/errno.h> | ||
26 | #include <linux/nodemask.h> | ||
27 | #include <linux/mm_types.h> | ||
28 | #include <linux/preempt.h> | ||
29 | 10 | ||
30 | #include <asm/page.h> | 11 | #include <asm/current.h> |
31 | #include <asm/ptrace.h> | ||
32 | 12 | ||
33 | #include <linux/smp.h> | 13 | #include <linux/pid.h> |
34 | #include <linux/sem.h> | 14 | #include <linux/sem.h> |
35 | #include <linux/shm.h> | 15 | #include <linux/shm.h> |
36 | #include <linux/signal.h> | 16 | #include <linux/kcov.h> |
37 | #include <linux/compiler.h> | 17 | #include <linux/mutex.h> |
38 | #include <linux/completion.h> | 18 | #include <linux/plist.h> |
39 | #include <linux/pid.h> | 19 | #include <linux/hrtimer.h> |
40 | #include <linux/percpu.h> | ||
41 | #include <linux/topology.h> | ||
42 | #include <linux/seccomp.h> | 20 | #include <linux/seccomp.h> |
21 | #include <linux/nodemask.h> | ||
43 | #include <linux/rcupdate.h> | 22 | #include <linux/rcupdate.h> |
44 | #include <linux/rculist.h> | ||
45 | #include <linux/rtmutex.h> | ||
46 | |||
47 | #include <linux/time.h> | ||
48 | #include <linux/param.h> | ||
49 | #include <linux/resource.h> | 23 | #include <linux/resource.h> |
50 | #include <linux/timer.h> | ||
51 | #include <linux/hrtimer.h> | ||
52 | #include <linux/kcov.h> | ||
53 | #include <linux/task_io_accounting.h> | ||
54 | #include <linux/latencytop.h> | 24 | #include <linux/latencytop.h> |
55 | #include <linux/cred.h> | 25 | #include <linux/sched/prio.h> |
56 | #include <linux/llist.h> | 26 | #include <linux/signal_types.h> |
57 | #include <linux/uidgid.h> | 27 | #include <linux/mm_types_task.h> |
58 | #include <linux/gfp.h> | 28 | #include <linux/task_io_accounting.h> |
59 | #include <linux/magic.h> | ||
60 | #include <linux/cgroup-defs.h> | ||
61 | |||
62 | #include <asm/processor.h> | ||
63 | |||
64 | #define SCHED_ATTR_SIZE_VER0 48 /* sizeof first published struct */ | ||
65 | |||
66 | /* | ||
67 | * Extended scheduling parameters data structure. | ||
68 | * | ||
69 | * This is needed because the original struct sched_param can not be | ||
70 | * altered without introducing ABI issues with legacy applications | ||
71 | * (e.g., in sched_getparam()). | ||
72 | * | ||
73 | * However, the possibility of specifying more than just a priority for | ||
74 | * the tasks may be useful for a wide variety of application fields, e.g., | ||
75 | * multimedia, streaming, automation and control, and many others. | ||
76 | * | ||
77 | * This variant (sched_attr) is meant at describing a so-called | ||
78 | * sporadic time-constrained task. In such model a task is specified by: | ||
79 | * - the activation period or minimum instance inter-arrival time; | ||
80 | * - the maximum (or average, depending on the actual scheduling | ||
81 | * discipline) computation time of all instances, a.k.a. runtime; | ||
82 | * - the deadline (relative to the actual activation time) of each | ||
83 | * instance. | ||
84 | * Very briefly, a periodic (sporadic) task asks for the execution of | ||
85 | * some specific computation --which is typically called an instance-- | ||
86 | * (at most) every period. Moreover, each instance typically lasts no more | ||
87 | * than the runtime and must be completed by time instant t equal to | ||
88 | * the instance activation time + the deadline. | ||
89 | * | ||
90 | * This is reflected by the actual fields of the sched_attr structure: | ||
91 | * | ||
92 | * @size size of the structure, for fwd/bwd compat. | ||
93 | * | ||
94 | * @sched_policy task's scheduling policy | ||
95 | * @sched_flags for customizing the scheduler behaviour | ||
96 | * @sched_nice task's nice value (SCHED_NORMAL/BATCH) | ||
97 | * @sched_priority task's static priority (SCHED_FIFO/RR) | ||
98 | * @sched_deadline representative of the task's deadline | ||
99 | * @sched_runtime representative of the task's runtime | ||
100 | * @sched_period representative of the task's period | ||
101 | * | ||
102 | * Given this task model, there are a multiplicity of scheduling algorithms | ||
103 | * and policies, that can be used to ensure all the tasks will make their | ||
104 | * timing constraints. | ||
105 | * | ||
106 | * As of now, the SCHED_DEADLINE policy (sched_dl scheduling class) is the | ||
107 | * only user of this new interface. More information about the algorithm | ||
108 | * available in the scheduling class file or in Documentation/. | ||
109 | */ | ||
110 | struct sched_attr { | ||
111 | u32 size; | ||
112 | |||
113 | u32 sched_policy; | ||
114 | u64 sched_flags; | ||
115 | |||
116 | /* SCHED_NORMAL, SCHED_BATCH */ | ||
117 | s32 sched_nice; | ||
118 | |||
119 | /* SCHED_FIFO, SCHED_RR */ | ||
120 | u32 sched_priority; | ||
121 | |||
122 | /* SCHED_DEADLINE */ | ||
123 | u64 sched_runtime; | ||
124 | u64 sched_deadline; | ||
125 | u64 sched_period; | ||
126 | }; | ||
127 | 29 | ||
128 | struct futex_pi_state; | 30 | /* task_struct member predeclarations (sorted alphabetically): */ |
129 | struct robust_list_head; | 31 | struct audit_context; |
32 | struct backing_dev_info; | ||
130 | struct bio_list; | 33 | struct bio_list; |
131 | struct fs_struct; | ||
132 | struct perf_event_context; | ||
133 | struct blk_plug; | 34 | struct blk_plug; |
134 | struct filename; | 35 | struct cfs_rq; |
36 | struct fs_struct; | ||
37 | struct futex_pi_state; | ||
38 | struct io_context; | ||
39 | struct mempolicy; | ||
135 | struct nameidata; | 40 | struct nameidata; |
136 | 41 | struct nsproxy; | |
137 | #define VMACACHE_BITS 2 | 42 | struct perf_event_context; |
138 | #define VMACACHE_SIZE (1U << VMACACHE_BITS) | 43 | struct pid_namespace; |
139 | #define VMACACHE_MASK (VMACACHE_SIZE - 1) | 44 | struct pipe_inode_info; |
140 | 45 | struct rcu_node; | |
141 | /* | 46 | struct reclaim_state; |
142 | * These are the constant used to fake the fixed-point load-average | 47 | struct robust_list_head; |
143 | * counting. Some notes: | 48 | struct sched_attr; |
144 | * - 11 bit fractions expand to 22 bits by the multiplies: this gives | 49 | struct sched_param; |
145 | * a load-average precision of 10 bits integer + 11 bits fractional | ||
146 | * - if you want to count load-averages more often, you need more | ||
147 | * precision, or rounding will get you. With 2-second counting freq, | ||
148 | * the EXP_n values would be 1981, 2034 and 2043 if still using only | ||
149 | * 11 bit fractions. | ||
150 | */ | ||
151 | extern unsigned long avenrun[]; /* Load averages */ | ||
152 | extern void get_avenrun(unsigned long *loads, unsigned long offset, int shift); | ||
153 | |||
154 | #define FSHIFT 11 /* nr of bits of precision */ | ||
155 | #define FIXED_1 (1<<FSHIFT) /* 1.0 as fixed-point */ | ||
156 | #define LOAD_FREQ (5*HZ+1) /* 5 sec intervals */ | ||
157 | #define EXP_1 1884 /* 1/exp(5sec/1min) as fixed-point */ | ||
158 | #define EXP_5 2014 /* 1/exp(5sec/5min) */ | ||
159 | #define EXP_15 2037 /* 1/exp(5sec/15min) */ | ||
160 | |||
161 | #define CALC_LOAD(load,exp,n) \ | ||
162 | load *= exp; \ | ||
163 | load += n*(FIXED_1-exp); \ | ||
164 | load >>= FSHIFT; | ||
165 | |||
166 | extern unsigned long total_forks; | ||
167 | extern int nr_threads; | ||
168 | DECLARE_PER_CPU(unsigned long, process_counts); | ||
169 | extern int nr_processes(void); | ||
170 | extern unsigned long nr_running(void); | ||
171 | extern bool single_task_running(void); | ||
172 | extern unsigned long nr_iowait(void); | ||
173 | extern unsigned long nr_iowait_cpu(int cpu); | ||
174 | extern void get_iowait_load(unsigned long *nr_waiters, unsigned long *load); | ||
175 | |||
176 | extern void calc_global_load(unsigned long ticks); | ||
177 | |||
178 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON) | ||
179 | extern void cpu_load_update_nohz_start(void); | ||
180 | extern void cpu_load_update_nohz_stop(void); | ||
181 | #else | ||
182 | static inline void cpu_load_update_nohz_start(void) { } | ||
183 | static inline void cpu_load_update_nohz_stop(void) { } | ||
184 | #endif | ||
185 | |||
186 | extern void dump_cpu_task(int cpu); | ||
187 | |||
188 | struct seq_file; | 50 | struct seq_file; |
189 | struct cfs_rq; | 51 | struct sighand_struct; |
52 | struct signal_struct; | ||
53 | struct task_delay_info; | ||
190 | struct task_group; | 54 | struct task_group; |
191 | #ifdef CONFIG_SCHED_DEBUG | ||
192 | extern void proc_sched_show_task(struct task_struct *p, struct seq_file *m); | ||
193 | extern void proc_sched_set_task(struct task_struct *p); | ||
194 | #endif | ||
195 | 55 | ||
196 | /* | 56 | /* |
197 | * Task state bitmask. NOTE! These bits are also | 57 | * Task state bitmask. NOTE! These bits are also |
@@ -203,53 +63,53 @@ extern void proc_sched_set_task(struct task_struct *p); | |||
203 | * modifying one set can't modify the other one by | 63 | * modifying one set can't modify the other one by |
204 | * mistake. | 64 | * mistake. |
205 | */ | 65 | */ |
206 | #define TASK_RUNNING 0 | 66 | |
207 | #define TASK_INTERRUPTIBLE 1 | 67 | /* Used in tsk->state: */ |
208 | #define TASK_UNINTERRUPTIBLE 2 | 68 | #define TASK_RUNNING 0 |
209 | #define __TASK_STOPPED 4 | 69 | #define TASK_INTERRUPTIBLE 1 |
210 | #define __TASK_TRACED 8 | 70 | #define TASK_UNINTERRUPTIBLE 2 |
211 | /* in tsk->exit_state */ | 71 | #define __TASK_STOPPED 4 |
212 | #define EXIT_DEAD 16 | 72 | #define __TASK_TRACED 8 |
213 | #define EXIT_ZOMBIE 32 | 73 | /* Used in tsk->exit_state: */ |
214 | #define EXIT_TRACE (EXIT_ZOMBIE | EXIT_DEAD) | 74 | #define EXIT_DEAD 16 |
215 | /* in tsk->state again */ | 75 | #define EXIT_ZOMBIE 32 |
216 | #define TASK_DEAD 64 | 76 | #define EXIT_TRACE (EXIT_ZOMBIE | EXIT_DEAD) |
217 | #define TASK_WAKEKILL 128 | 77 | /* Used in tsk->state again: */ |
218 | #define TASK_WAKING 256 | 78 | #define TASK_DEAD 64 |
219 | #define TASK_PARKED 512 | 79 | #define TASK_WAKEKILL 128 |
220 | #define TASK_NOLOAD 1024 | 80 | #define TASK_WAKING 256 |
221 | #define TASK_NEW 2048 | 81 | #define TASK_PARKED 512 |
222 | #define TASK_STATE_MAX 4096 | 82 | #define TASK_NOLOAD 1024 |
223 | 83 | #define TASK_NEW 2048 | |
224 | #define TASK_STATE_TO_CHAR_STR "RSDTtXZxKWPNn" | 84 | #define TASK_STATE_MAX 4096 |
225 | 85 | ||
226 | extern char ___assert_task_state[1 - 2*!!( | 86 | #define TASK_STATE_TO_CHAR_STR "RSDTtXZxKWPNn" |
227 | sizeof(TASK_STATE_TO_CHAR_STR)-1 != ilog2(TASK_STATE_MAX)+1)]; | 87 | |
228 | 88 | /* Convenience macros for the sake of set_current_state: */ | |
229 | /* Convenience macros for the sake of set_current_state */ | 89 | #define TASK_KILLABLE (TASK_WAKEKILL | TASK_UNINTERRUPTIBLE) |
230 | #define TASK_KILLABLE (TASK_WAKEKILL | TASK_UNINTERRUPTIBLE) | 90 | #define TASK_STOPPED (TASK_WAKEKILL | __TASK_STOPPED) |
231 | #define TASK_STOPPED (TASK_WAKEKILL | __TASK_STOPPED) | 91 | #define TASK_TRACED (TASK_WAKEKILL | __TASK_TRACED) |
232 | #define TASK_TRACED (TASK_WAKEKILL | __TASK_TRACED) | 92 | |
233 | 93 | #define TASK_IDLE (TASK_UNINTERRUPTIBLE | TASK_NOLOAD) | |
234 | #define TASK_IDLE (TASK_UNINTERRUPTIBLE | TASK_NOLOAD) | 94 | |
235 | 95 | /* Convenience macros for the sake of wake_up(): */ | |
236 | /* Convenience macros for the sake of wake_up */ | 96 | #define TASK_NORMAL (TASK_INTERRUPTIBLE | TASK_UNINTERRUPTIBLE) |
237 | #define TASK_NORMAL (TASK_INTERRUPTIBLE | TASK_UNINTERRUPTIBLE) | 97 | #define TASK_ALL (TASK_NORMAL | __TASK_STOPPED | __TASK_TRACED) |
238 | #define TASK_ALL (TASK_NORMAL | __TASK_STOPPED | __TASK_TRACED) | 98 | |
239 | 99 | /* get_task_state(): */ | |
240 | /* get_task_state() */ | 100 | #define TASK_REPORT (TASK_RUNNING | TASK_INTERRUPTIBLE | \ |
241 | #define TASK_REPORT (TASK_RUNNING | TASK_INTERRUPTIBLE | \ | 101 | TASK_UNINTERRUPTIBLE | __TASK_STOPPED | \ |
242 | TASK_UNINTERRUPTIBLE | __TASK_STOPPED | \ | 102 | __TASK_TRACED | EXIT_ZOMBIE | EXIT_DEAD) |
243 | __TASK_TRACED | EXIT_ZOMBIE | EXIT_DEAD) | 103 | |
244 | 104 | #define task_is_traced(task) ((task->state & __TASK_TRACED) != 0) | |
245 | #define task_is_traced(task) ((task->state & __TASK_TRACED) != 0) | 105 | |
246 | #define task_is_stopped(task) ((task->state & __TASK_STOPPED) != 0) | 106 | #define task_is_stopped(task) ((task->state & __TASK_STOPPED) != 0) |
247 | #define task_is_stopped_or_traced(task) \ | 107 | |
248 | ((task->state & (__TASK_STOPPED | __TASK_TRACED)) != 0) | 108 | #define task_is_stopped_or_traced(task) ((task->state & (__TASK_STOPPED | __TASK_TRACED)) != 0) |
249 | #define task_contributes_to_load(task) \ | 109 | |
250 | ((task->state & TASK_UNINTERRUPTIBLE) != 0 && \ | 110 | #define task_contributes_to_load(task) ((task->state & TASK_UNINTERRUPTIBLE) != 0 && \ |
251 | (task->flags & PF_FROZEN) == 0 && \ | 111 | (task->flags & PF_FROZEN) == 0 && \ |
252 | (task->state & TASK_NOLOAD) == 0) | 112 | (task->state & TASK_NOLOAD) == 0) |
253 | 113 | ||
254 | #ifdef CONFIG_DEBUG_ATOMIC_SLEEP | 114 | #ifdef CONFIG_DEBUG_ATOMIC_SLEEP |
255 | 115 | ||
@@ -299,139 +159,24 @@ extern char ___assert_task_state[1 - 2*!!( | |||
299 | * | 159 | * |
300 | * Also see the comments of try_to_wake_up(). | 160 | * Also see the comments of try_to_wake_up(). |
301 | */ | 161 | */ |
302 | #define __set_current_state(state_value) \ | 162 | #define __set_current_state(state_value) do { current->state = (state_value); } while (0) |
303 | do { current->state = (state_value); } while (0) | 163 | #define set_current_state(state_value) smp_store_mb(current->state, (state_value)) |
304 | #define set_current_state(state_value) \ | ||
305 | smp_store_mb(current->state, (state_value)) | ||
306 | |||
307 | #endif | 164 | #endif |
308 | 165 | ||
309 | /* Task command name length */ | 166 | /* Task command name length: */ |
310 | #define TASK_COMM_LEN 16 | 167 | #define TASK_COMM_LEN 16 |
311 | |||
312 | #include <linux/spinlock.h> | ||
313 | |||
314 | /* | ||
315 | * This serializes "schedule()" and also protects | ||
316 | * the run-queue from deletions/modifications (but | ||
317 | * _adding_ to the beginning of the run-queue has | ||
318 | * a separate lock). | ||
319 | */ | ||
320 | extern rwlock_t tasklist_lock; | ||
321 | extern spinlock_t mmlist_lock; | ||
322 | |||
323 | struct task_struct; | ||
324 | |||
325 | #ifdef CONFIG_PROVE_RCU | ||
326 | extern int lockdep_tasklist_lock_is_held(void); | ||
327 | #endif /* #ifdef CONFIG_PROVE_RCU */ | ||
328 | |||
329 | extern void sched_init(void); | ||
330 | extern void sched_init_smp(void); | ||
331 | extern asmlinkage void schedule_tail(struct task_struct *prev); | ||
332 | extern void init_idle(struct task_struct *idle, int cpu); | ||
333 | extern void init_idle_bootup_task(struct task_struct *idle); | ||
334 | |||
335 | extern cpumask_var_t cpu_isolated_map; | ||
336 | |||
337 | extern int runqueue_is_locked(int cpu); | ||
338 | |||
339 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON) | ||
340 | extern void nohz_balance_enter_idle(int cpu); | ||
341 | extern void set_cpu_sd_state_idle(void); | ||
342 | extern int get_nohz_timer_target(void); | ||
343 | #else | ||
344 | static inline void nohz_balance_enter_idle(int cpu) { } | ||
345 | static inline void set_cpu_sd_state_idle(void) { } | ||
346 | #endif | ||
347 | |||
348 | /* | ||
349 | * Only dump TASK_* tasks. (0 for all tasks) | ||
350 | */ | ||
351 | extern void show_state_filter(unsigned long state_filter); | ||
352 | |||
353 | static inline void show_state(void) | ||
354 | { | ||
355 | show_state_filter(0); | ||
356 | } | ||
357 | 168 | ||
358 | extern void show_regs(struct pt_regs *); | 169 | extern cpumask_var_t cpu_isolated_map; |
359 | 170 | ||
360 | /* | ||
361 | * TASK is a pointer to the task whose backtrace we want to see (or NULL for current | ||
362 | * task), SP is the stack pointer of the first frame that should be shown in the back | ||
363 | * trace (or NULL if the entire call-chain of the task should be shown). | ||
364 | */ | ||
365 | extern void show_stack(struct task_struct *task, unsigned long *sp); | ||
366 | |||
367 | extern void cpu_init (void); | ||
368 | extern void trap_init(void); | ||
369 | extern void update_process_times(int user); | ||
370 | extern void scheduler_tick(void); | 171 | extern void scheduler_tick(void); |
371 | extern int sched_cpu_starting(unsigned int cpu); | ||
372 | extern int sched_cpu_activate(unsigned int cpu); | ||
373 | extern int sched_cpu_deactivate(unsigned int cpu); | ||
374 | |||
375 | #ifdef CONFIG_HOTPLUG_CPU | ||
376 | extern int sched_cpu_dying(unsigned int cpu); | ||
377 | #else | ||
378 | # define sched_cpu_dying NULL | ||
379 | #endif | ||
380 | |||
381 | extern void sched_show_task(struct task_struct *p); | ||
382 | |||
383 | #ifdef CONFIG_LOCKUP_DETECTOR | ||
384 | extern void touch_softlockup_watchdog_sched(void); | ||
385 | extern void touch_softlockup_watchdog(void); | ||
386 | extern void touch_softlockup_watchdog_sync(void); | ||
387 | extern void touch_all_softlockup_watchdogs(void); | ||
388 | extern int proc_dowatchdog_thresh(struct ctl_table *table, int write, | ||
389 | void __user *buffer, | ||
390 | size_t *lenp, loff_t *ppos); | ||
391 | extern unsigned int softlockup_panic; | ||
392 | extern unsigned int hardlockup_panic; | ||
393 | void lockup_detector_init(void); | ||
394 | #else | ||
395 | static inline void touch_softlockup_watchdog_sched(void) | ||
396 | { | ||
397 | } | ||
398 | static inline void touch_softlockup_watchdog(void) | ||
399 | { | ||
400 | } | ||
401 | static inline void touch_softlockup_watchdog_sync(void) | ||
402 | { | ||
403 | } | ||
404 | static inline void touch_all_softlockup_watchdogs(void) | ||
405 | { | ||
406 | } | ||
407 | static inline void lockup_detector_init(void) | ||
408 | { | ||
409 | } | ||
410 | #endif | ||
411 | |||
412 | #ifdef CONFIG_DETECT_HUNG_TASK | ||
413 | void reset_hung_task_detector(void); | ||
414 | #else | ||
415 | static inline void reset_hung_task_detector(void) | ||
416 | { | ||
417 | } | ||
418 | #endif | ||
419 | |||
420 | /* Attach to any functions which should be ignored in wchan output. */ | ||
421 | #define __sched __attribute__((__section__(".sched.text"))) | ||
422 | 172 | ||
423 | /* Linker adds these: start and end of __sched functions */ | 173 | #define MAX_SCHEDULE_TIMEOUT LONG_MAX |
424 | extern char __sched_text_start[], __sched_text_end[]; | ||
425 | 174 | ||
426 | /* Is this address in the __sched functions? */ | 175 | extern long schedule_timeout(long timeout); |
427 | extern int in_sched_functions(unsigned long addr); | 176 | extern long schedule_timeout_interruptible(long timeout); |
428 | 177 | extern long schedule_timeout_killable(long timeout); | |
429 | #define MAX_SCHEDULE_TIMEOUT LONG_MAX | 178 | extern long schedule_timeout_uninterruptible(long timeout); |
430 | extern signed long schedule_timeout(signed long timeout); | 179 | extern long schedule_timeout_idle(long timeout); |
431 | extern signed long schedule_timeout_interruptible(signed long timeout); | ||
432 | extern signed long schedule_timeout_killable(signed long timeout); | ||
433 | extern signed long schedule_timeout_uninterruptible(signed long timeout); | ||
434 | extern signed long schedule_timeout_idle(signed long timeout); | ||
435 | asmlinkage void schedule(void); | 180 | asmlinkage void schedule(void); |
436 | extern void schedule_preempt_disabled(void); | 181 | extern void schedule_preempt_disabled(void); |
437 | 182 | ||
@@ -440,112 +185,6 @@ extern void io_schedule_finish(int token); | |||
440 | extern long io_schedule_timeout(long timeout); | 185 | extern long io_schedule_timeout(long timeout); |
441 | extern void io_schedule(void); | 186 | extern void io_schedule(void); |
442 | 187 | ||
443 | void __noreturn do_task_dead(void); | ||
444 | |||
445 | struct nsproxy; | ||
446 | struct user_namespace; | ||
447 | |||
448 | #ifdef CONFIG_MMU | ||
449 | extern void arch_pick_mmap_layout(struct mm_struct *mm); | ||
450 | extern unsigned long | ||
451 | arch_get_unmapped_area(struct file *, unsigned long, unsigned long, | ||
452 | unsigned long, unsigned long); | ||
453 | extern unsigned long | ||
454 | arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr, | ||
455 | unsigned long len, unsigned long pgoff, | ||
456 | unsigned long flags); | ||
457 | #else | ||
458 | static inline void arch_pick_mmap_layout(struct mm_struct *mm) {} | ||
459 | #endif | ||
460 | |||
461 | #define SUID_DUMP_DISABLE 0 /* No setuid dumping */ | ||
462 | #define SUID_DUMP_USER 1 /* Dump as user of process */ | ||
463 | #define SUID_DUMP_ROOT 2 /* Dump as root */ | ||
464 | |||
465 | /* mm flags */ | ||
466 | |||
467 | /* for SUID_DUMP_* above */ | ||
468 | #define MMF_DUMPABLE_BITS 2 | ||
469 | #define MMF_DUMPABLE_MASK ((1 << MMF_DUMPABLE_BITS) - 1) | ||
470 | |||
471 | extern void set_dumpable(struct mm_struct *mm, int value); | ||
472 | /* | ||
473 | * This returns the actual value of the suid_dumpable flag. For things | ||
474 | * that are using this for checking for privilege transitions, it must | ||
475 | * test against SUID_DUMP_USER rather than treating it as a boolean | ||
476 | * value. | ||
477 | */ | ||
478 | static inline int __get_dumpable(unsigned long mm_flags) | ||
479 | { | ||
480 | return mm_flags & MMF_DUMPABLE_MASK; | ||
481 | } | ||
482 | |||
483 | static inline int get_dumpable(struct mm_struct *mm) | ||
484 | { | ||
485 | return __get_dumpable(mm->flags); | ||
486 | } | ||
487 | |||
488 | /* coredump filter bits */ | ||
489 | #define MMF_DUMP_ANON_PRIVATE 2 | ||
490 | #define MMF_DUMP_ANON_SHARED 3 | ||
491 | #define MMF_DUMP_MAPPED_PRIVATE 4 | ||
492 | #define MMF_DUMP_MAPPED_SHARED 5 | ||
493 | #define MMF_DUMP_ELF_HEADERS 6 | ||
494 | #define MMF_DUMP_HUGETLB_PRIVATE 7 | ||
495 | #define MMF_DUMP_HUGETLB_SHARED 8 | ||
496 | #define MMF_DUMP_DAX_PRIVATE 9 | ||
497 | #define MMF_DUMP_DAX_SHARED 10 | ||
498 | |||
499 | #define MMF_DUMP_FILTER_SHIFT MMF_DUMPABLE_BITS | ||
500 | #define MMF_DUMP_FILTER_BITS 9 | ||
501 | #define MMF_DUMP_FILTER_MASK \ | ||
502 | (((1 << MMF_DUMP_FILTER_BITS) - 1) << MMF_DUMP_FILTER_SHIFT) | ||
503 | #define MMF_DUMP_FILTER_DEFAULT \ | ||
504 | ((1 << MMF_DUMP_ANON_PRIVATE) | (1 << MMF_DUMP_ANON_SHARED) |\ | ||
505 | (1 << MMF_DUMP_HUGETLB_PRIVATE) | MMF_DUMP_MASK_DEFAULT_ELF) | ||
506 | |||
507 | #ifdef CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS | ||
508 | # define MMF_DUMP_MASK_DEFAULT_ELF (1 << MMF_DUMP_ELF_HEADERS) | ||
509 | #else | ||
510 | # define MMF_DUMP_MASK_DEFAULT_ELF 0 | ||
511 | #endif | ||
512 | /* leave room for more dump flags */ | ||
513 | #define MMF_VM_MERGEABLE 16 /* KSM may merge identical pages */ | ||
514 | #define MMF_VM_HUGEPAGE 17 /* set when VM_HUGEPAGE is set on vma */ | ||
515 | /* | ||
516 | * This one-shot flag is dropped due to necessity of changing exe once again | ||
517 | * on NFS restore | ||
518 | */ | ||
519 | //#define MMF_EXE_FILE_CHANGED 18 /* see prctl_set_mm_exe_file() */ | ||
520 | |||
521 | #define MMF_HAS_UPROBES 19 /* has uprobes */ | ||
522 | #define MMF_RECALC_UPROBES 20 /* MMF_HAS_UPROBES can be wrong */ | ||
523 | #define MMF_OOM_SKIP 21 /* mm is of no interest for the OOM killer */ | ||
524 | #define MMF_UNSTABLE 22 /* mm is unstable for copy_from_user */ | ||
525 | #define MMF_HUGE_ZERO_PAGE 23 /* mm has ever used the global huge zero page */ | ||
526 | |||
527 | #define MMF_INIT_MASK (MMF_DUMPABLE_MASK | MMF_DUMP_FILTER_MASK) | ||
528 | |||
529 | struct sighand_struct { | ||
530 | atomic_t count; | ||
531 | struct k_sigaction action[_NSIG]; | ||
532 | spinlock_t siglock; | ||
533 | wait_queue_head_t signalfd_wqh; | ||
534 | }; | ||
535 | |||
536 | struct pacct_struct { | ||
537 | int ac_flag; | ||
538 | long ac_exitcode; | ||
539 | unsigned long ac_mem; | ||
540 | u64 ac_utime, ac_stime; | ||
541 | unsigned long ac_minflt, ac_majflt; | ||
542 | }; | ||
543 | |||
544 | struct cpu_itimer { | ||
545 | u64 expires; | ||
546 | u64 incr; | ||
547 | }; | ||
548 | |||
549 | /** | 188 | /** |
550 | * struct prev_cputime - snaphsot of system and user cputime | 189 | * struct prev_cputime - snaphsot of system and user cputime |
551 | * @utime: time spent in user mode | 190 | * @utime: time spent in user mode |
@@ -557,20 +196,12 @@ struct cpu_itimer { | |||
557 | */ | 196 | */ |
558 | struct prev_cputime { | 197 | struct prev_cputime { |
559 | #ifndef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE | 198 | #ifndef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE |
560 | u64 utime; | 199 | u64 utime; |
561 | u64 stime; | 200 | u64 stime; |
562 | raw_spinlock_t lock; | 201 | raw_spinlock_t lock; |
563 | #endif | 202 | #endif |
564 | }; | 203 | }; |
565 | 204 | ||
566 | static inline void prev_cputime_init(struct prev_cputime *prev) | ||
567 | { | ||
568 | #ifndef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE | ||
569 | prev->utime = prev->stime = 0; | ||
570 | raw_spin_lock_init(&prev->lock); | ||
571 | #endif | ||
572 | } | ||
573 | |||
574 | /** | 205 | /** |
575 | * struct task_cputime - collected CPU time counts | 206 | * struct task_cputime - collected CPU time counts |
576 | * @utime: time spent in user mode, in nanoseconds | 207 | * @utime: time spent in user mode, in nanoseconds |
@@ -582,376 +213,35 @@ static inline void prev_cputime_init(struct prev_cputime *prev) | |||
582 | * these counts together and treat all three of them in parallel. | 213 | * these counts together and treat all three of them in parallel. |
583 | */ | 214 | */ |
584 | struct task_cputime { | 215 | struct task_cputime { |
585 | u64 utime; | 216 | u64 utime; |
586 | u64 stime; | 217 | u64 stime; |
587 | unsigned long long sum_exec_runtime; | 218 | unsigned long long sum_exec_runtime; |
588 | }; | 219 | }; |
589 | 220 | ||
590 | /* Alternate field names when used to cache expirations. */ | 221 | /* Alternate field names when used on cache expirations: */ |
591 | #define virt_exp utime | 222 | #define virt_exp utime |
592 | #define prof_exp stime | 223 | #define prof_exp stime |
593 | #define sched_exp sum_exec_runtime | 224 | #define sched_exp sum_exec_runtime |
594 | |||
595 | /* | ||
596 | * This is the atomic variant of task_cputime, which can be used for | ||
597 | * storing and updating task_cputime statistics without locking. | ||
598 | */ | ||
599 | struct task_cputime_atomic { | ||
600 | atomic64_t utime; | ||
601 | atomic64_t stime; | ||
602 | atomic64_t sum_exec_runtime; | ||
603 | }; | ||
604 | |||
605 | #define INIT_CPUTIME_ATOMIC \ | ||
606 | (struct task_cputime_atomic) { \ | ||
607 | .utime = ATOMIC64_INIT(0), \ | ||
608 | .stime = ATOMIC64_INIT(0), \ | ||
609 | .sum_exec_runtime = ATOMIC64_INIT(0), \ | ||
610 | } | ||
611 | |||
612 | #define PREEMPT_DISABLED (PREEMPT_DISABLE_OFFSET + PREEMPT_ENABLED) | ||
613 | |||
614 | /* | ||
615 | * Disable preemption until the scheduler is running -- use an unconditional | ||
616 | * value so that it also works on !PREEMPT_COUNT kernels. | ||
617 | * | ||
618 | * Reset by start_kernel()->sched_init()->init_idle()->init_idle_preempt_count(). | ||
619 | */ | ||
620 | #define INIT_PREEMPT_COUNT PREEMPT_OFFSET | ||
621 | |||
622 | /* | ||
623 | * Initial preempt_count value; reflects the preempt_count schedule invariant | ||
624 | * which states that during context switches: | ||
625 | * | ||
626 | * preempt_count() == 2*PREEMPT_DISABLE_OFFSET | ||
627 | * | ||
628 | * Note: PREEMPT_DISABLE_OFFSET is 0 for !PREEMPT_COUNT kernels. | ||
629 | * Note: See finish_task_switch(). | ||
630 | */ | ||
631 | #define FORK_PREEMPT_COUNT (2*PREEMPT_DISABLE_OFFSET + PREEMPT_ENABLED) | ||
632 | |||
633 | /** | ||
634 | * struct thread_group_cputimer - thread group interval timer counts | ||
635 | * @cputime_atomic: atomic thread group interval timers. | ||
636 | * @running: true when there are timers running and | ||
637 | * @cputime_atomic receives updates. | ||
638 | * @checking_timer: true when a thread in the group is in the | ||
639 | * process of checking for thread group timers. | ||
640 | * | ||
641 | * This structure contains the version of task_cputime, above, that is | ||
642 | * used for thread group CPU timer calculations. | ||
643 | */ | ||
644 | struct thread_group_cputimer { | ||
645 | struct task_cputime_atomic cputime_atomic; | ||
646 | bool running; | ||
647 | bool checking_timer; | ||
648 | }; | ||
649 | |||
650 | #include <linux/rwsem.h> | ||
651 | struct autogroup; | ||
652 | |||
653 | /* | ||
654 | * NOTE! "signal_struct" does not have its own | ||
655 | * locking, because a shared signal_struct always | ||
656 | * implies a shared sighand_struct, so locking | ||
657 | * sighand_struct is always a proper superset of | ||
658 | * the locking of signal_struct. | ||
659 | */ | ||
660 | struct signal_struct { | ||
661 | atomic_t sigcnt; | ||
662 | atomic_t live; | ||
663 | int nr_threads; | ||
664 | struct list_head thread_head; | ||
665 | |||
666 | wait_queue_head_t wait_chldexit; /* for wait4() */ | ||
667 | |||
668 | /* current thread group signal load-balancing target: */ | ||
669 | struct task_struct *curr_target; | ||
670 | |||
671 | /* shared signal handling: */ | ||
672 | struct sigpending shared_pending; | ||
673 | |||
674 | /* thread group exit support */ | ||
675 | int group_exit_code; | ||
676 | /* overloaded: | ||
677 | * - notify group_exit_task when ->count is equal to notify_count | ||
678 | * - everyone except group_exit_task is stopped during signal delivery | ||
679 | * of fatal signals, group_exit_task processes the signal. | ||
680 | */ | ||
681 | int notify_count; | ||
682 | struct task_struct *group_exit_task; | ||
683 | |||
684 | /* thread group stop support, overloads group_exit_code too */ | ||
685 | int group_stop_count; | ||
686 | unsigned int flags; /* see SIGNAL_* flags below */ | ||
687 | |||
688 | /* | ||
689 | * PR_SET_CHILD_SUBREAPER marks a process, like a service | ||
690 | * manager, to re-parent orphan (double-forking) child processes | ||
691 | * to this process instead of 'init'. The service manager is | ||
692 | * able to receive SIGCHLD signals and is able to investigate | ||
693 | * the process until it calls wait(). All children of this | ||
694 | * process will inherit a flag if they should look for a | ||
695 | * child_subreaper process at exit. | ||
696 | */ | ||
697 | unsigned int is_child_subreaper:1; | ||
698 | unsigned int has_child_subreaper:1; | ||
699 | |||
700 | #ifdef CONFIG_POSIX_TIMERS | ||
701 | |||
702 | /* POSIX.1b Interval Timers */ | ||
703 | int posix_timer_id; | ||
704 | struct list_head posix_timers; | ||
705 | |||
706 | /* ITIMER_REAL timer for the process */ | ||
707 | struct hrtimer real_timer; | ||
708 | ktime_t it_real_incr; | ||
709 | |||
710 | /* | ||
711 | * ITIMER_PROF and ITIMER_VIRTUAL timers for the process, we use | ||
712 | * CPUCLOCK_PROF and CPUCLOCK_VIRT for indexing array as these | ||
713 | * values are defined to 0 and 1 respectively | ||
714 | */ | ||
715 | struct cpu_itimer it[2]; | ||
716 | |||
717 | /* | ||
718 | * Thread group totals for process CPU timers. | ||
719 | * See thread_group_cputimer(), et al, for details. | ||
720 | */ | ||
721 | struct thread_group_cputimer cputimer; | ||
722 | |||
723 | /* Earliest-expiration cache. */ | ||
724 | struct task_cputime cputime_expires; | ||
725 | |||
726 | struct list_head cpu_timers[3]; | ||
727 | |||
728 | #endif | ||
729 | |||
730 | struct pid *leader_pid; | ||
731 | |||
732 | #ifdef CONFIG_NO_HZ_FULL | ||
733 | atomic_t tick_dep_mask; | ||
734 | #endif | ||
735 | |||
736 | struct pid *tty_old_pgrp; | ||
737 | |||
738 | /* boolean value for session group leader */ | ||
739 | int leader; | ||
740 | |||
741 | struct tty_struct *tty; /* NULL if no tty */ | ||
742 | |||
743 | #ifdef CONFIG_SCHED_AUTOGROUP | ||
744 | struct autogroup *autogroup; | ||
745 | #endif | ||
746 | /* | ||
747 | * Cumulative resource counters for dead threads in the group, | ||
748 | * and for reaped dead child processes forked by this group. | ||
749 | * Live threads maintain their own counters and add to these | ||
750 | * in __exit_signal, except for the group leader. | ||
751 | */ | ||
752 | seqlock_t stats_lock; | ||
753 | u64 utime, stime, cutime, cstime; | ||
754 | u64 gtime; | ||
755 | u64 cgtime; | ||
756 | struct prev_cputime prev_cputime; | ||
757 | unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; | ||
758 | unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt; | ||
759 | unsigned long inblock, oublock, cinblock, coublock; | ||
760 | unsigned long maxrss, cmaxrss; | ||
761 | struct task_io_accounting ioac; | ||
762 | |||
763 | /* | ||
764 | * Cumulative ns of schedule CPU time fo dead threads in the | ||
765 | * group, not including a zombie group leader, (This only differs | ||
766 | * from jiffies_to_ns(utime + stime) if sched_clock uses something | ||
767 | * other than jiffies.) | ||
768 | */ | ||
769 | unsigned long long sum_sched_runtime; | ||
770 | |||
771 | /* | ||
772 | * We don't bother to synchronize most readers of this at all, | ||
773 | * because there is no reader checking a limit that actually needs | ||
774 | * to get both rlim_cur and rlim_max atomically, and either one | ||
775 | * alone is a single word that can safely be read normally. | ||
776 | * getrlimit/setrlimit use task_lock(current->group_leader) to | ||
777 | * protect this instead of the siglock, because they really | ||
778 | * have no need to disable irqs. | ||
779 | */ | ||
780 | struct rlimit rlim[RLIM_NLIMITS]; | ||
781 | |||
782 | #ifdef CONFIG_BSD_PROCESS_ACCT | ||
783 | struct pacct_struct pacct; /* per-process accounting information */ | ||
784 | #endif | ||
785 | #ifdef CONFIG_TASKSTATS | ||
786 | struct taskstats *stats; | ||
787 | #endif | ||
788 | #ifdef CONFIG_AUDIT | ||
789 | unsigned audit_tty; | ||
790 | struct tty_audit_buf *tty_audit_buf; | ||
791 | #endif | ||
792 | |||
793 | /* | ||
794 | * Thread is the potential origin of an oom condition; kill first on | ||
795 | * oom | ||
796 | */ | ||
797 | bool oom_flag_origin; | ||
798 | short oom_score_adj; /* OOM kill score adjustment */ | ||
799 | short oom_score_adj_min; /* OOM kill score adjustment min value. | ||
800 | * Only settable by CAP_SYS_RESOURCE. */ | ||
801 | struct mm_struct *oom_mm; /* recorded mm when the thread group got | ||
802 | * killed by the oom killer */ | ||
803 | |||
804 | struct mutex cred_guard_mutex; /* guard against foreign influences on | ||
805 | * credential calculations | ||
806 | * (notably. ptrace) */ | ||
807 | }; | ||
808 | |||
809 | /* | ||
810 | * Bits in flags field of signal_struct. | ||
811 | */ | ||
812 | #define SIGNAL_STOP_STOPPED 0x00000001 /* job control stop in effect */ | ||
813 | #define SIGNAL_STOP_CONTINUED 0x00000002 /* SIGCONT since WCONTINUED reap */ | ||
814 | #define SIGNAL_GROUP_EXIT 0x00000004 /* group exit in progress */ | ||
815 | #define SIGNAL_GROUP_COREDUMP 0x00000008 /* coredump in progress */ | ||
816 | /* | ||
817 | * Pending notifications to parent. | ||
818 | */ | ||
819 | #define SIGNAL_CLD_STOPPED 0x00000010 | ||
820 | #define SIGNAL_CLD_CONTINUED 0x00000020 | ||
821 | #define SIGNAL_CLD_MASK (SIGNAL_CLD_STOPPED|SIGNAL_CLD_CONTINUED) | ||
822 | |||
823 | #define SIGNAL_UNKILLABLE 0x00000040 /* for init: ignore fatal signals */ | ||
824 | |||
825 | #define SIGNAL_STOP_MASK (SIGNAL_CLD_MASK | SIGNAL_STOP_STOPPED | \ | ||
826 | SIGNAL_STOP_CONTINUED) | ||
827 | |||
828 | static inline void signal_set_stop_flags(struct signal_struct *sig, | ||
829 | unsigned int flags) | ||
830 | { | ||
831 | WARN_ON(sig->flags & (SIGNAL_GROUP_EXIT|SIGNAL_GROUP_COREDUMP)); | ||
832 | sig->flags = (sig->flags & ~SIGNAL_STOP_MASK) | flags; | ||
833 | } | ||
834 | |||
835 | /* If true, all threads except ->group_exit_task have pending SIGKILL */ | ||
836 | static inline int signal_group_exit(const struct signal_struct *sig) | ||
837 | { | ||
838 | return (sig->flags & SIGNAL_GROUP_EXIT) || | ||
839 | (sig->group_exit_task != NULL); | ||
840 | } | ||
841 | |||
842 | /* | ||
843 | * Some day this will be a full-fledged user tracking system.. | ||
844 | */ | ||
845 | struct user_struct { | ||
846 | atomic_t __count; /* reference count */ | ||
847 | atomic_t processes; /* How many processes does this user have? */ | ||
848 | atomic_t sigpending; /* How many pending signals does this user have? */ | ||
849 | #ifdef CONFIG_FANOTIFY | ||
850 | atomic_t fanotify_listeners; | ||
851 | #endif | ||
852 | #ifdef CONFIG_EPOLL | ||
853 | atomic_long_t epoll_watches; /* The number of file descriptors currently watched */ | ||
854 | #endif | ||
855 | #ifdef CONFIG_POSIX_MQUEUE | ||
856 | /* protected by mq_lock */ | ||
857 | unsigned long mq_bytes; /* How many bytes can be allocated to mqueue? */ | ||
858 | #endif | ||
859 | unsigned long locked_shm; /* How many pages of mlocked shm ? */ | ||
860 | unsigned long unix_inflight; /* How many files in flight in unix sockets */ | ||
861 | atomic_long_t pipe_bufs; /* how many pages are allocated in pipe buffers */ | ||
862 | |||
863 | #ifdef CONFIG_KEYS | ||
864 | struct key *uid_keyring; /* UID specific keyring */ | ||
865 | struct key *session_keyring; /* UID's default session keyring */ | ||
866 | #endif | ||
867 | |||
868 | /* Hash table maintenance information */ | ||
869 | struct hlist_node uidhash_node; | ||
870 | kuid_t uid; | ||
871 | |||
872 | #if defined(CONFIG_PERF_EVENTS) || defined(CONFIG_BPF_SYSCALL) | ||
873 | atomic_long_t locked_vm; | ||
874 | #endif | ||
875 | }; | ||
876 | |||
877 | extern int uids_sysfs_init(void); | ||
878 | |||
879 | extern struct user_struct *find_user(kuid_t); | ||
880 | |||
881 | extern struct user_struct root_user; | ||
882 | #define INIT_USER (&root_user) | ||
883 | |||
884 | |||
885 | struct backing_dev_info; | ||
886 | struct reclaim_state; | ||
887 | 225 | ||
888 | #ifdef CONFIG_SCHED_INFO | ||
889 | struct sched_info { | 226 | struct sched_info { |
890 | /* cumulative counters */ | 227 | #ifdef CONFIG_SCHED_INFO |
891 | unsigned long pcount; /* # of times run on this cpu */ | 228 | /* Cumulative counters: */ |
892 | unsigned long long run_delay; /* time spent waiting on a runqueue */ | ||
893 | 229 | ||
894 | /* timestamps */ | 230 | /* # of times we have run on this CPU: */ |
895 | unsigned long long last_arrival,/* when we last ran on a cpu */ | 231 | unsigned long pcount; |
896 | last_queued; /* when we were last queued to run */ | ||
897 | }; | ||
898 | #endif /* CONFIG_SCHED_INFO */ | ||
899 | 232 | ||
900 | #ifdef CONFIG_TASK_DELAY_ACCT | 233 | /* Time spent waiting on a runqueue: */ |
901 | struct task_delay_info { | 234 | unsigned long long run_delay; |
902 | spinlock_t lock; | ||
903 | unsigned int flags; /* Private per-task flags */ | ||
904 | 235 | ||
905 | /* For each stat XXX, add following, aligned appropriately | 236 | /* Timestamps: */ |
906 | * | ||
907 | * struct timespec XXX_start, XXX_end; | ||
908 | * u64 XXX_delay; | ||
909 | * u32 XXX_count; | ||
910 | * | ||
911 | * Atomicity of updates to XXX_delay, XXX_count protected by | ||
912 | * single lock above (split into XXX_lock if contention is an issue). | ||
913 | */ | ||
914 | 237 | ||
915 | /* | 238 | /* When did we last run on a CPU? */ |
916 | * XXX_count is incremented on every XXX operation, the delay | 239 | unsigned long long last_arrival; |
917 | * associated with the operation is added to XXX_delay. | ||
918 | * XXX_delay contains the accumulated delay time in nanoseconds. | ||
919 | */ | ||
920 | u64 blkio_start; /* Shared by blkio, swapin */ | ||
921 | u64 blkio_delay; /* wait for sync block io completion */ | ||
922 | u64 swapin_delay; /* wait for swapin block io completion */ | ||
923 | u32 blkio_count; /* total count of the number of sync block */ | ||
924 | /* io operations performed */ | ||
925 | u32 swapin_count; /* total count of the number of swapin block */ | ||
926 | /* io operations performed */ | ||
927 | |||
928 | u64 freepages_start; | ||
929 | u64 freepages_delay; /* wait for memory reclaim */ | ||
930 | u32 freepages_count; /* total count of memory reclaim */ | ||
931 | }; | ||
932 | #endif /* CONFIG_TASK_DELAY_ACCT */ | ||
933 | 240 | ||
934 | static inline int sched_info_on(void) | 241 | /* When were we last queued to run? */ |
935 | { | 242 | unsigned long long last_queued; |
936 | #ifdef CONFIG_SCHEDSTATS | ||
937 | return 1; | ||
938 | #elif defined(CONFIG_TASK_DELAY_ACCT) | ||
939 | extern int delayacct_on; | ||
940 | return delayacct_on; | ||
941 | #else | ||
942 | return 0; | ||
943 | #endif | ||
944 | } | ||
945 | |||
946 | #ifdef CONFIG_SCHEDSTATS | ||
947 | void force_schedstat_enabled(void); | ||
948 | #endif | ||
949 | 243 | ||
950 | enum cpu_idle_type { | 244 | #endif /* CONFIG_SCHED_INFO */ |
951 | CPU_IDLE, | ||
952 | CPU_NOT_IDLE, | ||
953 | CPU_NEWLY_IDLE, | ||
954 | CPU_MAX_IDLE_TYPES | ||
955 | }; | 245 | }; |
956 | 246 | ||
957 | /* | 247 | /* |
@@ -961,290 +251,12 @@ enum cpu_idle_type { | |||
961 | * We define a basic fixed point arithmetic range, and then formalize | 251 | * We define a basic fixed point arithmetic range, and then formalize |
962 | * all these metrics based on that basic range. | 252 | * all these metrics based on that basic range. |
963 | */ | 253 | */ |
964 | # define SCHED_FIXEDPOINT_SHIFT 10 | 254 | # define SCHED_FIXEDPOINT_SHIFT 10 |
965 | # define SCHED_FIXEDPOINT_SCALE (1L << SCHED_FIXEDPOINT_SHIFT) | 255 | # define SCHED_FIXEDPOINT_SCALE (1L << SCHED_FIXEDPOINT_SHIFT) |
966 | |||
967 | /* | ||
968 | * Increase resolution of cpu_capacity calculations | ||
969 | */ | ||
970 | #define SCHED_CAPACITY_SHIFT SCHED_FIXEDPOINT_SHIFT | ||
971 | #define SCHED_CAPACITY_SCALE (1L << SCHED_CAPACITY_SHIFT) | ||
972 | |||
973 | /* | ||
974 | * Wake-queues are lists of tasks with a pending wakeup, whose | ||
975 | * callers have already marked the task as woken internally, | ||
976 | * and can thus carry on. A common use case is being able to | ||
977 | * do the wakeups once the corresponding user lock as been | ||
978 | * released. | ||
979 | * | ||
980 | * We hold reference to each task in the list across the wakeup, | ||
981 | * thus guaranteeing that the memory is still valid by the time | ||
982 | * the actual wakeups are performed in wake_up_q(). | ||
983 | * | ||
984 | * One per task suffices, because there's never a need for a task to be | ||
985 | * in two wake queues simultaneously; it is forbidden to abandon a task | ||
986 | * in a wake queue (a call to wake_up_q() _must_ follow), so if a task is | ||
987 | * already in a wake queue, the wakeup will happen soon and the second | ||
988 | * waker can just skip it. | ||
989 | * | ||
990 | * The DEFINE_WAKE_Q macro declares and initializes the list head. | ||
991 | * wake_up_q() does NOT reinitialize the list; it's expected to be | ||
992 | * called near the end of a function. Otherwise, the list can be | ||
993 | * re-initialized for later re-use by wake_q_init(). | ||
994 | * | ||
995 | * Note that this can cause spurious wakeups. schedule() callers | ||
996 | * must ensure the call is done inside a loop, confirming that the | ||
997 | * wakeup condition has in fact occurred. | ||
998 | */ | ||
999 | struct wake_q_node { | ||
1000 | struct wake_q_node *next; | ||
1001 | }; | ||
1002 | |||
1003 | struct wake_q_head { | ||
1004 | struct wake_q_node *first; | ||
1005 | struct wake_q_node **lastp; | ||
1006 | }; | ||
1007 | |||
1008 | #define WAKE_Q_TAIL ((struct wake_q_node *) 0x01) | ||
1009 | |||
1010 | #define DEFINE_WAKE_Q(name) \ | ||
1011 | struct wake_q_head name = { WAKE_Q_TAIL, &name.first } | ||
1012 | |||
1013 | static inline void wake_q_init(struct wake_q_head *head) | ||
1014 | { | ||
1015 | head->first = WAKE_Q_TAIL; | ||
1016 | head->lastp = &head->first; | ||
1017 | } | ||
1018 | |||
1019 | extern void wake_q_add(struct wake_q_head *head, | ||
1020 | struct task_struct *task); | ||
1021 | extern void wake_up_q(struct wake_q_head *head); | ||
1022 | |||
1023 | /* | ||
1024 | * sched-domains (multiprocessor balancing) declarations: | ||
1025 | */ | ||
1026 | #ifdef CONFIG_SMP | ||
1027 | #define SD_LOAD_BALANCE 0x0001 /* Do load balancing on this domain. */ | ||
1028 | #define SD_BALANCE_NEWIDLE 0x0002 /* Balance when about to become idle */ | ||
1029 | #define SD_BALANCE_EXEC 0x0004 /* Balance on exec */ | ||
1030 | #define SD_BALANCE_FORK 0x0008 /* Balance on fork, clone */ | ||
1031 | #define SD_BALANCE_WAKE 0x0010 /* Balance on wakeup */ | ||
1032 | #define SD_WAKE_AFFINE 0x0020 /* Wake task to waking CPU */ | ||
1033 | #define SD_ASYM_CPUCAPACITY 0x0040 /* Groups have different max cpu capacities */ | ||
1034 | #define SD_SHARE_CPUCAPACITY 0x0080 /* Domain members share cpu capacity */ | ||
1035 | #define SD_SHARE_POWERDOMAIN 0x0100 /* Domain members share power domain */ | ||
1036 | #define SD_SHARE_PKG_RESOURCES 0x0200 /* Domain members share cpu pkg resources */ | ||
1037 | #define SD_SERIALIZE 0x0400 /* Only a single load balancing instance */ | ||
1038 | #define SD_ASYM_PACKING 0x0800 /* Place busy groups earlier in the domain */ | ||
1039 | #define SD_PREFER_SIBLING 0x1000 /* Prefer to place tasks in a sibling domain */ | ||
1040 | #define SD_OVERLAP 0x2000 /* sched_domains of this level overlap */ | ||
1041 | #define SD_NUMA 0x4000 /* cross-node balancing */ | ||
1042 | |||
1043 | #ifdef CONFIG_SCHED_SMT | ||
1044 | static inline int cpu_smt_flags(void) | ||
1045 | { | ||
1046 | return SD_SHARE_CPUCAPACITY | SD_SHARE_PKG_RESOURCES; | ||
1047 | } | ||
1048 | #endif | ||
1049 | |||
1050 | #ifdef CONFIG_SCHED_MC | ||
1051 | static inline int cpu_core_flags(void) | ||
1052 | { | ||
1053 | return SD_SHARE_PKG_RESOURCES; | ||
1054 | } | ||
1055 | #endif | ||
1056 | |||
1057 | #ifdef CONFIG_NUMA | ||
1058 | static inline int cpu_numa_flags(void) | ||
1059 | { | ||
1060 | return SD_NUMA; | ||
1061 | } | ||
1062 | #endif | ||
1063 | |||
1064 | extern int arch_asym_cpu_priority(int cpu); | ||
1065 | |||
1066 | struct sched_domain_attr { | ||
1067 | int relax_domain_level; | ||
1068 | }; | ||
1069 | |||
1070 | #define SD_ATTR_INIT (struct sched_domain_attr) { \ | ||
1071 | .relax_domain_level = -1, \ | ||
1072 | } | ||
1073 | |||
1074 | extern int sched_domain_level_max; | ||
1075 | |||
1076 | struct sched_group; | ||
1077 | |||
1078 | struct sched_domain_shared { | ||
1079 | atomic_t ref; | ||
1080 | atomic_t nr_busy_cpus; | ||
1081 | int has_idle_cores; | ||
1082 | }; | ||
1083 | |||
1084 | struct sched_domain { | ||
1085 | /* These fields must be setup */ | ||
1086 | struct sched_domain *parent; /* top domain must be null terminated */ | ||
1087 | struct sched_domain *child; /* bottom domain must be null terminated */ | ||
1088 | struct sched_group *groups; /* the balancing groups of the domain */ | ||
1089 | unsigned long min_interval; /* Minimum balance interval ms */ | ||
1090 | unsigned long max_interval; /* Maximum balance interval ms */ | ||
1091 | unsigned int busy_factor; /* less balancing by factor if busy */ | ||
1092 | unsigned int imbalance_pct; /* No balance until over watermark */ | ||
1093 | unsigned int cache_nice_tries; /* Leave cache hot tasks for # tries */ | ||
1094 | unsigned int busy_idx; | ||
1095 | unsigned int idle_idx; | ||
1096 | unsigned int newidle_idx; | ||
1097 | unsigned int wake_idx; | ||
1098 | unsigned int forkexec_idx; | ||
1099 | unsigned int smt_gain; | ||
1100 | |||
1101 | int nohz_idle; /* NOHZ IDLE status */ | ||
1102 | int flags; /* See SD_* */ | ||
1103 | int level; | ||
1104 | |||
1105 | /* Runtime fields. */ | ||
1106 | unsigned long last_balance; /* init to jiffies. units in jiffies */ | ||
1107 | unsigned int balance_interval; /* initialise to 1. units in ms. */ | ||
1108 | unsigned int nr_balance_failed; /* initialise to 0 */ | ||
1109 | |||
1110 | /* idle_balance() stats */ | ||
1111 | u64 max_newidle_lb_cost; | ||
1112 | unsigned long next_decay_max_lb_cost; | ||
1113 | |||
1114 | u64 avg_scan_cost; /* select_idle_sibling */ | ||
1115 | |||
1116 | #ifdef CONFIG_SCHEDSTATS | ||
1117 | /* load_balance() stats */ | ||
1118 | unsigned int lb_count[CPU_MAX_IDLE_TYPES]; | ||
1119 | unsigned int lb_failed[CPU_MAX_IDLE_TYPES]; | ||
1120 | unsigned int lb_balanced[CPU_MAX_IDLE_TYPES]; | ||
1121 | unsigned int lb_imbalance[CPU_MAX_IDLE_TYPES]; | ||
1122 | unsigned int lb_gained[CPU_MAX_IDLE_TYPES]; | ||
1123 | unsigned int lb_hot_gained[CPU_MAX_IDLE_TYPES]; | ||
1124 | unsigned int lb_nobusyg[CPU_MAX_IDLE_TYPES]; | ||
1125 | unsigned int lb_nobusyq[CPU_MAX_IDLE_TYPES]; | ||
1126 | |||
1127 | /* Active load balancing */ | ||
1128 | unsigned int alb_count; | ||
1129 | unsigned int alb_failed; | ||
1130 | unsigned int alb_pushed; | ||
1131 | |||
1132 | /* SD_BALANCE_EXEC stats */ | ||
1133 | unsigned int sbe_count; | ||
1134 | unsigned int sbe_balanced; | ||
1135 | unsigned int sbe_pushed; | ||
1136 | |||
1137 | /* SD_BALANCE_FORK stats */ | ||
1138 | unsigned int sbf_count; | ||
1139 | unsigned int sbf_balanced; | ||
1140 | unsigned int sbf_pushed; | ||
1141 | |||
1142 | /* try_to_wake_up() stats */ | ||
1143 | unsigned int ttwu_wake_remote; | ||
1144 | unsigned int ttwu_move_affine; | ||
1145 | unsigned int ttwu_move_balance; | ||
1146 | #endif | ||
1147 | #ifdef CONFIG_SCHED_DEBUG | ||
1148 | char *name; | ||
1149 | #endif | ||
1150 | union { | ||
1151 | void *private; /* used during construction */ | ||
1152 | struct rcu_head rcu; /* used during destruction */ | ||
1153 | }; | ||
1154 | struct sched_domain_shared *shared; | ||
1155 | |||
1156 | unsigned int span_weight; | ||
1157 | /* | ||
1158 | * Span of all CPUs in this domain. | ||
1159 | * | ||
1160 | * NOTE: this field is variable length. (Allocated dynamically | ||
1161 | * by attaching extra space to the end of the structure, | ||
1162 | * depending on how many CPUs the kernel has booted up with) | ||
1163 | */ | ||
1164 | unsigned long span[0]; | ||
1165 | }; | ||
1166 | |||
1167 | static inline struct cpumask *sched_domain_span(struct sched_domain *sd) | ||
1168 | { | ||
1169 | return to_cpumask(sd->span); | ||
1170 | } | ||
1171 | |||
1172 | extern void partition_sched_domains(int ndoms_new, cpumask_var_t doms_new[], | ||
1173 | struct sched_domain_attr *dattr_new); | ||
1174 | |||
1175 | /* Allocate an array of sched domains, for partition_sched_domains(). */ | ||
1176 | cpumask_var_t *alloc_sched_domains(unsigned int ndoms); | ||
1177 | void free_sched_domains(cpumask_var_t doms[], unsigned int ndoms); | ||
1178 | |||
1179 | bool cpus_share_cache(int this_cpu, int that_cpu); | ||
1180 | |||
1181 | typedef const struct cpumask *(*sched_domain_mask_f)(int cpu); | ||
1182 | typedef int (*sched_domain_flags_f)(void); | ||
1183 | |||
1184 | #define SDTL_OVERLAP 0x01 | ||
1185 | |||
1186 | struct sd_data { | ||
1187 | struct sched_domain **__percpu sd; | ||
1188 | struct sched_domain_shared **__percpu sds; | ||
1189 | struct sched_group **__percpu sg; | ||
1190 | struct sched_group_capacity **__percpu sgc; | ||
1191 | }; | ||
1192 | |||
1193 | struct sched_domain_topology_level { | ||
1194 | sched_domain_mask_f mask; | ||
1195 | sched_domain_flags_f sd_flags; | ||
1196 | int flags; | ||
1197 | int numa_level; | ||
1198 | struct sd_data data; | ||
1199 | #ifdef CONFIG_SCHED_DEBUG | ||
1200 | char *name; | ||
1201 | #endif | ||
1202 | }; | ||
1203 | |||
1204 | extern void set_sched_topology(struct sched_domain_topology_level *tl); | ||
1205 | extern void wake_up_if_idle(int cpu); | ||
1206 | |||
1207 | #ifdef CONFIG_SCHED_DEBUG | ||
1208 | # define SD_INIT_NAME(type) .name = #type | ||
1209 | #else | ||
1210 | # define SD_INIT_NAME(type) | ||
1211 | #endif | ||
1212 | |||
1213 | #else /* CONFIG_SMP */ | ||
1214 | |||
1215 | struct sched_domain_attr; | ||
1216 | |||
1217 | static inline void | ||
1218 | partition_sched_domains(int ndoms_new, cpumask_var_t doms_new[], | ||
1219 | struct sched_domain_attr *dattr_new) | ||
1220 | { | ||
1221 | } | ||
1222 | |||
1223 | static inline bool cpus_share_cache(int this_cpu, int that_cpu) | ||
1224 | { | ||
1225 | return true; | ||
1226 | } | ||
1227 | |||
1228 | #endif /* !CONFIG_SMP */ | ||
1229 | |||
1230 | |||
1231 | struct io_context; /* See blkdev.h */ | ||
1232 | |||
1233 | |||
1234 | #ifdef ARCH_HAS_PREFETCH_SWITCH_STACK | ||
1235 | extern void prefetch_stack(struct task_struct *t); | ||
1236 | #else | ||
1237 | static inline void prefetch_stack(struct task_struct *t) { } | ||
1238 | #endif | ||
1239 | |||
1240 | struct audit_context; /* See audit.c */ | ||
1241 | struct mempolicy; | ||
1242 | struct pipe_inode_info; | ||
1243 | struct uts_namespace; | ||
1244 | 256 | ||
1245 | struct load_weight { | 257 | struct load_weight { |
1246 | unsigned long weight; | 258 | unsigned long weight; |
1247 | u32 inv_weight; | 259 | u32 inv_weight; |
1248 | }; | 260 | }; |
1249 | 261 | ||
1250 | /* | 262 | /* |
@@ -1300,71 +312,73 @@ struct load_weight { | |||
1300 | * issues. | 312 | * issues. |
1301 | */ | 313 | */ |
1302 | struct sched_avg { | 314 | struct sched_avg { |
1303 | u64 last_update_time, load_sum; | 315 | u64 last_update_time; |
1304 | u32 util_sum, period_contrib; | 316 | u64 load_sum; |
1305 | unsigned long load_avg, util_avg; | 317 | u32 util_sum; |
318 | u32 period_contrib; | ||
319 | unsigned long load_avg; | ||
320 | unsigned long util_avg; | ||
1306 | }; | 321 | }; |
1307 | 322 | ||
1308 | #ifdef CONFIG_SCHEDSTATS | ||
1309 | struct sched_statistics { | 323 | struct sched_statistics { |
1310 | u64 wait_start; | 324 | #ifdef CONFIG_SCHEDSTATS |
1311 | u64 wait_max; | 325 | u64 wait_start; |
1312 | u64 wait_count; | 326 | u64 wait_max; |
1313 | u64 wait_sum; | 327 | u64 wait_count; |
1314 | u64 iowait_count; | 328 | u64 wait_sum; |
1315 | u64 iowait_sum; | 329 | u64 iowait_count; |
1316 | 330 | u64 iowait_sum; | |
1317 | u64 sleep_start; | 331 | |
1318 | u64 sleep_max; | 332 | u64 sleep_start; |
1319 | s64 sum_sleep_runtime; | 333 | u64 sleep_max; |
1320 | 334 | s64 sum_sleep_runtime; | |
1321 | u64 block_start; | 335 | |
1322 | u64 block_max; | 336 | u64 block_start; |
1323 | u64 exec_max; | 337 | u64 block_max; |
1324 | u64 slice_max; | 338 | u64 exec_max; |
1325 | 339 | u64 slice_max; | |
1326 | u64 nr_migrations_cold; | 340 | |
1327 | u64 nr_failed_migrations_affine; | 341 | u64 nr_migrations_cold; |
1328 | u64 nr_failed_migrations_running; | 342 | u64 nr_failed_migrations_affine; |
1329 | u64 nr_failed_migrations_hot; | 343 | u64 nr_failed_migrations_running; |
1330 | u64 nr_forced_migrations; | 344 | u64 nr_failed_migrations_hot; |
1331 | 345 | u64 nr_forced_migrations; | |
1332 | u64 nr_wakeups; | 346 | |
1333 | u64 nr_wakeups_sync; | 347 | u64 nr_wakeups; |
1334 | u64 nr_wakeups_migrate; | 348 | u64 nr_wakeups_sync; |
1335 | u64 nr_wakeups_local; | 349 | u64 nr_wakeups_migrate; |
1336 | u64 nr_wakeups_remote; | 350 | u64 nr_wakeups_local; |
1337 | u64 nr_wakeups_affine; | 351 | u64 nr_wakeups_remote; |
1338 | u64 nr_wakeups_affine_attempts; | 352 | u64 nr_wakeups_affine; |
1339 | u64 nr_wakeups_passive; | 353 | u64 nr_wakeups_affine_attempts; |
1340 | u64 nr_wakeups_idle; | 354 | u64 nr_wakeups_passive; |
1341 | }; | 355 | u64 nr_wakeups_idle; |
1342 | #endif | 356 | #endif |
357 | }; | ||
1343 | 358 | ||
1344 | struct sched_entity { | 359 | struct sched_entity { |
1345 | struct load_weight load; /* for load-balancing */ | 360 | /* For load-balancing: */ |
1346 | struct rb_node run_node; | 361 | struct load_weight load; |
1347 | struct list_head group_node; | 362 | struct rb_node run_node; |
1348 | unsigned int on_rq; | 363 | struct list_head group_node; |
364 | unsigned int on_rq; | ||
1349 | 365 | ||
1350 | u64 exec_start; | 366 | u64 exec_start; |
1351 | u64 sum_exec_runtime; | 367 | u64 sum_exec_runtime; |
1352 | u64 vruntime; | 368 | u64 vruntime; |
1353 | u64 prev_sum_exec_runtime; | 369 | u64 prev_sum_exec_runtime; |
1354 | 370 | ||
1355 | u64 nr_migrations; | 371 | u64 nr_migrations; |
1356 | 372 | ||
1357 | #ifdef CONFIG_SCHEDSTATS | 373 | struct sched_statistics statistics; |
1358 | struct sched_statistics statistics; | ||
1359 | #endif | ||
1360 | 374 | ||
1361 | #ifdef CONFIG_FAIR_GROUP_SCHED | 375 | #ifdef CONFIG_FAIR_GROUP_SCHED |
1362 | int depth; | 376 | int depth; |
1363 | struct sched_entity *parent; | 377 | struct sched_entity *parent; |
1364 | /* rq on which this entity is (to be) queued: */ | 378 | /* rq on which this entity is (to be) queued: */ |
1365 | struct cfs_rq *cfs_rq; | 379 | struct cfs_rq *cfs_rq; |
1366 | /* rq "owned" by this entity/group: */ | 380 | /* rq "owned" by this entity/group: */ |
1367 | struct cfs_rq *my_q; | 381 | struct cfs_rq *my_q; |
1368 | #endif | 382 | #endif |
1369 | 383 | ||
1370 | #ifdef CONFIG_SMP | 384 | #ifdef CONFIG_SMP |
@@ -1374,49 +388,49 @@ struct sched_entity { | |||
1374 | * Put into separate cache line so it does not | 388 | * Put into separate cache line so it does not |
1375 | * collide with read-mostly values above. | 389 | * collide with read-mostly values above. |
1376 | */ | 390 | */ |
1377 | struct sched_avg avg ____cacheline_aligned_in_smp; | 391 | struct sched_avg avg ____cacheline_aligned_in_smp; |
1378 | #endif | 392 | #endif |
1379 | }; | 393 | }; |
1380 | 394 | ||
1381 | struct sched_rt_entity { | 395 | struct sched_rt_entity { |
1382 | struct list_head run_list; | 396 | struct list_head run_list; |
1383 | unsigned long timeout; | 397 | unsigned long timeout; |
1384 | unsigned long watchdog_stamp; | 398 | unsigned long watchdog_stamp; |
1385 | unsigned int time_slice; | 399 | unsigned int time_slice; |
1386 | unsigned short on_rq; | 400 | unsigned short on_rq; |
1387 | unsigned short on_list; | 401 | unsigned short on_list; |
1388 | 402 | ||
1389 | struct sched_rt_entity *back; | 403 | struct sched_rt_entity *back; |
1390 | #ifdef CONFIG_RT_GROUP_SCHED | 404 | #ifdef CONFIG_RT_GROUP_SCHED |
1391 | struct sched_rt_entity *parent; | 405 | struct sched_rt_entity *parent; |
1392 | /* rq on which this entity is (to be) queued: */ | 406 | /* rq on which this entity is (to be) queued: */ |
1393 | struct rt_rq *rt_rq; | 407 | struct rt_rq *rt_rq; |
1394 | /* rq "owned" by this entity/group: */ | 408 | /* rq "owned" by this entity/group: */ |
1395 | struct rt_rq *my_q; | 409 | struct rt_rq *my_q; |
1396 | #endif | 410 | #endif |
1397 | }; | 411 | }; |
1398 | 412 | ||
1399 | struct sched_dl_entity { | 413 | struct sched_dl_entity { |
1400 | struct rb_node rb_node; | 414 | struct rb_node rb_node; |
1401 | 415 | ||
1402 | /* | 416 | /* |
1403 | * Original scheduling parameters. Copied here from sched_attr | 417 | * Original scheduling parameters. Copied here from sched_attr |
1404 | * during sched_setattr(), they will remain the same until | 418 | * during sched_setattr(), they will remain the same until |
1405 | * the next sched_setattr(). | 419 | * the next sched_setattr(). |
1406 | */ | 420 | */ |
1407 | u64 dl_runtime; /* maximum runtime for each instance */ | 421 | u64 dl_runtime; /* Maximum runtime for each instance */ |
1408 | u64 dl_deadline; /* relative deadline of each instance */ | 422 | u64 dl_deadline; /* Relative deadline of each instance */ |
1409 | u64 dl_period; /* separation of two instances (period) */ | 423 | u64 dl_period; /* Separation of two instances (period) */ |
1410 | u64 dl_bw; /* dl_runtime / dl_deadline */ | 424 | u64 dl_bw; /* dl_runtime / dl_deadline */ |
1411 | 425 | ||
1412 | /* | 426 | /* |
1413 | * Actual scheduling parameters. Initialized with the values above, | 427 | * Actual scheduling parameters. Initialized with the values above, |
1414 | * they are continously updated during task execution. Note that | 428 | * they are continously updated during task execution. Note that |
1415 | * the remaining runtime could be < 0 in case we are in overrun. | 429 | * the remaining runtime could be < 0 in case we are in overrun. |
1416 | */ | 430 | */ |
1417 | s64 runtime; /* remaining runtime for this instance */ | 431 | s64 runtime; /* Remaining runtime for this instance */ |
1418 | u64 deadline; /* absolute deadline for this instance */ | 432 | u64 deadline; /* Absolute deadline for this instance */ |
1419 | unsigned int flags; /* specifying the scheduler behaviour */ | 433 | unsigned int flags; /* Specifying the scheduler behaviour */ |
1420 | 434 | ||
1421 | /* | 435 | /* |
1422 | * Some bool flags: | 436 | * Some bool flags: |
@@ -1429,28 +443,31 @@ struct sched_dl_entity { | |||
1429 | * outside bandwidth enforcement mechanism (but only until we | 443 | * outside bandwidth enforcement mechanism (but only until we |
1430 | * exit the critical section); | 444 | * exit the critical section); |
1431 | * | 445 | * |
1432 | * @dl_yielded tells if task gave up the cpu before consuming | 446 | * @dl_yielded tells if task gave up the CPU before consuming |
1433 | * all its available runtime during the last job. | 447 | * all its available runtime during the last job. |
1434 | */ | 448 | */ |
1435 | int dl_throttled, dl_boosted, dl_yielded; | 449 | int dl_throttled; |
450 | int dl_boosted; | ||
451 | int dl_yielded; | ||
1436 | 452 | ||
1437 | /* | 453 | /* |
1438 | * Bandwidth enforcement timer. Each -deadline task has its | 454 | * Bandwidth enforcement timer. Each -deadline task has its |
1439 | * own bandwidth to be enforced, thus we need one timer per task. | 455 | * own bandwidth to be enforced, thus we need one timer per task. |
1440 | */ | 456 | */ |
1441 | struct hrtimer dl_timer; | 457 | struct hrtimer dl_timer; |
1442 | }; | 458 | }; |
1443 | 459 | ||
1444 | union rcu_special { | 460 | union rcu_special { |
1445 | struct { | 461 | struct { |
1446 | u8 blocked; | 462 | u8 blocked; |
1447 | u8 need_qs; | 463 | u8 need_qs; |
1448 | u8 exp_need_qs; | 464 | u8 exp_need_qs; |
1449 | u8 pad; /* Otherwise the compiler can store garbage here. */ | 465 | |
466 | /* Otherwise the compiler can store garbage here: */ | ||
467 | u8 pad; | ||
1450 | } b; /* Bits. */ | 468 | } b; /* Bits. */ |
1451 | u32 s; /* Set of bits. */ | 469 | u32 s; /* Set of bits. */ |
1452 | }; | 470 | }; |
1453 | struct rcu_node; | ||
1454 | 471 | ||
1455 | enum perf_event_task_context { | 472 | enum perf_event_task_context { |
1456 | perf_invalid_context = -1, | 473 | perf_invalid_context = -1, |
@@ -1459,23 +476,8 @@ enum perf_event_task_context { | |||
1459 | perf_nr_task_contexts, | 476 | perf_nr_task_contexts, |
1460 | }; | 477 | }; |
1461 | 478 | ||
1462 | /* Track pages that require TLB flushes */ | 479 | struct wake_q_node { |
1463 | struct tlbflush_unmap_batch { | 480 | struct wake_q_node *next; |
1464 | /* | ||
1465 | * Each bit set is a CPU that potentially has a TLB entry for one of | ||
1466 | * the PFNs being flushed. See set_tlb_ubc_flush_pending(). | ||
1467 | */ | ||
1468 | struct cpumask cpumask; | ||
1469 | |||
1470 | /* True if any bit in cpumask is set */ | ||
1471 | bool flush_required; | ||
1472 | |||
1473 | /* | ||
1474 | * If true then the PTE was dirty when unmapped. The entry must be | ||
1475 | * flushed before IO is initiated or a stale TLB entry potentially | ||
1476 | * allows an update without redirtying the page. | ||
1477 | */ | ||
1478 | bool writable; | ||
1479 | }; | 481 | }; |
1480 | 482 | ||
1481 | struct task_struct { | 483 | struct task_struct { |
@@ -1484,362 +486,417 @@ struct task_struct { | |||
1484 | * For reasons of header soup (see current_thread_info()), this | 486 | * For reasons of header soup (see current_thread_info()), this |
1485 | * must be the first element of task_struct. | 487 | * must be the first element of task_struct. |
1486 | */ | 488 | */ |
1487 | struct thread_info thread_info; | 489 | struct thread_info thread_info; |
1488 | #endif | 490 | #endif |
1489 | volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ | 491 | /* -1 unrunnable, 0 runnable, >0 stopped: */ |
1490 | void *stack; | 492 | volatile long state; |
1491 | atomic_t usage; | 493 | void *stack; |
1492 | unsigned int flags; /* per process flags, defined below */ | 494 | atomic_t usage; |
1493 | unsigned int ptrace; | 495 | /* Per task flags (PF_*), defined further below: */ |
496 | unsigned int flags; | ||
497 | unsigned int ptrace; | ||
1494 | 498 | ||
1495 | #ifdef CONFIG_SMP | 499 | #ifdef CONFIG_SMP |
1496 | struct llist_node wake_entry; | 500 | struct llist_node wake_entry; |
1497 | int on_cpu; | 501 | int on_cpu; |
1498 | #ifdef CONFIG_THREAD_INFO_IN_TASK | 502 | #ifdef CONFIG_THREAD_INFO_IN_TASK |
1499 | unsigned int cpu; /* current CPU */ | 503 | /* Current CPU: */ |
504 | unsigned int cpu; | ||
1500 | #endif | 505 | #endif |
1501 | unsigned int wakee_flips; | 506 | unsigned int wakee_flips; |
1502 | unsigned long wakee_flip_decay_ts; | 507 | unsigned long wakee_flip_decay_ts; |
1503 | struct task_struct *last_wakee; | 508 | struct task_struct *last_wakee; |
1504 | 509 | ||
1505 | int wake_cpu; | 510 | int wake_cpu; |
1506 | #endif | 511 | #endif |
1507 | int on_rq; | 512 | int on_rq; |
1508 | 513 | ||
1509 | int prio, static_prio, normal_prio; | 514 | int prio; |
1510 | unsigned int rt_priority; | 515 | int static_prio; |
1511 | const struct sched_class *sched_class; | 516 | int normal_prio; |
1512 | struct sched_entity se; | 517 | unsigned int rt_priority; |
1513 | struct sched_rt_entity rt; | 518 | |
519 | const struct sched_class *sched_class; | ||
520 | struct sched_entity se; | ||
521 | struct sched_rt_entity rt; | ||
1514 | #ifdef CONFIG_CGROUP_SCHED | 522 | #ifdef CONFIG_CGROUP_SCHED |
1515 | struct task_group *sched_task_group; | 523 | struct task_group *sched_task_group; |
1516 | #endif | 524 | #endif |
1517 | struct sched_dl_entity dl; | 525 | struct sched_dl_entity dl; |
1518 | 526 | ||
1519 | #ifdef CONFIG_PREEMPT_NOTIFIERS | 527 | #ifdef CONFIG_PREEMPT_NOTIFIERS |
1520 | /* list of struct preempt_notifier: */ | 528 | /* List of struct preempt_notifier: */ |
1521 | struct hlist_head preempt_notifiers; | 529 | struct hlist_head preempt_notifiers; |
1522 | #endif | 530 | #endif |
1523 | 531 | ||
1524 | #ifdef CONFIG_BLK_DEV_IO_TRACE | 532 | #ifdef CONFIG_BLK_DEV_IO_TRACE |
1525 | unsigned int btrace_seq; | 533 | unsigned int btrace_seq; |
1526 | #endif | 534 | #endif |
1527 | 535 | ||
1528 | unsigned int policy; | 536 | unsigned int policy; |
1529 | int nr_cpus_allowed; | 537 | int nr_cpus_allowed; |
1530 | cpumask_t cpus_allowed; | 538 | cpumask_t cpus_allowed; |
1531 | 539 | ||
1532 | #ifdef CONFIG_PREEMPT_RCU | 540 | #ifdef CONFIG_PREEMPT_RCU |
1533 | int rcu_read_lock_nesting; | 541 | int rcu_read_lock_nesting; |
1534 | union rcu_special rcu_read_unlock_special; | 542 | union rcu_special rcu_read_unlock_special; |
1535 | struct list_head rcu_node_entry; | 543 | struct list_head rcu_node_entry; |
1536 | struct rcu_node *rcu_blocked_node; | 544 | struct rcu_node *rcu_blocked_node; |
1537 | #endif /* #ifdef CONFIG_PREEMPT_RCU */ | 545 | #endif /* #ifdef CONFIG_PREEMPT_RCU */ |
546 | |||
1538 | #ifdef CONFIG_TASKS_RCU | 547 | #ifdef CONFIG_TASKS_RCU |
1539 | unsigned long rcu_tasks_nvcsw; | 548 | unsigned long rcu_tasks_nvcsw; |
1540 | bool rcu_tasks_holdout; | 549 | bool rcu_tasks_holdout; |
1541 | struct list_head rcu_tasks_holdout_list; | 550 | struct list_head rcu_tasks_holdout_list; |
1542 | int rcu_tasks_idle_cpu; | 551 | int rcu_tasks_idle_cpu; |
1543 | #endif /* #ifdef CONFIG_TASKS_RCU */ | 552 | #endif /* #ifdef CONFIG_TASKS_RCU */ |
1544 | 553 | ||
1545 | #ifdef CONFIG_SCHED_INFO | 554 | struct sched_info sched_info; |
1546 | struct sched_info sched_info; | ||
1547 | #endif | ||
1548 | 555 | ||
1549 | struct list_head tasks; | 556 | struct list_head tasks; |
1550 | #ifdef CONFIG_SMP | 557 | #ifdef CONFIG_SMP |
1551 | struct plist_node pushable_tasks; | 558 | struct plist_node pushable_tasks; |
1552 | struct rb_node pushable_dl_tasks; | 559 | struct rb_node pushable_dl_tasks; |
1553 | #endif | 560 | #endif |
1554 | 561 | ||
1555 | struct mm_struct *mm, *active_mm; | 562 | struct mm_struct *mm; |
1556 | /* per-thread vma caching */ | 563 | struct mm_struct *active_mm; |
1557 | u32 vmacache_seqnum; | 564 | |
1558 | struct vm_area_struct *vmacache[VMACACHE_SIZE]; | 565 | /* Per-thread vma caching: */ |
1559 | #if defined(SPLIT_RSS_COUNTING) | 566 | struct vmacache vmacache; |
1560 | struct task_rss_stat rss_stat; | 567 | |
1561 | #endif | 568 | #ifdef SPLIT_RSS_COUNTING |
1562 | /* task state */ | 569 | struct task_rss_stat rss_stat; |
1563 | int exit_state; | 570 | #endif |
1564 | int exit_code, exit_signal; | 571 | int exit_state; |
1565 | int pdeath_signal; /* The signal sent when the parent dies */ | 572 | int exit_code; |
1566 | unsigned long jobctl; /* JOBCTL_*, siglock protected */ | 573 | int exit_signal; |
1567 | 574 | /* The signal sent when the parent dies: */ | |
1568 | /* Used for emulating ABI behavior of previous Linux versions */ | 575 | int pdeath_signal; |
1569 | unsigned int personality; | 576 | /* JOBCTL_*, siglock protected: */ |
1570 | 577 | unsigned long jobctl; | |
1571 | /* scheduler bits, serialized by scheduler locks */ | 578 | |
1572 | unsigned sched_reset_on_fork:1; | 579 | /* Used for emulating ABI behavior of previous Linux versions: */ |
1573 | unsigned sched_contributes_to_load:1; | 580 | unsigned int personality; |
1574 | unsigned sched_migrated:1; | 581 | |
1575 | unsigned sched_remote_wakeup:1; | 582 | /* Scheduler bits, serialized by scheduler locks: */ |
1576 | unsigned :0; /* force alignment to the next boundary */ | 583 | unsigned sched_reset_on_fork:1; |
1577 | 584 | unsigned sched_contributes_to_load:1; | |
1578 | /* unserialized, strictly 'current' */ | 585 | unsigned sched_migrated:1; |
1579 | unsigned in_execve:1; /* bit to tell LSMs we're in execve */ | 586 | unsigned sched_remote_wakeup:1; |
1580 | unsigned in_iowait:1; | 587 | /* Force alignment to the next boundary: */ |
1581 | #if !defined(TIF_RESTORE_SIGMASK) | 588 | unsigned :0; |
1582 | unsigned restore_sigmask:1; | 589 | |
590 | /* Unserialized, strictly 'current' */ | ||
591 | |||
592 | /* Bit to tell LSMs we're in execve(): */ | ||
593 | unsigned in_execve:1; | ||
594 | unsigned in_iowait:1; | ||
595 | #ifndef TIF_RESTORE_SIGMASK | ||
596 | unsigned restore_sigmask:1; | ||
1583 | #endif | 597 | #endif |
1584 | #ifdef CONFIG_MEMCG | 598 | #ifdef CONFIG_MEMCG |
1585 | unsigned memcg_may_oom:1; | 599 | unsigned memcg_may_oom:1; |
1586 | #ifndef CONFIG_SLOB | 600 | #ifndef CONFIG_SLOB |
1587 | unsigned memcg_kmem_skip_account:1; | 601 | unsigned memcg_kmem_skip_account:1; |
1588 | #endif | 602 | #endif |
1589 | #endif | 603 | #endif |
1590 | #ifdef CONFIG_COMPAT_BRK | 604 | #ifdef CONFIG_COMPAT_BRK |
1591 | unsigned brk_randomized:1; | 605 | unsigned brk_randomized:1; |
1592 | #endif | 606 | #endif |
1593 | 607 | ||
1594 | unsigned long atomic_flags; /* Flags needing atomic access. */ | 608 | unsigned long atomic_flags; /* Flags requiring atomic access. */ |
1595 | 609 | ||
1596 | struct restart_block restart_block; | 610 | struct restart_block restart_block; |
1597 | 611 | ||
1598 | pid_t pid; | 612 | pid_t pid; |
1599 | pid_t tgid; | 613 | pid_t tgid; |
1600 | 614 | ||
1601 | #ifdef CONFIG_CC_STACKPROTECTOR | 615 | #ifdef CONFIG_CC_STACKPROTECTOR |
1602 | /* Canary value for the -fstack-protector gcc feature */ | 616 | /* Canary value for the -fstack-protector GCC feature: */ |
1603 | unsigned long stack_canary; | 617 | unsigned long stack_canary; |
1604 | #endif | 618 | #endif |
1605 | /* | 619 | /* |
1606 | * pointers to (original) parent process, youngest child, younger sibling, | 620 | * Pointers to the (original) parent process, youngest child, younger sibling, |
1607 | * older sibling, respectively. (p->father can be replaced with | 621 | * older sibling, respectively. (p->father can be replaced with |
1608 | * p->real_parent->pid) | 622 | * p->real_parent->pid) |
1609 | */ | 623 | */ |
1610 | struct task_struct __rcu *real_parent; /* real parent process */ | 624 | |
1611 | struct task_struct __rcu *parent; /* recipient of SIGCHLD, wait4() reports */ | 625 | /* Real parent process: */ |
626 | struct task_struct __rcu *real_parent; | ||
627 | |||
628 | /* Recipient of SIGCHLD, wait4() reports: */ | ||
629 | struct task_struct __rcu *parent; | ||
630 | |||
1612 | /* | 631 | /* |
1613 | * children/sibling forms the list of my natural children | 632 | * Children/sibling form the list of natural children: |
1614 | */ | 633 | */ |
1615 | struct list_head children; /* list of my children */ | 634 | struct list_head children; |
1616 | struct list_head sibling; /* linkage in my parent's children list */ | 635 | struct list_head sibling; |
1617 | struct task_struct *group_leader; /* threadgroup leader */ | 636 | struct task_struct *group_leader; |
1618 | 637 | ||
1619 | /* | 638 | /* |
1620 | * ptraced is the list of tasks this task is using ptrace on. | 639 | * 'ptraced' is the list of tasks this task is using ptrace() on. |
640 | * | ||
1621 | * This includes both natural children and PTRACE_ATTACH targets. | 641 | * This includes both natural children and PTRACE_ATTACH targets. |
1622 | * p->ptrace_entry is p's link on the p->parent->ptraced list. | 642 | * 'ptrace_entry' is this task's link on the p->parent->ptraced list. |
1623 | */ | 643 | */ |
1624 | struct list_head ptraced; | 644 | struct list_head ptraced; |
1625 | struct list_head ptrace_entry; | 645 | struct list_head ptrace_entry; |
1626 | 646 | ||
1627 | /* PID/PID hash table linkage. */ | 647 | /* PID/PID hash table linkage. */ |
1628 | struct pid_link pids[PIDTYPE_MAX]; | 648 | struct pid_link pids[PIDTYPE_MAX]; |
1629 | struct list_head thread_group; | 649 | struct list_head thread_group; |
1630 | struct list_head thread_node; | 650 | struct list_head thread_node; |
651 | |||
652 | struct completion *vfork_done; | ||
653 | |||
654 | /* CLONE_CHILD_SETTID: */ | ||
655 | int __user *set_child_tid; | ||
1631 | 656 | ||
1632 | struct completion *vfork_done; /* for vfork() */ | 657 | /* CLONE_CHILD_CLEARTID: */ |
1633 | int __user *set_child_tid; /* CLONE_CHILD_SETTID */ | 658 | int __user *clear_child_tid; |
1634 | int __user *clear_child_tid; /* CLONE_CHILD_CLEARTID */ | ||
1635 | 659 | ||
1636 | u64 utime, stime; | 660 | u64 utime; |
661 | u64 stime; | ||
1637 | #ifdef CONFIG_ARCH_HAS_SCALED_CPUTIME | 662 | #ifdef CONFIG_ARCH_HAS_SCALED_CPUTIME |
1638 | u64 utimescaled, stimescaled; | 663 | u64 utimescaled; |
664 | u64 stimescaled; | ||
1639 | #endif | 665 | #endif |
1640 | u64 gtime; | 666 | u64 gtime; |
1641 | struct prev_cputime prev_cputime; | 667 | struct prev_cputime prev_cputime; |
1642 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN | 668 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN |
1643 | seqcount_t vtime_seqcount; | 669 | seqcount_t vtime_seqcount; |
1644 | unsigned long long vtime_snap; | 670 | unsigned long long vtime_snap; |
1645 | enum { | 671 | enum { |
1646 | /* Task is sleeping or running in a CPU with VTIME inactive */ | 672 | /* Task is sleeping or running in a CPU with VTIME inactive: */ |
1647 | VTIME_INACTIVE = 0, | 673 | VTIME_INACTIVE = 0, |
1648 | /* Task runs in userspace in a CPU with VTIME active */ | 674 | /* Task runs in userspace in a CPU with VTIME active: */ |
1649 | VTIME_USER, | 675 | VTIME_USER, |
1650 | /* Task runs in kernelspace in a CPU with VTIME active */ | 676 | /* Task runs in kernelspace in a CPU with VTIME active: */ |
1651 | VTIME_SYS, | 677 | VTIME_SYS, |
1652 | } vtime_snap_whence; | 678 | } vtime_snap_whence; |
1653 | #endif | 679 | #endif |
1654 | 680 | ||
1655 | #ifdef CONFIG_NO_HZ_FULL | 681 | #ifdef CONFIG_NO_HZ_FULL |
1656 | atomic_t tick_dep_mask; | 682 | atomic_t tick_dep_mask; |
1657 | #endif | 683 | #endif |
1658 | unsigned long nvcsw, nivcsw; /* context switch counts */ | 684 | /* Context switch counts: */ |
1659 | u64 start_time; /* monotonic time in nsec */ | 685 | unsigned long nvcsw; |
1660 | u64 real_start_time; /* boot based time in nsec */ | 686 | unsigned long nivcsw; |
1661 | /* mm fault and swap info: this can arguably be seen as either mm-specific or thread-specific */ | 687 | |
1662 | unsigned long min_flt, maj_flt; | 688 | /* Monotonic time in nsecs: */ |
689 | u64 start_time; | ||
690 | |||
691 | /* Boot based time in nsecs: */ | ||
692 | u64 real_start_time; | ||
693 | |||
694 | /* MM fault and swap info: this can arguably be seen as either mm-specific or thread-specific: */ | ||
695 | unsigned long min_flt; | ||
696 | unsigned long maj_flt; | ||
1663 | 697 | ||
1664 | #ifdef CONFIG_POSIX_TIMERS | 698 | #ifdef CONFIG_POSIX_TIMERS |
1665 | struct task_cputime cputime_expires; | 699 | struct task_cputime cputime_expires; |
1666 | struct list_head cpu_timers[3]; | 700 | struct list_head cpu_timers[3]; |
1667 | #endif | 701 | #endif |
1668 | 702 | ||
1669 | /* process credentials */ | 703 | /* Process credentials: */ |
1670 | const struct cred __rcu *ptracer_cred; /* Tracer's credentials at attach */ | 704 | |
1671 | const struct cred __rcu *real_cred; /* objective and real subjective task | 705 | /* Tracer's credentials at attach: */ |
1672 | * credentials (COW) */ | 706 | const struct cred __rcu *ptracer_cred; |
1673 | const struct cred __rcu *cred; /* effective (overridable) subjective task | 707 | |
1674 | * credentials (COW) */ | 708 | /* Objective and real subjective task credentials (COW): */ |
1675 | char comm[TASK_COMM_LEN]; /* executable name excluding path | 709 | const struct cred __rcu *real_cred; |
1676 | - access with [gs]et_task_comm (which lock | 710 | |
1677 | it with task_lock()) | 711 | /* Effective (overridable) subjective task credentials (COW): */ |
1678 | - initialized normally by setup_new_exec */ | 712 | const struct cred __rcu *cred; |
1679 | /* file system info */ | 713 | |
1680 | struct nameidata *nameidata; | 714 | /* |
715 | * executable name, excluding path. | ||
716 | * | ||
717 | * - normally initialized setup_new_exec() | ||
718 | * - access it with [gs]et_task_comm() | ||
719 | * - lock it with task_lock() | ||
720 | */ | ||
721 | char comm[TASK_COMM_LEN]; | ||
722 | |||
723 | struct nameidata *nameidata; | ||
724 | |||
1681 | #ifdef CONFIG_SYSVIPC | 725 | #ifdef CONFIG_SYSVIPC |
1682 | /* ipc stuff */ | 726 | struct sysv_sem sysvsem; |
1683 | struct sysv_sem sysvsem; | 727 | struct sysv_shm sysvshm; |
1684 | struct sysv_shm sysvshm; | ||
1685 | #endif | 728 | #endif |
1686 | #ifdef CONFIG_DETECT_HUNG_TASK | 729 | #ifdef CONFIG_DETECT_HUNG_TASK |
1687 | /* hung task detection */ | 730 | unsigned long last_switch_count; |
1688 | unsigned long last_switch_count; | 731 | #endif |
1689 | #endif | 732 | /* Filesystem information: */ |
1690 | /* filesystem information */ | 733 | struct fs_struct *fs; |
1691 | struct fs_struct *fs; | 734 | |
1692 | /* open file information */ | 735 | /* Open file information: */ |
1693 | struct files_struct *files; | 736 | struct files_struct *files; |
1694 | /* namespaces */ | 737 | |
1695 | struct nsproxy *nsproxy; | 738 | /* Namespaces: */ |
1696 | /* signal handlers */ | 739 | struct nsproxy *nsproxy; |
1697 | struct signal_struct *signal; | 740 | |
1698 | struct sighand_struct *sighand; | 741 | /* Signal handlers: */ |
1699 | 742 | struct signal_struct *signal; | |
1700 | sigset_t blocked, real_blocked; | 743 | struct sighand_struct *sighand; |
1701 | sigset_t saved_sigmask; /* restored if set_restore_sigmask() was used */ | 744 | sigset_t blocked; |
1702 | struct sigpending pending; | 745 | sigset_t real_blocked; |
1703 | 746 | /* Restored if set_restore_sigmask() was used: */ | |
1704 | unsigned long sas_ss_sp; | 747 | sigset_t saved_sigmask; |
1705 | size_t sas_ss_size; | 748 | struct sigpending pending; |
1706 | unsigned sas_ss_flags; | 749 | unsigned long sas_ss_sp; |
1707 | 750 | size_t sas_ss_size; | |
1708 | struct callback_head *task_works; | 751 | unsigned int sas_ss_flags; |
1709 | 752 | ||
1710 | struct audit_context *audit_context; | 753 | struct callback_head *task_works; |
754 | |||
755 | struct audit_context *audit_context; | ||
1711 | #ifdef CONFIG_AUDITSYSCALL | 756 | #ifdef CONFIG_AUDITSYSCALL |
1712 | kuid_t loginuid; | 757 | kuid_t loginuid; |
1713 | unsigned int sessionid; | 758 | unsigned int sessionid; |
1714 | #endif | 759 | #endif |
1715 | struct seccomp seccomp; | 760 | struct seccomp seccomp; |
1716 | 761 | ||
1717 | /* Thread group tracking */ | 762 | /* Thread group tracking: */ |
1718 | u32 parent_exec_id; | 763 | u32 parent_exec_id; |
1719 | u32 self_exec_id; | 764 | u32 self_exec_id; |
1720 | /* Protection of (de-)allocation: mm, files, fs, tty, keyrings, mems_allowed, | 765 | |
1721 | * mempolicy */ | 766 | /* Protection against (de-)allocation: mm, files, fs, tty, keyrings, mems_allowed, mempolicy: */ |
1722 | spinlock_t alloc_lock; | 767 | spinlock_t alloc_lock; |
1723 | 768 | ||
1724 | /* Protection of the PI data structures: */ | 769 | /* Protection of the PI data structures: */ |
1725 | raw_spinlock_t pi_lock; | 770 | raw_spinlock_t pi_lock; |
1726 | 771 | ||
1727 | struct wake_q_node wake_q; | 772 | struct wake_q_node wake_q; |
1728 | 773 | ||
1729 | #ifdef CONFIG_RT_MUTEXES | 774 | #ifdef CONFIG_RT_MUTEXES |
1730 | /* PI waiters blocked on a rt_mutex held by this task */ | 775 | /* PI waiters blocked on a rt_mutex held by this task: */ |
1731 | struct rb_root pi_waiters; | 776 | struct rb_root pi_waiters; |
1732 | struct rb_node *pi_waiters_leftmost; | 777 | struct rb_node *pi_waiters_leftmost; |
1733 | /* Deadlock detection and priority inheritance handling */ | 778 | /* Deadlock detection and priority inheritance handling: */ |
1734 | struct rt_mutex_waiter *pi_blocked_on; | 779 | struct rt_mutex_waiter *pi_blocked_on; |
1735 | #endif | 780 | #endif |
1736 | 781 | ||
1737 | #ifdef CONFIG_DEBUG_MUTEXES | 782 | #ifdef CONFIG_DEBUG_MUTEXES |
1738 | /* mutex deadlock detection */ | 783 | /* Mutex deadlock detection: */ |
1739 | struct mutex_waiter *blocked_on; | 784 | struct mutex_waiter *blocked_on; |
1740 | #endif | 785 | #endif |
786 | |||
1741 | #ifdef CONFIG_TRACE_IRQFLAGS | 787 | #ifdef CONFIG_TRACE_IRQFLAGS |
1742 | unsigned int irq_events; | 788 | unsigned int irq_events; |
1743 | unsigned long hardirq_enable_ip; | 789 | unsigned long hardirq_enable_ip; |
1744 | unsigned long hardirq_disable_ip; | 790 | unsigned long hardirq_disable_ip; |
1745 | unsigned int hardirq_enable_event; | 791 | unsigned int hardirq_enable_event; |
1746 | unsigned int hardirq_disable_event; | 792 | unsigned int hardirq_disable_event; |
1747 | int hardirqs_enabled; | 793 | int hardirqs_enabled; |
1748 | int hardirq_context; | 794 | int hardirq_context; |
1749 | unsigned long softirq_disable_ip; | 795 | unsigned long softirq_disable_ip; |
1750 | unsigned long softirq_enable_ip; | 796 | unsigned long softirq_enable_ip; |
1751 | unsigned int softirq_disable_event; | 797 | unsigned int softirq_disable_event; |
1752 | unsigned int softirq_enable_event; | 798 | unsigned int softirq_enable_event; |
1753 | int softirqs_enabled; | 799 | int softirqs_enabled; |
1754 | int softirq_context; | 800 | int softirq_context; |
1755 | #endif | 801 | #endif |
802 | |||
1756 | #ifdef CONFIG_LOCKDEP | 803 | #ifdef CONFIG_LOCKDEP |
1757 | # define MAX_LOCK_DEPTH 48UL | 804 | # define MAX_LOCK_DEPTH 48UL |
1758 | u64 curr_chain_key; | 805 | u64 curr_chain_key; |
1759 | int lockdep_depth; | 806 | int lockdep_depth; |
1760 | unsigned int lockdep_recursion; | 807 | unsigned int lockdep_recursion; |
1761 | struct held_lock held_locks[MAX_LOCK_DEPTH]; | 808 | struct held_lock held_locks[MAX_LOCK_DEPTH]; |
1762 | gfp_t lockdep_reclaim_gfp; | 809 | gfp_t lockdep_reclaim_gfp; |
1763 | #endif | 810 | #endif |
811 | |||
1764 | #ifdef CONFIG_UBSAN | 812 | #ifdef CONFIG_UBSAN |
1765 | unsigned int in_ubsan; | 813 | unsigned int in_ubsan; |
1766 | #endif | 814 | #endif |
1767 | 815 | ||
1768 | /* journalling filesystem info */ | 816 | /* Journalling filesystem info: */ |
1769 | void *journal_info; | 817 | void *journal_info; |
1770 | 818 | ||
1771 | /* stacked block device info */ | 819 | /* Stacked block device info: */ |
1772 | struct bio_list *bio_list; | 820 | struct bio_list *bio_list; |
1773 | 821 | ||
1774 | #ifdef CONFIG_BLOCK | 822 | #ifdef CONFIG_BLOCK |
1775 | /* stack plugging */ | 823 | /* Stack plugging: */ |
1776 | struct blk_plug *plug; | 824 | struct blk_plug *plug; |
1777 | #endif | 825 | #endif |
1778 | 826 | ||
1779 | /* VM state */ | 827 | /* VM state: */ |
1780 | struct reclaim_state *reclaim_state; | 828 | struct reclaim_state *reclaim_state; |
1781 | 829 | ||
1782 | struct backing_dev_info *backing_dev_info; | 830 | struct backing_dev_info *backing_dev_info; |
1783 | 831 | ||
1784 | struct io_context *io_context; | 832 | struct io_context *io_context; |
1785 | 833 | ||
1786 | unsigned long ptrace_message; | 834 | /* Ptrace state: */ |
1787 | siginfo_t *last_siginfo; /* For ptrace use. */ | 835 | unsigned long ptrace_message; |
1788 | struct task_io_accounting ioac; | 836 | siginfo_t *last_siginfo; |
1789 | #if defined(CONFIG_TASK_XACCT) | 837 | |
1790 | u64 acct_rss_mem1; /* accumulated rss usage */ | 838 | struct task_io_accounting ioac; |
1791 | u64 acct_vm_mem1; /* accumulated virtual memory usage */ | 839 | #ifdef CONFIG_TASK_XACCT |
1792 | u64 acct_timexpd; /* stime + utime since last update */ | 840 | /* Accumulated RSS usage: */ |
841 | u64 acct_rss_mem1; | ||
842 | /* Accumulated virtual memory usage: */ | ||
843 | u64 acct_vm_mem1; | ||
844 | /* stime + utime since last update: */ | ||
845 | u64 acct_timexpd; | ||
1793 | #endif | 846 | #endif |
1794 | #ifdef CONFIG_CPUSETS | 847 | #ifdef CONFIG_CPUSETS |
1795 | nodemask_t mems_allowed; /* Protected by alloc_lock */ | 848 | /* Protected by ->alloc_lock: */ |
1796 | seqcount_t mems_allowed_seq; /* Seqence no to catch updates */ | 849 | nodemask_t mems_allowed; |
1797 | int cpuset_mem_spread_rotor; | 850 | /* Seqence number to catch updates: */ |
1798 | int cpuset_slab_spread_rotor; | 851 | seqcount_t mems_allowed_seq; |
852 | int cpuset_mem_spread_rotor; | ||
853 | int cpuset_slab_spread_rotor; | ||
1799 | #endif | 854 | #endif |
1800 | #ifdef CONFIG_CGROUPS | 855 | #ifdef CONFIG_CGROUPS |
1801 | /* Control Group info protected by css_set_lock */ | 856 | /* Control Group info protected by css_set_lock: */ |
1802 | struct css_set __rcu *cgroups; | 857 | struct css_set __rcu *cgroups; |
1803 | /* cg_list protected by css_set_lock and tsk->alloc_lock */ | 858 | /* cg_list protected by css_set_lock and tsk->alloc_lock: */ |
1804 | struct list_head cg_list; | 859 | struct list_head cg_list; |
1805 | #endif | 860 | #endif |
1806 | #ifdef CONFIG_INTEL_RDT_A | 861 | #ifdef CONFIG_INTEL_RDT_A |
1807 | int closid; | 862 | int closid; |
1808 | #endif | 863 | #endif |
1809 | #ifdef CONFIG_FUTEX | 864 | #ifdef CONFIG_FUTEX |
1810 | struct robust_list_head __user *robust_list; | 865 | struct robust_list_head __user *robust_list; |
1811 | #ifdef CONFIG_COMPAT | 866 | #ifdef CONFIG_COMPAT |
1812 | struct compat_robust_list_head __user *compat_robust_list; | 867 | struct compat_robust_list_head __user *compat_robust_list; |
1813 | #endif | 868 | #endif |
1814 | struct list_head pi_state_list; | 869 | struct list_head pi_state_list; |
1815 | struct futex_pi_state *pi_state_cache; | 870 | struct futex_pi_state *pi_state_cache; |
1816 | #endif | 871 | #endif |
1817 | #ifdef CONFIG_PERF_EVENTS | 872 | #ifdef CONFIG_PERF_EVENTS |
1818 | struct perf_event_context *perf_event_ctxp[perf_nr_task_contexts]; | 873 | struct perf_event_context *perf_event_ctxp[perf_nr_task_contexts]; |
1819 | struct mutex perf_event_mutex; | 874 | struct mutex perf_event_mutex; |
1820 | struct list_head perf_event_list; | 875 | struct list_head perf_event_list; |
1821 | #endif | 876 | #endif |
1822 | #ifdef CONFIG_DEBUG_PREEMPT | 877 | #ifdef CONFIG_DEBUG_PREEMPT |
1823 | unsigned long preempt_disable_ip; | 878 | unsigned long preempt_disable_ip; |
1824 | #endif | 879 | #endif |
1825 | #ifdef CONFIG_NUMA | 880 | #ifdef CONFIG_NUMA |
1826 | struct mempolicy *mempolicy; /* Protected by alloc_lock */ | 881 | /* Protected by alloc_lock: */ |
1827 | short il_next; | 882 | struct mempolicy *mempolicy; |
1828 | short pref_node_fork; | 883 | short il_next; |
884 | short pref_node_fork; | ||
1829 | #endif | 885 | #endif |
1830 | #ifdef CONFIG_NUMA_BALANCING | 886 | #ifdef CONFIG_NUMA_BALANCING |
1831 | int numa_scan_seq; | 887 | int numa_scan_seq; |
1832 | unsigned int numa_scan_period; | 888 | unsigned int numa_scan_period; |
1833 | unsigned int numa_scan_period_max; | 889 | unsigned int numa_scan_period_max; |
1834 | int numa_preferred_nid; | 890 | int numa_preferred_nid; |
1835 | unsigned long numa_migrate_retry; | 891 | unsigned long numa_migrate_retry; |
1836 | u64 node_stamp; /* migration stamp */ | 892 | /* Migration stamp: */ |
1837 | u64 last_task_numa_placement; | 893 | u64 node_stamp; |
1838 | u64 last_sum_exec_runtime; | 894 | u64 last_task_numa_placement; |
1839 | struct callback_head numa_work; | 895 | u64 last_sum_exec_runtime; |
1840 | 896 | struct callback_head numa_work; | |
1841 | struct list_head numa_entry; | 897 | |
1842 | struct numa_group *numa_group; | 898 | struct list_head numa_entry; |
899 | struct numa_group *numa_group; | ||
1843 | 900 | ||
1844 | /* | 901 | /* |
1845 | * numa_faults is an array split into four regions: | 902 | * numa_faults is an array split into four regions: |
@@ -1855,8 +912,8 @@ struct task_struct { | |||
1855 | * during the current scan window. When the scan completes, the counts | 912 | * during the current scan window. When the scan completes, the counts |
1856 | * in faults_memory and faults_cpu decay and these values are copied. | 913 | * in faults_memory and faults_cpu decay and these values are copied. |
1857 | */ | 914 | */ |
1858 | unsigned long *numa_faults; | 915 | unsigned long *numa_faults; |
1859 | unsigned long total_numa_faults; | 916 | unsigned long total_numa_faults; |
1860 | 917 | ||
1861 | /* | 918 | /* |
1862 | * numa_faults_locality tracks if faults recorded during the last | 919 | * numa_faults_locality tracks if faults recorded during the last |
@@ -1864,208 +921,133 @@ struct task_struct { | |||
1864 | * period is adapted based on the locality of the faults with different | 921 | * period is adapted based on the locality of the faults with different |
1865 | * weights depending on whether they were shared or private faults | 922 | * weights depending on whether they were shared or private faults |
1866 | */ | 923 | */ |
1867 | unsigned long numa_faults_locality[3]; | 924 | unsigned long numa_faults_locality[3]; |
1868 | 925 | ||
1869 | unsigned long numa_pages_migrated; | 926 | unsigned long numa_pages_migrated; |
1870 | #endif /* CONFIG_NUMA_BALANCING */ | 927 | #endif /* CONFIG_NUMA_BALANCING */ |
1871 | 928 | ||
1872 | #ifdef CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH | 929 | struct tlbflush_unmap_batch tlb_ubc; |
1873 | struct tlbflush_unmap_batch tlb_ubc; | ||
1874 | #endif | ||
1875 | 930 | ||
1876 | struct rcu_head rcu; | 931 | struct rcu_head rcu; |
1877 | 932 | ||
1878 | /* | 933 | /* Cache last used pipe for splice(): */ |
1879 | * cache last used pipe for splice | 934 | struct pipe_inode_info *splice_pipe; |
1880 | */ | ||
1881 | struct pipe_inode_info *splice_pipe; | ||
1882 | 935 | ||
1883 | struct page_frag task_frag; | 936 | struct page_frag task_frag; |
1884 | 937 | ||
1885 | #ifdef CONFIG_TASK_DELAY_ACCT | 938 | #ifdef CONFIG_TASK_DELAY_ACCT |
1886 | struct task_delay_info *delays; | 939 | struct task_delay_info *delays; |
1887 | #endif | 940 | #endif |
941 | |||
1888 | #ifdef CONFIG_FAULT_INJECTION | 942 | #ifdef CONFIG_FAULT_INJECTION |
1889 | int make_it_fail; | 943 | int make_it_fail; |
1890 | #endif | 944 | #endif |
1891 | /* | 945 | /* |
1892 | * when (nr_dirtied >= nr_dirtied_pause), it's time to call | 946 | * When (nr_dirtied >= nr_dirtied_pause), it's time to call |
1893 | * balance_dirty_pages() for some dirty throttling pause | 947 | * balance_dirty_pages() for a dirty throttling pause: |
1894 | */ | 948 | */ |
1895 | int nr_dirtied; | 949 | int nr_dirtied; |
1896 | int nr_dirtied_pause; | 950 | int nr_dirtied_pause; |
1897 | unsigned long dirty_paused_when; /* start of a write-and-pause period */ | 951 | /* Start of a write-and-pause period: */ |
952 | unsigned long dirty_paused_when; | ||
1898 | 953 | ||
1899 | #ifdef CONFIG_LATENCYTOP | 954 | #ifdef CONFIG_LATENCYTOP |
1900 | int latency_record_count; | 955 | int latency_record_count; |
1901 | struct latency_record latency_record[LT_SAVECOUNT]; | 956 | struct latency_record latency_record[LT_SAVECOUNT]; |
1902 | #endif | 957 | #endif |
1903 | /* | 958 | /* |
1904 | * time slack values; these are used to round up poll() and | 959 | * Time slack values; these are used to round up poll() and |
1905 | * select() etc timeout values. These are in nanoseconds. | 960 | * select() etc timeout values. These are in nanoseconds. |
1906 | */ | 961 | */ |
1907 | u64 timer_slack_ns; | 962 | u64 timer_slack_ns; |
1908 | u64 default_timer_slack_ns; | 963 | u64 default_timer_slack_ns; |
1909 | 964 | ||
1910 | #ifdef CONFIG_KASAN | 965 | #ifdef CONFIG_KASAN |
1911 | unsigned int kasan_depth; | 966 | unsigned int kasan_depth; |
1912 | #endif | 967 | #endif |
968 | |||
1913 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER | 969 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER |
1914 | /* Index of current stored address in ret_stack */ | 970 | /* Index of current stored address in ret_stack: */ |
1915 | int curr_ret_stack; | 971 | int curr_ret_stack; |
1916 | /* Stack of return addresses for return function tracing */ | 972 | |
1917 | struct ftrace_ret_stack *ret_stack; | 973 | /* Stack of return addresses for return function tracing: */ |
1918 | /* time stamp for last schedule */ | 974 | struct ftrace_ret_stack *ret_stack; |
1919 | unsigned long long ftrace_timestamp; | 975 | |
976 | /* Timestamp for last schedule: */ | ||
977 | unsigned long long ftrace_timestamp; | ||
978 | |||
1920 | /* | 979 | /* |
1921 | * Number of functions that haven't been traced | 980 | * Number of functions that haven't been traced |
1922 | * because of depth overrun. | 981 | * because of depth overrun: |
1923 | */ | 982 | */ |
1924 | atomic_t trace_overrun; | 983 | atomic_t trace_overrun; |
1925 | /* Pause for the tracing */ | 984 | |
1926 | atomic_t tracing_graph_pause; | 985 | /* Pause tracing: */ |
986 | atomic_t tracing_graph_pause; | ||
1927 | #endif | 987 | #endif |
988 | |||
1928 | #ifdef CONFIG_TRACING | 989 | #ifdef CONFIG_TRACING |
1929 | /* state flags for use by tracers */ | 990 | /* State flags for use by tracers: */ |
1930 | unsigned long trace; | 991 | unsigned long trace; |
1931 | /* bitmask and counter of trace recursion */ | 992 | |
1932 | unsigned long trace_recursion; | 993 | /* Bitmask and counter of trace recursion: */ |
994 | unsigned long trace_recursion; | ||
1933 | #endif /* CONFIG_TRACING */ | 995 | #endif /* CONFIG_TRACING */ |
996 | |||
1934 | #ifdef CONFIG_KCOV | 997 | #ifdef CONFIG_KCOV |
1935 | /* Coverage collection mode enabled for this task (0 if disabled). */ | 998 | /* Coverage collection mode enabled for this task (0 if disabled): */ |
1936 | enum kcov_mode kcov_mode; | 999 | enum kcov_mode kcov_mode; |
1937 | /* Size of the kcov_area. */ | 1000 | |
1938 | unsigned kcov_size; | 1001 | /* Size of the kcov_area: */ |
1939 | /* Buffer for coverage collection. */ | 1002 | unsigned int kcov_size; |
1940 | void *kcov_area; | 1003 | |
1941 | /* kcov desciptor wired with this task or NULL. */ | 1004 | /* Buffer for coverage collection: */ |
1942 | struct kcov *kcov; | 1005 | void *kcov_area; |
1006 | |||
1007 | /* KCOV descriptor wired with this task or NULL: */ | ||
1008 | struct kcov *kcov; | ||
1943 | #endif | 1009 | #endif |
1010 | |||
1944 | #ifdef CONFIG_MEMCG | 1011 | #ifdef CONFIG_MEMCG |
1945 | struct mem_cgroup *memcg_in_oom; | 1012 | struct mem_cgroup *memcg_in_oom; |
1946 | gfp_t memcg_oom_gfp_mask; | 1013 | gfp_t memcg_oom_gfp_mask; |
1947 | int memcg_oom_order; | 1014 | int memcg_oom_order; |
1948 | 1015 | ||
1949 | /* number of pages to reclaim on returning to userland */ | 1016 | /* Number of pages to reclaim on returning to userland: */ |
1950 | unsigned int memcg_nr_pages_over_high; | 1017 | unsigned int memcg_nr_pages_over_high; |
1951 | #endif | 1018 | #endif |
1019 | |||
1952 | #ifdef CONFIG_UPROBES | 1020 | #ifdef CONFIG_UPROBES |
1953 | struct uprobe_task *utask; | 1021 | struct uprobe_task *utask; |
1954 | #endif | 1022 | #endif |
1955 | #if defined(CONFIG_BCACHE) || defined(CONFIG_BCACHE_MODULE) | 1023 | #if defined(CONFIG_BCACHE) || defined(CONFIG_BCACHE_MODULE) |
1956 | unsigned int sequential_io; | 1024 | unsigned int sequential_io; |
1957 | unsigned int sequential_io_avg; | 1025 | unsigned int sequential_io_avg; |
1958 | #endif | 1026 | #endif |
1959 | #ifdef CONFIG_DEBUG_ATOMIC_SLEEP | 1027 | #ifdef CONFIG_DEBUG_ATOMIC_SLEEP |
1960 | unsigned long task_state_change; | 1028 | unsigned long task_state_change; |
1961 | #endif | 1029 | #endif |
1962 | int pagefault_disabled; | 1030 | int pagefault_disabled; |
1963 | #ifdef CONFIG_MMU | 1031 | #ifdef CONFIG_MMU |
1964 | struct task_struct *oom_reaper_list; | 1032 | struct task_struct *oom_reaper_list; |
1965 | #endif | 1033 | #endif |
1966 | #ifdef CONFIG_VMAP_STACK | 1034 | #ifdef CONFIG_VMAP_STACK |
1967 | struct vm_struct *stack_vm_area; | 1035 | struct vm_struct *stack_vm_area; |
1968 | #endif | 1036 | #endif |
1969 | #ifdef CONFIG_THREAD_INFO_IN_TASK | 1037 | #ifdef CONFIG_THREAD_INFO_IN_TASK |
1970 | /* A live task holds one reference. */ | 1038 | /* A live task holds one reference: */ |
1971 | atomic_t stack_refcount; | 1039 | atomic_t stack_refcount; |
1972 | #endif | 1040 | #endif |
1973 | /* CPU-specific state of this task */ | 1041 | /* CPU-specific state of this task: */ |
1974 | struct thread_struct thread; | 1042 | struct thread_struct thread; |
1975 | /* | ||
1976 | * WARNING: on x86, 'thread_struct' contains a variable-sized | ||
1977 | * structure. It *MUST* be at the end of 'task_struct'. | ||
1978 | * | ||
1979 | * Do not put anything below here! | ||
1980 | */ | ||
1981 | }; | ||
1982 | |||
1983 | #ifdef CONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT | ||
1984 | extern int arch_task_struct_size __read_mostly; | ||
1985 | #else | ||
1986 | # define arch_task_struct_size (sizeof(struct task_struct)) | ||
1987 | #endif | ||
1988 | |||
1989 | #ifdef CONFIG_VMAP_STACK | ||
1990 | static inline struct vm_struct *task_stack_vm_area(const struct task_struct *t) | ||
1991 | { | ||
1992 | return t->stack_vm_area; | ||
1993 | } | ||
1994 | #else | ||
1995 | static inline struct vm_struct *task_stack_vm_area(const struct task_struct *t) | ||
1996 | { | ||
1997 | return NULL; | ||
1998 | } | ||
1999 | #endif | ||
2000 | |||
2001 | /* Future-safe accessor for struct task_struct's cpus_allowed. */ | ||
2002 | #define tsk_cpus_allowed(tsk) (&(tsk)->cpus_allowed) | ||
2003 | |||
2004 | static inline int tsk_nr_cpus_allowed(struct task_struct *p) | ||
2005 | { | ||
2006 | return p->nr_cpus_allowed; | ||
2007 | } | ||
2008 | |||
2009 | #define TNF_MIGRATED 0x01 | ||
2010 | #define TNF_NO_GROUP 0x02 | ||
2011 | #define TNF_SHARED 0x04 | ||
2012 | #define TNF_FAULT_LOCAL 0x08 | ||
2013 | #define TNF_MIGRATE_FAIL 0x10 | ||
2014 | |||
2015 | static inline bool in_vfork(struct task_struct *tsk) | ||
2016 | { | ||
2017 | bool ret; | ||
2018 | 1043 | ||
2019 | /* | 1044 | /* |
2020 | * need RCU to access ->real_parent if CLONE_VM was used along with | 1045 | * WARNING: on x86, 'thread_struct' contains a variable-sized |
2021 | * CLONE_PARENT. | 1046 | * structure. It *MUST* be at the end of 'task_struct'. |
2022 | * | ||
2023 | * We check real_parent->mm == tsk->mm because CLONE_VFORK does not | ||
2024 | * imply CLONE_VM | ||
2025 | * | ||
2026 | * CLONE_VFORK can be used with CLONE_PARENT/CLONE_THREAD and thus | ||
2027 | * ->real_parent is not necessarily the task doing vfork(), so in | ||
2028 | * theory we can't rely on task_lock() if we want to dereference it. | ||
2029 | * | 1047 | * |
2030 | * And in this case we can't trust the real_parent->mm == tsk->mm | 1048 | * Do not put anything below here! |
2031 | * check, it can be false negative. But we do not care, if init or | ||
2032 | * another oom-unkillable task does this it should blame itself. | ||
2033 | */ | 1049 | */ |
2034 | rcu_read_lock(); | 1050 | }; |
2035 | ret = tsk->vfork_done && tsk->real_parent->mm == tsk->mm; | ||
2036 | rcu_read_unlock(); | ||
2037 | |||
2038 | return ret; | ||
2039 | } | ||
2040 | |||
2041 | #ifdef CONFIG_NUMA_BALANCING | ||
2042 | extern void task_numa_fault(int last_node, int node, int pages, int flags); | ||
2043 | extern pid_t task_numa_group_id(struct task_struct *p); | ||
2044 | extern void set_numabalancing_state(bool enabled); | ||
2045 | extern void task_numa_free(struct task_struct *p); | ||
2046 | extern bool should_numa_migrate_memory(struct task_struct *p, struct page *page, | ||
2047 | int src_nid, int dst_cpu); | ||
2048 | #else | ||
2049 | static inline void task_numa_fault(int last_node, int node, int pages, | ||
2050 | int flags) | ||
2051 | { | ||
2052 | } | ||
2053 | static inline pid_t task_numa_group_id(struct task_struct *p) | ||
2054 | { | ||
2055 | return 0; | ||
2056 | } | ||
2057 | static inline void set_numabalancing_state(bool enabled) | ||
2058 | { | ||
2059 | } | ||
2060 | static inline void task_numa_free(struct task_struct *p) | ||
2061 | { | ||
2062 | } | ||
2063 | static inline bool should_numa_migrate_memory(struct task_struct *p, | ||
2064 | struct page *page, int src_nid, int dst_cpu) | ||
2065 | { | ||
2066 | return true; | ||
2067 | } | ||
2068 | #endif | ||
2069 | 1051 | ||
2070 | static inline struct pid *task_pid(struct task_struct *task) | 1052 | static inline struct pid *task_pid(struct task_struct *task) |
2071 | { | 1053 | { |
@@ -2078,7 +1060,7 @@ static inline struct pid *task_tgid(struct task_struct *task) | |||
2078 | } | 1060 | } |
2079 | 1061 | ||
2080 | /* | 1062 | /* |
2081 | * Without tasklist or rcu lock it is not safe to dereference | 1063 | * Without tasklist or RCU lock it is not safe to dereference |
2082 | * the result of task_pgrp/task_session even if task == current, | 1064 | * the result of task_pgrp/task_session even if task == current, |
2083 | * we can race with another thread doing sys_setsid/sys_setpgid. | 1065 | * we can race with another thread doing sys_setsid/sys_setpgid. |
2084 | */ | 1066 | */ |
@@ -2092,8 +1074,6 @@ static inline struct pid *task_session(struct task_struct *task) | |||
2092 | return task->group_leader->pids[PIDTYPE_SID].pid; | 1074 | return task->group_leader->pids[PIDTYPE_SID].pid; |
2093 | } | 1075 | } |
2094 | 1076 | ||
2095 | struct pid_namespace; | ||
2096 | |||
2097 | /* | 1077 | /* |
2098 | * the helpers to get the task's different pids as they are seen | 1078 | * the helpers to get the task's different pids as they are seen |
2099 | * from various namespaces | 1079 | * from various namespaces |
@@ -2107,16 +1087,14 @@ struct pid_namespace; | |||
2107 | * | 1087 | * |
2108 | * see also pid_nr() etc in include/linux/pid.h | 1088 | * see also pid_nr() etc in include/linux/pid.h |
2109 | */ | 1089 | */ |
2110 | pid_t __task_pid_nr_ns(struct task_struct *task, enum pid_type type, | 1090 | pid_t __task_pid_nr_ns(struct task_struct *task, enum pid_type type, struct pid_namespace *ns); |
2111 | struct pid_namespace *ns); | ||
2112 | 1091 | ||
2113 | static inline pid_t task_pid_nr(struct task_struct *tsk) | 1092 | static inline pid_t task_pid_nr(struct task_struct *tsk) |
2114 | { | 1093 | { |
2115 | return tsk->pid; | 1094 | return tsk->pid; |
2116 | } | 1095 | } |
2117 | 1096 | ||
2118 | static inline pid_t task_pid_nr_ns(struct task_struct *tsk, | 1097 | static inline pid_t task_pid_nr_ns(struct task_struct *tsk, struct pid_namespace *ns) |
2119 | struct pid_namespace *ns) | ||
2120 | { | 1098 | { |
2121 | return __task_pid_nr_ns(tsk, PIDTYPE_PID, ns); | 1099 | return __task_pid_nr_ns(tsk, PIDTYPE_PID, ns); |
2122 | } | 1100 | } |
@@ -2132,15 +1110,28 @@ static inline pid_t task_tgid_nr(struct task_struct *tsk) | |||
2132 | return tsk->tgid; | 1110 | return tsk->tgid; |
2133 | } | 1111 | } |
2134 | 1112 | ||
2135 | pid_t task_tgid_nr_ns(struct task_struct *tsk, struct pid_namespace *ns); | 1113 | extern pid_t task_tgid_nr_ns(struct task_struct *tsk, struct pid_namespace *ns); |
2136 | 1114 | ||
2137 | static inline pid_t task_tgid_vnr(struct task_struct *tsk) | 1115 | static inline pid_t task_tgid_vnr(struct task_struct *tsk) |
2138 | { | 1116 | { |
2139 | return pid_vnr(task_tgid(tsk)); | 1117 | return pid_vnr(task_tgid(tsk)); |
2140 | } | 1118 | } |
2141 | 1119 | ||
1120 | /** | ||
1121 | * pid_alive - check that a task structure is not stale | ||
1122 | * @p: Task structure to be checked. | ||
1123 | * | ||
1124 | * Test if a process is not yet dead (at most zombie state) | ||
1125 | * If pid_alive fails, then pointers within the task structure | ||
1126 | * can be stale and must not be dereferenced. | ||
1127 | * | ||
1128 | * Return: 1 if the process is alive. 0 otherwise. | ||
1129 | */ | ||
1130 | static inline int pid_alive(const struct task_struct *p) | ||
1131 | { | ||
1132 | return p->pids[PIDTYPE_PID].pid != NULL; | ||
1133 | } | ||
2142 | 1134 | ||
2143 | static inline int pid_alive(const struct task_struct *p); | ||
2144 | static inline pid_t task_ppid_nr_ns(const struct task_struct *tsk, struct pid_namespace *ns) | 1135 | static inline pid_t task_ppid_nr_ns(const struct task_struct *tsk, struct pid_namespace *ns) |
2145 | { | 1136 | { |
2146 | pid_t pid = 0; | 1137 | pid_t pid = 0; |
@@ -2158,8 +1149,7 @@ static inline pid_t task_ppid_nr(const struct task_struct *tsk) | |||
2158 | return task_ppid_nr_ns(tsk, &init_pid_ns); | 1149 | return task_ppid_nr_ns(tsk, &init_pid_ns); |
2159 | } | 1150 | } |
2160 | 1151 | ||
2161 | static inline pid_t task_pgrp_nr_ns(struct task_struct *tsk, | 1152 | static inline pid_t task_pgrp_nr_ns(struct task_struct *tsk, struct pid_namespace *ns) |
2162 | struct pid_namespace *ns) | ||
2163 | { | 1153 | { |
2164 | return __task_pid_nr_ns(tsk, PIDTYPE_PGID, ns); | 1154 | return __task_pid_nr_ns(tsk, PIDTYPE_PGID, ns); |
2165 | } | 1155 | } |
@@ -2170,8 +1160,7 @@ static inline pid_t task_pgrp_vnr(struct task_struct *tsk) | |||
2170 | } | 1160 | } |
2171 | 1161 | ||
2172 | 1162 | ||
2173 | static inline pid_t task_session_nr_ns(struct task_struct *tsk, | 1163 | static inline pid_t task_session_nr_ns(struct task_struct *tsk, struct pid_namespace *ns) |
2174 | struct pid_namespace *ns) | ||
2175 | { | 1164 | { |
2176 | return __task_pid_nr_ns(tsk, PIDTYPE_SID, ns); | 1165 | return __task_pid_nr_ns(tsk, PIDTYPE_SID, ns); |
2177 | } | 1166 | } |
@@ -2181,28 +1170,13 @@ static inline pid_t task_session_vnr(struct task_struct *tsk) | |||
2181 | return __task_pid_nr_ns(tsk, PIDTYPE_SID, NULL); | 1170 | return __task_pid_nr_ns(tsk, PIDTYPE_SID, NULL); |
2182 | } | 1171 | } |
2183 | 1172 | ||
2184 | /* obsolete, do not use */ | 1173 | /* Obsolete, do not use: */ |
2185 | static inline pid_t task_pgrp_nr(struct task_struct *tsk) | 1174 | static inline pid_t task_pgrp_nr(struct task_struct *tsk) |
2186 | { | 1175 | { |
2187 | return task_pgrp_nr_ns(tsk, &init_pid_ns); | 1176 | return task_pgrp_nr_ns(tsk, &init_pid_ns); |
2188 | } | 1177 | } |
2189 | 1178 | ||
2190 | /** | 1179 | /** |
2191 | * pid_alive - check that a task structure is not stale | ||
2192 | * @p: Task structure to be checked. | ||
2193 | * | ||
2194 | * Test if a process is not yet dead (at most zombie state) | ||
2195 | * If pid_alive fails, then pointers within the task structure | ||
2196 | * can be stale and must not be dereferenced. | ||
2197 | * | ||
2198 | * Return: 1 if the process is alive. 0 otherwise. | ||
2199 | */ | ||
2200 | static inline int pid_alive(const struct task_struct *p) | ||
2201 | { | ||
2202 | return p->pids[PIDTYPE_PID].pid != NULL; | ||
2203 | } | ||
2204 | |||
2205 | /** | ||
2206 | * is_global_init - check if a task structure is init. Since init | 1180 | * is_global_init - check if a task structure is init. Since init |
2207 | * is free to have sub-threads we need to check tgid. | 1181 | * is free to have sub-threads we need to check tgid. |
2208 | * @tsk: Task structure to be checked. | 1182 | * @tsk: Task structure to be checked. |
@@ -2218,89 +1192,37 @@ static inline int is_global_init(struct task_struct *tsk) | |||
2218 | 1192 | ||
2219 | extern struct pid *cad_pid; | 1193 | extern struct pid *cad_pid; |
2220 | 1194 | ||
2221 | extern void free_task(struct task_struct *tsk); | ||
2222 | #define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0) | ||
2223 | |||
2224 | extern void __put_task_struct(struct task_struct *t); | ||
2225 | |||
2226 | static inline void put_task_struct(struct task_struct *t) | ||
2227 | { | ||
2228 | if (atomic_dec_and_test(&t->usage)) | ||
2229 | __put_task_struct(t); | ||
2230 | } | ||
2231 | |||
2232 | struct task_struct *task_rcu_dereference(struct task_struct **ptask); | ||
2233 | struct task_struct *try_get_task_struct(struct task_struct **ptask); | ||
2234 | |||
2235 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN | ||
2236 | extern void task_cputime(struct task_struct *t, | ||
2237 | u64 *utime, u64 *stime); | ||
2238 | extern u64 task_gtime(struct task_struct *t); | ||
2239 | #else | ||
2240 | static inline void task_cputime(struct task_struct *t, | ||
2241 | u64 *utime, u64 *stime) | ||
2242 | { | ||
2243 | *utime = t->utime; | ||
2244 | *stime = t->stime; | ||
2245 | } | ||
2246 | |||
2247 | static inline u64 task_gtime(struct task_struct *t) | ||
2248 | { | ||
2249 | return t->gtime; | ||
2250 | } | ||
2251 | #endif | ||
2252 | |||
2253 | #ifdef CONFIG_ARCH_HAS_SCALED_CPUTIME | ||
2254 | static inline void task_cputime_scaled(struct task_struct *t, | ||
2255 | u64 *utimescaled, | ||
2256 | u64 *stimescaled) | ||
2257 | { | ||
2258 | *utimescaled = t->utimescaled; | ||
2259 | *stimescaled = t->stimescaled; | ||
2260 | } | ||
2261 | #else | ||
2262 | static inline void task_cputime_scaled(struct task_struct *t, | ||
2263 | u64 *utimescaled, | ||
2264 | u64 *stimescaled) | ||
2265 | { | ||
2266 | task_cputime(t, utimescaled, stimescaled); | ||
2267 | } | ||
2268 | #endif | ||
2269 | |||
2270 | extern void task_cputime_adjusted(struct task_struct *p, u64 *ut, u64 *st); | ||
2271 | extern void thread_group_cputime_adjusted(struct task_struct *p, u64 *ut, u64 *st); | ||
2272 | |||
2273 | /* | 1195 | /* |
2274 | * Per process flags | 1196 | * Per process flags |
2275 | */ | 1197 | */ |
2276 | #define PF_IDLE 0x00000002 /* I am an IDLE thread */ | 1198 | #define PF_IDLE 0x00000002 /* I am an IDLE thread */ |
2277 | #define PF_EXITING 0x00000004 /* getting shut down */ | 1199 | #define PF_EXITING 0x00000004 /* Getting shut down */ |
2278 | #define PF_EXITPIDONE 0x00000008 /* pi exit done on shut down */ | 1200 | #define PF_EXITPIDONE 0x00000008 /* PI exit done on shut down */ |
2279 | #define PF_VCPU 0x00000010 /* I'm a virtual CPU */ | 1201 | #define PF_VCPU 0x00000010 /* I'm a virtual CPU */ |
2280 | #define PF_WQ_WORKER 0x00000020 /* I'm a workqueue worker */ | 1202 | #define PF_WQ_WORKER 0x00000020 /* I'm a workqueue worker */ |
2281 | #define PF_FORKNOEXEC 0x00000040 /* forked but didn't exec */ | 1203 | #define PF_FORKNOEXEC 0x00000040 /* Forked but didn't exec */ |
2282 | #define PF_MCE_PROCESS 0x00000080 /* process policy on mce errors */ | 1204 | #define PF_MCE_PROCESS 0x00000080 /* Process policy on mce errors */ |
2283 | #define PF_SUPERPRIV 0x00000100 /* used super-user privileges */ | 1205 | #define PF_SUPERPRIV 0x00000100 /* Used super-user privileges */ |
2284 | #define PF_DUMPCORE 0x00000200 /* dumped core */ | 1206 | #define PF_DUMPCORE 0x00000200 /* Dumped core */ |
2285 | #define PF_SIGNALED 0x00000400 /* killed by a signal */ | 1207 | #define PF_SIGNALED 0x00000400 /* Killed by a signal */ |
2286 | #define PF_MEMALLOC 0x00000800 /* Allocating memory */ | 1208 | #define PF_MEMALLOC 0x00000800 /* Allocating memory */ |
2287 | #define PF_NPROC_EXCEEDED 0x00001000 /* set_user noticed that RLIMIT_NPROC was exceeded */ | 1209 | #define PF_NPROC_EXCEEDED 0x00001000 /* set_user() noticed that RLIMIT_NPROC was exceeded */ |
2288 | #define PF_USED_MATH 0x00002000 /* if unset the fpu must be initialized before use */ | 1210 | #define PF_USED_MATH 0x00002000 /* If unset the fpu must be initialized before use */ |
2289 | #define PF_USED_ASYNC 0x00004000 /* used async_schedule*(), used by module init */ | 1211 | #define PF_USED_ASYNC 0x00004000 /* Used async_schedule*(), used by module init */ |
2290 | #define PF_NOFREEZE 0x00008000 /* this thread should not be frozen */ | 1212 | #define PF_NOFREEZE 0x00008000 /* This thread should not be frozen */ |
2291 | #define PF_FROZEN 0x00010000 /* frozen for system suspend */ | 1213 | #define PF_FROZEN 0x00010000 /* Frozen for system suspend */ |
2292 | #define PF_FSTRANS 0x00020000 /* inside a filesystem transaction */ | 1214 | #define PF_FSTRANS 0x00020000 /* Inside a filesystem transaction */ |
2293 | #define PF_KSWAPD 0x00040000 /* I am kswapd */ | 1215 | #define PF_KSWAPD 0x00040000 /* I am kswapd */ |
2294 | #define PF_MEMALLOC_NOIO 0x00080000 /* Allocating memory without IO involved */ | 1216 | #define PF_MEMALLOC_NOIO 0x00080000 /* Allocating memory without IO involved */ |
2295 | #define PF_LESS_THROTTLE 0x00100000 /* Throttle me less: I clean memory */ | 1217 | #define PF_LESS_THROTTLE 0x00100000 /* Throttle me less: I clean memory */ |
2296 | #define PF_KTHREAD 0x00200000 /* I am a kernel thread */ | 1218 | #define PF_KTHREAD 0x00200000 /* I am a kernel thread */ |
2297 | #define PF_RANDOMIZE 0x00400000 /* randomize virtual address space */ | 1219 | #define PF_RANDOMIZE 0x00400000 /* Randomize virtual address space */ |
2298 | #define PF_SWAPWRITE 0x00800000 /* Allowed to write to swap */ | 1220 | #define PF_SWAPWRITE 0x00800000 /* Allowed to write to swap */ |
2299 | #define PF_NO_SETAFFINITY 0x04000000 /* Userland is not allowed to meddle with cpus_allowed */ | 1221 | #define PF_NO_SETAFFINITY 0x04000000 /* Userland is not allowed to meddle with cpus_allowed */ |
2300 | #define PF_MCE_EARLY 0x08000000 /* Early kill for mce process policy */ | 1222 | #define PF_MCE_EARLY 0x08000000 /* Early kill for mce process policy */ |
2301 | #define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */ | 1223 | #define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */ |
2302 | #define PF_FREEZER_SKIP 0x40000000 /* Freezer should not count it as freezable */ | 1224 | #define PF_FREEZER_SKIP 0x40000000 /* Freezer should not count it as freezable */ |
2303 | #define PF_SUSPEND_TASK 0x80000000 /* this thread called freeze_processes and should not be frozen */ | 1225 | #define PF_SUSPEND_TASK 0x80000000 /* This thread called freeze_processes() and should not be frozen */ |
2304 | 1226 | ||
2305 | /* | 1227 | /* |
2306 | * Only the _current_ task can read/write to tsk->flags, but other | 1228 | * Only the _current_ task can read/write to tsk->flags, but other |
@@ -2313,55 +1235,38 @@ extern void thread_group_cputime_adjusted(struct task_struct *p, u64 *ut, u64 *s | |||
2313 | * child is not running and in turn not changing child->flags | 1235 | * child is not running and in turn not changing child->flags |
2314 | * at the same time the parent does it. | 1236 | * at the same time the parent does it. |
2315 | */ | 1237 | */ |
2316 | #define clear_stopped_child_used_math(child) do { (child)->flags &= ~PF_USED_MATH; } while (0) | 1238 | #define clear_stopped_child_used_math(child) do { (child)->flags &= ~PF_USED_MATH; } while (0) |
2317 | #define set_stopped_child_used_math(child) do { (child)->flags |= PF_USED_MATH; } while (0) | 1239 | #define set_stopped_child_used_math(child) do { (child)->flags |= PF_USED_MATH; } while (0) |
2318 | #define clear_used_math() clear_stopped_child_used_math(current) | 1240 | #define clear_used_math() clear_stopped_child_used_math(current) |
2319 | #define set_used_math() set_stopped_child_used_math(current) | 1241 | #define set_used_math() set_stopped_child_used_math(current) |
1242 | |||
2320 | #define conditional_stopped_child_used_math(condition, child) \ | 1243 | #define conditional_stopped_child_used_math(condition, child) \ |
2321 | do { (child)->flags &= ~PF_USED_MATH, (child)->flags |= (condition) ? PF_USED_MATH : 0; } while (0) | 1244 | do { (child)->flags &= ~PF_USED_MATH, (child)->flags |= (condition) ? PF_USED_MATH : 0; } while (0) |
2322 | #define conditional_used_math(condition) \ | ||
2323 | conditional_stopped_child_used_math(condition, current) | ||
2324 | #define copy_to_stopped_child_used_math(child) \ | ||
2325 | do { (child)->flags &= ~PF_USED_MATH, (child)->flags |= current->flags & PF_USED_MATH; } while (0) | ||
2326 | /* NOTE: this will return 0 or PF_USED_MATH, it will never return 1 */ | ||
2327 | #define tsk_used_math(p) ((p)->flags & PF_USED_MATH) | ||
2328 | #define used_math() tsk_used_math(current) | ||
2329 | 1245 | ||
2330 | /* __GFP_IO isn't allowed if PF_MEMALLOC_NOIO is set in current->flags | 1246 | #define conditional_used_math(condition) conditional_stopped_child_used_math(condition, current) |
2331 | * __GFP_FS is also cleared as it implies __GFP_IO. | ||
2332 | */ | ||
2333 | static inline gfp_t memalloc_noio_flags(gfp_t flags) | ||
2334 | { | ||
2335 | if (unlikely(current->flags & PF_MEMALLOC_NOIO)) | ||
2336 | flags &= ~(__GFP_IO | __GFP_FS); | ||
2337 | return flags; | ||
2338 | } | ||
2339 | 1247 | ||
2340 | static inline unsigned int memalloc_noio_save(void) | 1248 | #define copy_to_stopped_child_used_math(child) \ |
2341 | { | 1249 | do { (child)->flags &= ~PF_USED_MATH, (child)->flags |= current->flags & PF_USED_MATH; } while (0) |
2342 | unsigned int flags = current->flags & PF_MEMALLOC_NOIO; | ||
2343 | current->flags |= PF_MEMALLOC_NOIO; | ||
2344 | return flags; | ||
2345 | } | ||
2346 | 1250 | ||
2347 | static inline void memalloc_noio_restore(unsigned int flags) | 1251 | /* NOTE: this will return 0 or PF_USED_MATH, it will never return 1 */ |
2348 | { | 1252 | #define tsk_used_math(p) ((p)->flags & PF_USED_MATH) |
2349 | current->flags = (current->flags & ~PF_MEMALLOC_NOIO) | flags; | 1253 | #define used_math() tsk_used_math(current) |
2350 | } | ||
2351 | 1254 | ||
2352 | /* Per-process atomic flags. */ | 1255 | /* Per-process atomic flags. */ |
2353 | #define PFA_NO_NEW_PRIVS 0 /* May not gain new privileges. */ | 1256 | #define PFA_NO_NEW_PRIVS 0 /* May not gain new privileges. */ |
2354 | #define PFA_SPREAD_PAGE 1 /* Spread page cache over cpuset */ | 1257 | #define PFA_SPREAD_PAGE 1 /* Spread page cache over cpuset */ |
2355 | #define PFA_SPREAD_SLAB 2 /* Spread some slab caches over cpuset */ | 1258 | #define PFA_SPREAD_SLAB 2 /* Spread some slab caches over cpuset */ |
2356 | #define PFA_LMK_WAITING 3 /* Lowmemorykiller is waiting */ | 1259 | #define PFA_LMK_WAITING 3 /* Lowmemorykiller is waiting */ |
2357 | 1260 | ||
2358 | 1261 | ||
2359 | #define TASK_PFA_TEST(name, func) \ | 1262 | #define TASK_PFA_TEST(name, func) \ |
2360 | static inline bool task_##func(struct task_struct *p) \ | 1263 | static inline bool task_##func(struct task_struct *p) \ |
2361 | { return test_bit(PFA_##name, &p->atomic_flags); } | 1264 | { return test_bit(PFA_##name, &p->atomic_flags); } |
1265 | |||
2362 | #define TASK_PFA_SET(name, func) \ | 1266 | #define TASK_PFA_SET(name, func) \ |
2363 | static inline void task_set_##func(struct task_struct *p) \ | 1267 | static inline void task_set_##func(struct task_struct *p) \ |
2364 | { set_bit(PFA_##name, &p->atomic_flags); } | 1268 | { set_bit(PFA_##name, &p->atomic_flags); } |
1269 | |||
2365 | #define TASK_PFA_CLEAR(name, func) \ | 1270 | #define TASK_PFA_CLEAR(name, func) \ |
2366 | static inline void task_clear_##func(struct task_struct *p) \ | 1271 | static inline void task_clear_##func(struct task_struct *p) \ |
2367 | { clear_bit(PFA_##name, &p->atomic_flags); } | 1272 | { clear_bit(PFA_##name, &p->atomic_flags); } |
@@ -2380,75 +1285,23 @@ TASK_PFA_CLEAR(SPREAD_SLAB, spread_slab) | |||
2380 | TASK_PFA_TEST(LMK_WAITING, lmk_waiting) | 1285 | TASK_PFA_TEST(LMK_WAITING, lmk_waiting) |
2381 | TASK_PFA_SET(LMK_WAITING, lmk_waiting) | 1286 | TASK_PFA_SET(LMK_WAITING, lmk_waiting) |
2382 | 1287 | ||
2383 | /* | 1288 | static inline void |
2384 | * task->jobctl flags | 1289 | tsk_restore_flags(struct task_struct *task, unsigned long orig_flags, unsigned long flags) |
2385 | */ | ||
2386 | #define JOBCTL_STOP_SIGMASK 0xffff /* signr of the last group stop */ | ||
2387 | |||
2388 | #define JOBCTL_STOP_DEQUEUED_BIT 16 /* stop signal dequeued */ | ||
2389 | #define JOBCTL_STOP_PENDING_BIT 17 /* task should stop for group stop */ | ||
2390 | #define JOBCTL_STOP_CONSUME_BIT 18 /* consume group stop count */ | ||
2391 | #define JOBCTL_TRAP_STOP_BIT 19 /* trap for STOP */ | ||
2392 | #define JOBCTL_TRAP_NOTIFY_BIT 20 /* trap for NOTIFY */ | ||
2393 | #define JOBCTL_TRAPPING_BIT 21 /* switching to TRACED */ | ||
2394 | #define JOBCTL_LISTENING_BIT 22 /* ptracer is listening for events */ | ||
2395 | |||
2396 | #define JOBCTL_STOP_DEQUEUED (1UL << JOBCTL_STOP_DEQUEUED_BIT) | ||
2397 | #define JOBCTL_STOP_PENDING (1UL << JOBCTL_STOP_PENDING_BIT) | ||
2398 | #define JOBCTL_STOP_CONSUME (1UL << JOBCTL_STOP_CONSUME_BIT) | ||
2399 | #define JOBCTL_TRAP_STOP (1UL << JOBCTL_TRAP_STOP_BIT) | ||
2400 | #define JOBCTL_TRAP_NOTIFY (1UL << JOBCTL_TRAP_NOTIFY_BIT) | ||
2401 | #define JOBCTL_TRAPPING (1UL << JOBCTL_TRAPPING_BIT) | ||
2402 | #define JOBCTL_LISTENING (1UL << JOBCTL_LISTENING_BIT) | ||
2403 | |||
2404 | #define JOBCTL_TRAP_MASK (JOBCTL_TRAP_STOP | JOBCTL_TRAP_NOTIFY) | ||
2405 | #define JOBCTL_PENDING_MASK (JOBCTL_STOP_PENDING | JOBCTL_TRAP_MASK) | ||
2406 | |||
2407 | extern bool task_set_jobctl_pending(struct task_struct *task, | ||
2408 | unsigned long mask); | ||
2409 | extern void task_clear_jobctl_trapping(struct task_struct *task); | ||
2410 | extern void task_clear_jobctl_pending(struct task_struct *task, | ||
2411 | unsigned long mask); | ||
2412 | |||
2413 | static inline void rcu_copy_process(struct task_struct *p) | ||
2414 | { | ||
2415 | #ifdef CONFIG_PREEMPT_RCU | ||
2416 | p->rcu_read_lock_nesting = 0; | ||
2417 | p->rcu_read_unlock_special.s = 0; | ||
2418 | p->rcu_blocked_node = NULL; | ||
2419 | INIT_LIST_HEAD(&p->rcu_node_entry); | ||
2420 | #endif /* #ifdef CONFIG_PREEMPT_RCU */ | ||
2421 | #ifdef CONFIG_TASKS_RCU | ||
2422 | p->rcu_tasks_holdout = false; | ||
2423 | INIT_LIST_HEAD(&p->rcu_tasks_holdout_list); | ||
2424 | p->rcu_tasks_idle_cpu = -1; | ||
2425 | #endif /* #ifdef CONFIG_TASKS_RCU */ | ||
2426 | } | ||
2427 | |||
2428 | static inline void tsk_restore_flags(struct task_struct *task, | ||
2429 | unsigned long orig_flags, unsigned long flags) | ||
2430 | { | 1290 | { |
2431 | task->flags &= ~flags; | 1291 | task->flags &= ~flags; |
2432 | task->flags |= orig_flags & flags; | 1292 | task->flags |= orig_flags & flags; |
2433 | } | 1293 | } |
2434 | 1294 | ||
2435 | extern int cpuset_cpumask_can_shrink(const struct cpumask *cur, | 1295 | extern int cpuset_cpumask_can_shrink(const struct cpumask *cur, const struct cpumask *trial); |
2436 | const struct cpumask *trial); | 1296 | extern int task_can_attach(struct task_struct *p, const struct cpumask *cs_cpus_allowed); |
2437 | extern int task_can_attach(struct task_struct *p, | ||
2438 | const struct cpumask *cs_cpus_allowed); | ||
2439 | #ifdef CONFIG_SMP | 1297 | #ifdef CONFIG_SMP |
2440 | extern void do_set_cpus_allowed(struct task_struct *p, | 1298 | extern void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask); |
2441 | const struct cpumask *new_mask); | 1299 | extern int set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask); |
2442 | |||
2443 | extern int set_cpus_allowed_ptr(struct task_struct *p, | ||
2444 | const struct cpumask *new_mask); | ||
2445 | #else | 1300 | #else |
2446 | static inline void do_set_cpus_allowed(struct task_struct *p, | 1301 | static inline void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask) |
2447 | const struct cpumask *new_mask) | ||
2448 | { | 1302 | { |
2449 | } | 1303 | } |
2450 | static inline int set_cpus_allowed_ptr(struct task_struct *p, | 1304 | static inline int set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask) |
2451 | const struct cpumask *new_mask) | ||
2452 | { | 1305 | { |
2453 | if (!cpumask_test_cpu(0, new_mask)) | 1306 | if (!cpumask_test_cpu(0, new_mask)) |
2454 | return -EINVAL; | 1307 | return -EINVAL; |
@@ -2456,165 +1309,14 @@ static inline int set_cpus_allowed_ptr(struct task_struct *p, | |||
2456 | } | 1309 | } |
2457 | #endif | 1310 | #endif |
2458 | 1311 | ||
2459 | #ifdef CONFIG_NO_HZ_COMMON | ||
2460 | void calc_load_enter_idle(void); | ||
2461 | void calc_load_exit_idle(void); | ||
2462 | #else | ||
2463 | static inline void calc_load_enter_idle(void) { } | ||
2464 | static inline void calc_load_exit_idle(void) { } | ||
2465 | #endif /* CONFIG_NO_HZ_COMMON */ | ||
2466 | |||
2467 | #ifndef cpu_relax_yield | 1312 | #ifndef cpu_relax_yield |
2468 | #define cpu_relax_yield() cpu_relax() | 1313 | #define cpu_relax_yield() cpu_relax() |
2469 | #endif | 1314 | #endif |
2470 | 1315 | ||
2471 | /* | ||
2472 | * Do not use outside of architecture code which knows its limitations. | ||
2473 | * | ||
2474 | * sched_clock() has no promise of monotonicity or bounded drift between | ||
2475 | * CPUs, use (which you should not) requires disabling IRQs. | ||
2476 | * | ||
2477 | * Please use one of the three interfaces below. | ||
2478 | */ | ||
2479 | extern unsigned long long notrace sched_clock(void); | ||
2480 | /* | ||
2481 | * See the comment in kernel/sched/clock.c | ||
2482 | */ | ||
2483 | extern u64 running_clock(void); | ||
2484 | extern u64 sched_clock_cpu(int cpu); | ||
2485 | |||
2486 | |||
2487 | extern void sched_clock_init(void); | ||
2488 | |||
2489 | #ifndef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK | ||
2490 | static inline void sched_clock_init_late(void) | ||
2491 | { | ||
2492 | } | ||
2493 | |||
2494 | static inline void sched_clock_tick(void) | ||
2495 | { | ||
2496 | } | ||
2497 | |||
2498 | static inline void clear_sched_clock_stable(void) | ||
2499 | { | ||
2500 | } | ||
2501 | |||
2502 | static inline void sched_clock_idle_sleep_event(void) | ||
2503 | { | ||
2504 | } | ||
2505 | |||
2506 | static inline void sched_clock_idle_wakeup_event(u64 delta_ns) | ||
2507 | { | ||
2508 | } | ||
2509 | |||
2510 | static inline u64 cpu_clock(int cpu) | ||
2511 | { | ||
2512 | return sched_clock(); | ||
2513 | } | ||
2514 | |||
2515 | static inline u64 local_clock(void) | ||
2516 | { | ||
2517 | return sched_clock(); | ||
2518 | } | ||
2519 | #else | ||
2520 | extern void sched_clock_init_late(void); | ||
2521 | /* | ||
2522 | * Architectures can set this to 1 if they have specified | ||
2523 | * CONFIG_HAVE_UNSTABLE_SCHED_CLOCK in their arch Kconfig, | ||
2524 | * but then during bootup it turns out that sched_clock() | ||
2525 | * is reliable after all: | ||
2526 | */ | ||
2527 | extern int sched_clock_stable(void); | ||
2528 | extern void clear_sched_clock_stable(void); | ||
2529 | |||
2530 | extern void sched_clock_tick(void); | ||
2531 | extern void sched_clock_idle_sleep_event(void); | ||
2532 | extern void sched_clock_idle_wakeup_event(u64 delta_ns); | ||
2533 | |||
2534 | /* | ||
2535 | * As outlined in clock.c, provides a fast, high resolution, nanosecond | ||
2536 | * time source that is monotonic per cpu argument and has bounded drift | ||
2537 | * between cpus. | ||
2538 | * | ||
2539 | * ######################### BIG FAT WARNING ########################## | ||
2540 | * # when comparing cpu_clock(i) to cpu_clock(j) for i != j, time can # | ||
2541 | * # go backwards !! # | ||
2542 | * #################################################################### | ||
2543 | */ | ||
2544 | static inline u64 cpu_clock(int cpu) | ||
2545 | { | ||
2546 | return sched_clock_cpu(cpu); | ||
2547 | } | ||
2548 | |||
2549 | static inline u64 local_clock(void) | ||
2550 | { | ||
2551 | return sched_clock_cpu(raw_smp_processor_id()); | ||
2552 | } | ||
2553 | #endif | ||
2554 | |||
2555 | #ifdef CONFIG_IRQ_TIME_ACCOUNTING | ||
2556 | /* | ||
2557 | * An i/f to runtime opt-in for irq time accounting based off of sched_clock. | ||
2558 | * The reason for this explicit opt-in is not to have perf penalty with | ||
2559 | * slow sched_clocks. | ||
2560 | */ | ||
2561 | extern void enable_sched_clock_irqtime(void); | ||
2562 | extern void disable_sched_clock_irqtime(void); | ||
2563 | #else | ||
2564 | static inline void enable_sched_clock_irqtime(void) {} | ||
2565 | static inline void disable_sched_clock_irqtime(void) {} | ||
2566 | #endif | ||
2567 | |||
2568 | extern unsigned long long | ||
2569 | task_sched_runtime(struct task_struct *task); | ||
2570 | |||
2571 | /* sched_exec is called by processes performing an exec */ | ||
2572 | #ifdef CONFIG_SMP | ||
2573 | extern void sched_exec(void); | ||
2574 | #else | ||
2575 | #define sched_exec() {} | ||
2576 | #endif | ||
2577 | |||
2578 | extern void sched_clock_idle_sleep_event(void); | ||
2579 | extern void sched_clock_idle_wakeup_event(u64 delta_ns); | ||
2580 | |||
2581 | #ifdef CONFIG_HOTPLUG_CPU | ||
2582 | extern void idle_task_exit(void); | ||
2583 | #else | ||
2584 | static inline void idle_task_exit(void) {} | ||
2585 | #endif | ||
2586 | |||
2587 | #if defined(CONFIG_NO_HZ_COMMON) && defined(CONFIG_SMP) | ||
2588 | extern void wake_up_nohz_cpu(int cpu); | ||
2589 | #else | ||
2590 | static inline void wake_up_nohz_cpu(int cpu) { } | ||
2591 | #endif | ||
2592 | |||
2593 | #ifdef CONFIG_NO_HZ_FULL | ||
2594 | extern u64 scheduler_tick_max_deferment(void); | ||
2595 | #endif | ||
2596 | |||
2597 | #ifdef CONFIG_SCHED_AUTOGROUP | ||
2598 | extern void sched_autogroup_create_attach(struct task_struct *p); | ||
2599 | extern void sched_autogroup_detach(struct task_struct *p); | ||
2600 | extern void sched_autogroup_fork(struct signal_struct *sig); | ||
2601 | extern void sched_autogroup_exit(struct signal_struct *sig); | ||
2602 | extern void sched_autogroup_exit_task(struct task_struct *p); | ||
2603 | #ifdef CONFIG_PROC_FS | ||
2604 | extern void proc_sched_autogroup_show_task(struct task_struct *p, struct seq_file *m); | ||
2605 | extern int proc_sched_autogroup_set_nice(struct task_struct *p, int nice); | ||
2606 | #endif | ||
2607 | #else | ||
2608 | static inline void sched_autogroup_create_attach(struct task_struct *p) { } | ||
2609 | static inline void sched_autogroup_detach(struct task_struct *p) { } | ||
2610 | static inline void sched_autogroup_fork(struct signal_struct *sig) { } | ||
2611 | static inline void sched_autogroup_exit(struct signal_struct *sig) { } | ||
2612 | static inline void sched_autogroup_exit_task(struct task_struct *p) { } | ||
2613 | #endif | ||
2614 | |||
2615 | extern int yield_to(struct task_struct *p, bool preempt); | 1316 | extern int yield_to(struct task_struct *p, bool preempt); |
2616 | extern void set_user_nice(struct task_struct *p, long nice); | 1317 | extern void set_user_nice(struct task_struct *p, long nice); |
2617 | extern int task_prio(const struct task_struct *p); | 1318 | extern int task_prio(const struct task_struct *p); |
1319 | |||
2618 | /** | 1320 | /** |
2619 | * task_nice - return the nice value of a given task. | 1321 | * task_nice - return the nice value of a given task. |
2620 | * @p: the task in question. | 1322 | * @p: the task in question. |
@@ -2625,16 +1327,15 @@ static inline int task_nice(const struct task_struct *p) | |||
2625 | { | 1327 | { |
2626 | return PRIO_TO_NICE((p)->static_prio); | 1328 | return PRIO_TO_NICE((p)->static_prio); |
2627 | } | 1329 | } |
1330 | |||
2628 | extern int can_nice(const struct task_struct *p, const int nice); | 1331 | extern int can_nice(const struct task_struct *p, const int nice); |
2629 | extern int task_curr(const struct task_struct *p); | 1332 | extern int task_curr(const struct task_struct *p); |
2630 | extern int idle_cpu(int cpu); | 1333 | extern int idle_cpu(int cpu); |
2631 | extern int sched_setscheduler(struct task_struct *, int, | 1334 | extern int sched_setscheduler(struct task_struct *, int, const struct sched_param *); |
2632 | const struct sched_param *); | 1335 | extern int sched_setscheduler_nocheck(struct task_struct *, int, const struct sched_param *); |
2633 | extern int sched_setscheduler_nocheck(struct task_struct *, int, | 1336 | extern int sched_setattr(struct task_struct *, const struct sched_attr *); |
2634 | const struct sched_param *); | ||
2635 | extern int sched_setattr(struct task_struct *, | ||
2636 | const struct sched_attr *); | ||
2637 | extern struct task_struct *idle_task(int cpu); | 1337 | extern struct task_struct *idle_task(int cpu); |
1338 | |||
2638 | /** | 1339 | /** |
2639 | * is_idle_task - is the specified task an idle task? | 1340 | * is_idle_task - is the specified task an idle task? |
2640 | * @p: the task in question. | 1341 | * @p: the task in question. |
@@ -2645,6 +1346,7 @@ static inline bool is_idle_task(const struct task_struct *p) | |||
2645 | { | 1346 | { |
2646 | return !!(p->flags & PF_IDLE); | 1347 | return !!(p->flags & PF_IDLE); |
2647 | } | 1348 | } |
1349 | |||
2648 | extern struct task_struct *curr_task(int cpu); | 1350 | extern struct task_struct *curr_task(int cpu); |
2649 | extern void ia64_set_curr_task(int cpu, struct task_struct *p); | 1351 | extern void ia64_set_curr_task(int cpu, struct task_struct *p); |
2650 | 1352 | ||
@@ -2657,23 +1359,15 @@ union thread_union { | |||
2657 | unsigned long stack[THREAD_SIZE/sizeof(long)]; | 1359 | unsigned long stack[THREAD_SIZE/sizeof(long)]; |
2658 | }; | 1360 | }; |
2659 | 1361 | ||
2660 | #ifndef __HAVE_ARCH_KSTACK_END | 1362 | #ifdef CONFIG_THREAD_INFO_IN_TASK |
2661 | static inline int kstack_end(void *addr) | 1363 | static inline struct thread_info *task_thread_info(struct task_struct *task) |
2662 | { | 1364 | { |
2663 | /* Reliable end of stack detection: | 1365 | return &task->thread_info; |
2664 | * Some APM bios versions misalign the stack | ||
2665 | */ | ||
2666 | return !(((unsigned long)addr+sizeof(void*)-1) & (THREAD_SIZE-sizeof(void*))); | ||
2667 | } | 1366 | } |
1367 | #elif !defined(__HAVE_THREAD_FUNCTIONS) | ||
1368 | # define task_thread_info(task) ((struct thread_info *)(task)->stack) | ||
2668 | #endif | 1369 | #endif |
2669 | 1370 | ||
2670 | extern union thread_union init_thread_union; | ||
2671 | extern struct task_struct init_task; | ||
2672 | |||
2673 | extern struct mm_struct init_mm; | ||
2674 | |||
2675 | extern struct pid_namespace init_pid_ns; | ||
2676 | |||
2677 | /* | 1371 | /* |
2678 | * find a task by one of its numerical ids | 1372 | * find a task by one of its numerical ids |
2679 | * | 1373 | * |
@@ -2686,365 +1380,25 @@ extern struct pid_namespace init_pid_ns; | |||
2686 | */ | 1380 | */ |
2687 | 1381 | ||
2688 | extern struct task_struct *find_task_by_vpid(pid_t nr); | 1382 | extern struct task_struct *find_task_by_vpid(pid_t nr); |
2689 | extern struct task_struct *find_task_by_pid_ns(pid_t nr, | 1383 | extern struct task_struct *find_task_by_pid_ns(pid_t nr, struct pid_namespace *ns); |
2690 | struct pid_namespace *ns); | ||
2691 | |||
2692 | /* per-UID process charging. */ | ||
2693 | extern struct user_struct * alloc_uid(kuid_t); | ||
2694 | static inline struct user_struct *get_uid(struct user_struct *u) | ||
2695 | { | ||
2696 | atomic_inc(&u->__count); | ||
2697 | return u; | ||
2698 | } | ||
2699 | extern void free_uid(struct user_struct *); | ||
2700 | |||
2701 | #include <asm/current.h> | ||
2702 | |||
2703 | extern void xtime_update(unsigned long ticks); | ||
2704 | 1384 | ||
2705 | extern int wake_up_state(struct task_struct *tsk, unsigned int state); | 1385 | extern int wake_up_state(struct task_struct *tsk, unsigned int state); |
2706 | extern int wake_up_process(struct task_struct *tsk); | 1386 | extern int wake_up_process(struct task_struct *tsk); |
2707 | extern void wake_up_new_task(struct task_struct *tsk); | 1387 | extern void wake_up_new_task(struct task_struct *tsk); |
2708 | #ifdef CONFIG_SMP | ||
2709 | extern void kick_process(struct task_struct *tsk); | ||
2710 | #else | ||
2711 | static inline void kick_process(struct task_struct *tsk) { } | ||
2712 | #endif | ||
2713 | extern int sched_fork(unsigned long clone_flags, struct task_struct *p); | ||
2714 | extern void sched_dead(struct task_struct *p); | ||
2715 | |||
2716 | extern void proc_caches_init(void); | ||
2717 | extern void flush_signals(struct task_struct *); | ||
2718 | extern void ignore_signals(struct task_struct *); | ||
2719 | extern void flush_signal_handlers(struct task_struct *, int force_default); | ||
2720 | extern int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info); | ||
2721 | |||
2722 | static inline int kernel_dequeue_signal(siginfo_t *info) | ||
2723 | { | ||
2724 | struct task_struct *tsk = current; | ||
2725 | siginfo_t __info; | ||
2726 | int ret; | ||
2727 | |||
2728 | spin_lock_irq(&tsk->sighand->siglock); | ||
2729 | ret = dequeue_signal(tsk, &tsk->blocked, info ?: &__info); | ||
2730 | spin_unlock_irq(&tsk->sighand->siglock); | ||
2731 | |||
2732 | return ret; | ||
2733 | } | ||
2734 | |||
2735 | static inline void kernel_signal_stop(void) | ||
2736 | { | ||
2737 | spin_lock_irq(¤t->sighand->siglock); | ||
2738 | if (current->jobctl & JOBCTL_STOP_DEQUEUED) | ||
2739 | __set_current_state(TASK_STOPPED); | ||
2740 | spin_unlock_irq(¤t->sighand->siglock); | ||
2741 | |||
2742 | schedule(); | ||
2743 | } | ||
2744 | |||
2745 | extern void release_task(struct task_struct * p); | ||
2746 | extern int send_sig_info(int, struct siginfo *, struct task_struct *); | ||
2747 | extern int force_sigsegv(int, struct task_struct *); | ||
2748 | extern int force_sig_info(int, struct siginfo *, struct task_struct *); | ||
2749 | extern int __kill_pgrp_info(int sig, struct siginfo *info, struct pid *pgrp); | ||
2750 | extern int kill_pid_info(int sig, struct siginfo *info, struct pid *pid); | ||
2751 | extern int kill_pid_info_as_cred(int, struct siginfo *, struct pid *, | ||
2752 | const struct cred *, u32); | ||
2753 | extern int kill_pgrp(struct pid *pid, int sig, int priv); | ||
2754 | extern int kill_pid(struct pid *pid, int sig, int priv); | ||
2755 | extern int kill_proc_info(int, struct siginfo *, pid_t); | ||
2756 | extern __must_check bool do_notify_parent(struct task_struct *, int); | ||
2757 | extern void __wake_up_parent(struct task_struct *p, struct task_struct *parent); | ||
2758 | extern void force_sig(int, struct task_struct *); | ||
2759 | extern int send_sig(int, struct task_struct *, int); | ||
2760 | extern int zap_other_threads(struct task_struct *p); | ||
2761 | extern struct sigqueue *sigqueue_alloc(void); | ||
2762 | extern void sigqueue_free(struct sigqueue *); | ||
2763 | extern int send_sigqueue(struct sigqueue *, struct task_struct *, int group); | ||
2764 | extern int do_sigaction(int, struct k_sigaction *, struct k_sigaction *); | ||
2765 | |||
2766 | #ifdef TIF_RESTORE_SIGMASK | ||
2767 | /* | ||
2768 | * Legacy restore_sigmask accessors. These are inefficient on | ||
2769 | * SMP architectures because they require atomic operations. | ||
2770 | */ | ||
2771 | |||
2772 | /** | ||
2773 | * set_restore_sigmask() - make sure saved_sigmask processing gets done | ||
2774 | * | ||
2775 | * This sets TIF_RESTORE_SIGMASK and ensures that the arch signal code | ||
2776 | * will run before returning to user mode, to process the flag. For | ||
2777 | * all callers, TIF_SIGPENDING is already set or it's no harm to set | ||
2778 | * it. TIF_RESTORE_SIGMASK need not be in the set of bits that the | ||
2779 | * arch code will notice on return to user mode, in case those bits | ||
2780 | * are scarce. We set TIF_SIGPENDING here to ensure that the arch | ||
2781 | * signal code always gets run when TIF_RESTORE_SIGMASK is set. | ||
2782 | */ | ||
2783 | static inline void set_restore_sigmask(void) | ||
2784 | { | ||
2785 | set_thread_flag(TIF_RESTORE_SIGMASK); | ||
2786 | WARN_ON(!test_thread_flag(TIF_SIGPENDING)); | ||
2787 | } | ||
2788 | static inline void clear_restore_sigmask(void) | ||
2789 | { | ||
2790 | clear_thread_flag(TIF_RESTORE_SIGMASK); | ||
2791 | } | ||
2792 | static inline bool test_restore_sigmask(void) | ||
2793 | { | ||
2794 | return test_thread_flag(TIF_RESTORE_SIGMASK); | ||
2795 | } | ||
2796 | static inline bool test_and_clear_restore_sigmask(void) | ||
2797 | { | ||
2798 | return test_and_clear_thread_flag(TIF_RESTORE_SIGMASK); | ||
2799 | } | ||
2800 | |||
2801 | #else /* TIF_RESTORE_SIGMASK */ | ||
2802 | |||
2803 | /* Higher-quality implementation, used if TIF_RESTORE_SIGMASK doesn't exist. */ | ||
2804 | static inline void set_restore_sigmask(void) | ||
2805 | { | ||
2806 | current->restore_sigmask = true; | ||
2807 | WARN_ON(!test_thread_flag(TIF_SIGPENDING)); | ||
2808 | } | ||
2809 | static inline void clear_restore_sigmask(void) | ||
2810 | { | ||
2811 | current->restore_sigmask = false; | ||
2812 | } | ||
2813 | static inline bool test_restore_sigmask(void) | ||
2814 | { | ||
2815 | return current->restore_sigmask; | ||
2816 | } | ||
2817 | static inline bool test_and_clear_restore_sigmask(void) | ||
2818 | { | ||
2819 | if (!current->restore_sigmask) | ||
2820 | return false; | ||
2821 | current->restore_sigmask = false; | ||
2822 | return true; | ||
2823 | } | ||
2824 | #endif | ||
2825 | |||
2826 | static inline void restore_saved_sigmask(void) | ||
2827 | { | ||
2828 | if (test_and_clear_restore_sigmask()) | ||
2829 | __set_current_blocked(¤t->saved_sigmask); | ||
2830 | } | ||
2831 | |||
2832 | static inline sigset_t *sigmask_to_save(void) | ||
2833 | { | ||
2834 | sigset_t *res = ¤t->blocked; | ||
2835 | if (unlikely(test_restore_sigmask())) | ||
2836 | res = ¤t->saved_sigmask; | ||
2837 | return res; | ||
2838 | } | ||
2839 | |||
2840 | static inline int kill_cad_pid(int sig, int priv) | ||
2841 | { | ||
2842 | return kill_pid(cad_pid, sig, priv); | ||
2843 | } | ||
2844 | |||
2845 | /* These can be the second arg to send_sig_info/send_group_sig_info. */ | ||
2846 | #define SEND_SIG_NOINFO ((struct siginfo *) 0) | ||
2847 | #define SEND_SIG_PRIV ((struct siginfo *) 1) | ||
2848 | #define SEND_SIG_FORCED ((struct siginfo *) 2) | ||
2849 | |||
2850 | /* | ||
2851 | * True if we are on the alternate signal stack. | ||
2852 | */ | ||
2853 | static inline int on_sig_stack(unsigned long sp) | ||
2854 | { | ||
2855 | /* | ||
2856 | * If the signal stack is SS_AUTODISARM then, by construction, we | ||
2857 | * can't be on the signal stack unless user code deliberately set | ||
2858 | * SS_AUTODISARM when we were already on it. | ||
2859 | * | ||
2860 | * This improves reliability: if user state gets corrupted such that | ||
2861 | * the stack pointer points very close to the end of the signal stack, | ||
2862 | * then this check will enable the signal to be handled anyway. | ||
2863 | */ | ||
2864 | if (current->sas_ss_flags & SS_AUTODISARM) | ||
2865 | return 0; | ||
2866 | |||
2867 | #ifdef CONFIG_STACK_GROWSUP | ||
2868 | return sp >= current->sas_ss_sp && | ||
2869 | sp - current->sas_ss_sp < current->sas_ss_size; | ||
2870 | #else | ||
2871 | return sp > current->sas_ss_sp && | ||
2872 | sp - current->sas_ss_sp <= current->sas_ss_size; | ||
2873 | #endif | ||
2874 | } | ||
2875 | |||
2876 | static inline int sas_ss_flags(unsigned long sp) | ||
2877 | { | ||
2878 | if (!current->sas_ss_size) | ||
2879 | return SS_DISABLE; | ||
2880 | |||
2881 | return on_sig_stack(sp) ? SS_ONSTACK : 0; | ||
2882 | } | ||
2883 | |||
2884 | static inline void sas_ss_reset(struct task_struct *p) | ||
2885 | { | ||
2886 | p->sas_ss_sp = 0; | ||
2887 | p->sas_ss_size = 0; | ||
2888 | p->sas_ss_flags = SS_DISABLE; | ||
2889 | } | ||
2890 | |||
2891 | static inline unsigned long sigsp(unsigned long sp, struct ksignal *ksig) | ||
2892 | { | ||
2893 | if (unlikely((ksig->ka.sa.sa_flags & SA_ONSTACK)) && ! sas_ss_flags(sp)) | ||
2894 | #ifdef CONFIG_STACK_GROWSUP | ||
2895 | return current->sas_ss_sp; | ||
2896 | #else | ||
2897 | return current->sas_ss_sp + current->sas_ss_size; | ||
2898 | #endif | ||
2899 | return sp; | ||
2900 | } | ||
2901 | |||
2902 | /* | ||
2903 | * Routines for handling mm_structs | ||
2904 | */ | ||
2905 | extern struct mm_struct * mm_alloc(void); | ||
2906 | |||
2907 | /** | ||
2908 | * mmgrab() - Pin a &struct mm_struct. | ||
2909 | * @mm: The &struct mm_struct to pin. | ||
2910 | * | ||
2911 | * Make sure that @mm will not get freed even after the owning task | ||
2912 | * exits. This doesn't guarantee that the associated address space | ||
2913 | * will still exist later on and mmget_not_zero() has to be used before | ||
2914 | * accessing it. | ||
2915 | * | ||
2916 | * This is a preferred way to to pin @mm for a longer/unbounded amount | ||
2917 | * of time. | ||
2918 | * | ||
2919 | * Use mmdrop() to release the reference acquired by mmgrab(). | ||
2920 | * | ||
2921 | * See also <Documentation/vm/active_mm.txt> for an in-depth explanation | ||
2922 | * of &mm_struct.mm_count vs &mm_struct.mm_users. | ||
2923 | */ | ||
2924 | static inline void mmgrab(struct mm_struct *mm) | ||
2925 | { | ||
2926 | atomic_inc(&mm->mm_count); | ||
2927 | } | ||
2928 | |||
2929 | /* mmdrop drops the mm and the page tables */ | ||
2930 | extern void __mmdrop(struct mm_struct *); | ||
2931 | static inline void mmdrop(struct mm_struct *mm) | ||
2932 | { | ||
2933 | if (unlikely(atomic_dec_and_test(&mm->mm_count))) | ||
2934 | __mmdrop(mm); | ||
2935 | } | ||
2936 | |||
2937 | static inline void mmdrop_async_fn(struct work_struct *work) | ||
2938 | { | ||
2939 | struct mm_struct *mm = container_of(work, struct mm_struct, async_put_work); | ||
2940 | __mmdrop(mm); | ||
2941 | } | ||
2942 | |||
2943 | static inline void mmdrop_async(struct mm_struct *mm) | ||
2944 | { | ||
2945 | if (unlikely(atomic_dec_and_test(&mm->mm_count))) { | ||
2946 | INIT_WORK(&mm->async_put_work, mmdrop_async_fn); | ||
2947 | schedule_work(&mm->async_put_work); | ||
2948 | } | ||
2949 | } | ||
2950 | |||
2951 | /** | ||
2952 | * mmget() - Pin the address space associated with a &struct mm_struct. | ||
2953 | * @mm: The address space to pin. | ||
2954 | * | ||
2955 | * Make sure that the address space of the given &struct mm_struct doesn't | ||
2956 | * go away. This does not protect against parts of the address space being | ||
2957 | * modified or freed, however. | ||
2958 | * | ||
2959 | * Never use this function to pin this address space for an | ||
2960 | * unbounded/indefinite amount of time. | ||
2961 | * | ||
2962 | * Use mmput() to release the reference acquired by mmget(). | ||
2963 | * | ||
2964 | * See also <Documentation/vm/active_mm.txt> for an in-depth explanation | ||
2965 | * of &mm_struct.mm_count vs &mm_struct.mm_users. | ||
2966 | */ | ||
2967 | static inline void mmget(struct mm_struct *mm) | ||
2968 | { | ||
2969 | atomic_inc(&mm->mm_users); | ||
2970 | } | ||
2971 | |||
2972 | static inline bool mmget_not_zero(struct mm_struct *mm) | ||
2973 | { | ||
2974 | return atomic_inc_not_zero(&mm->mm_users); | ||
2975 | } | ||
2976 | |||
2977 | /* mmput gets rid of the mappings and all user-space */ | ||
2978 | extern void mmput(struct mm_struct *); | ||
2979 | #ifdef CONFIG_MMU | ||
2980 | /* same as above but performs the slow path from the async context. Can | ||
2981 | * be called from the atomic context as well | ||
2982 | */ | ||
2983 | extern void mmput_async(struct mm_struct *); | ||
2984 | #endif | ||
2985 | |||
2986 | /* Grab a reference to a task's mm, if it is not already going away */ | ||
2987 | extern struct mm_struct *get_task_mm(struct task_struct *task); | ||
2988 | /* | ||
2989 | * Grab a reference to a task's mm, if it is not already going away | ||
2990 | * and ptrace_may_access with the mode parameter passed to it | ||
2991 | * succeeds. | ||
2992 | */ | ||
2993 | extern struct mm_struct *mm_access(struct task_struct *task, unsigned int mode); | ||
2994 | /* Remove the current tasks stale references to the old mm_struct */ | ||
2995 | extern void mm_release(struct task_struct *, struct mm_struct *); | ||
2996 | |||
2997 | #ifdef CONFIG_HAVE_COPY_THREAD_TLS | ||
2998 | extern int copy_thread_tls(unsigned long, unsigned long, unsigned long, | ||
2999 | struct task_struct *, unsigned long); | ||
3000 | #else | ||
3001 | extern int copy_thread(unsigned long, unsigned long, unsigned long, | ||
3002 | struct task_struct *); | ||
3003 | |||
3004 | /* Architectures that haven't opted into copy_thread_tls get the tls argument | ||
3005 | * via pt_regs, so ignore the tls argument passed via C. */ | ||
3006 | static inline int copy_thread_tls( | ||
3007 | unsigned long clone_flags, unsigned long sp, unsigned long arg, | ||
3008 | struct task_struct *p, unsigned long tls) | ||
3009 | { | ||
3010 | return copy_thread(clone_flags, sp, arg, p); | ||
3011 | } | ||
3012 | #endif | ||
3013 | extern void flush_thread(void); | ||
3014 | 1388 | ||
3015 | #ifdef CONFIG_HAVE_EXIT_THREAD | 1389 | #ifdef CONFIG_SMP |
3016 | extern void exit_thread(struct task_struct *tsk); | 1390 | extern void kick_process(struct task_struct *tsk); |
3017 | #else | 1391 | #else |
3018 | static inline void exit_thread(struct task_struct *tsk) | 1392 | static inline void kick_process(struct task_struct *tsk) { } |
3019 | { | ||
3020 | } | ||
3021 | #endif | 1393 | #endif |
3022 | 1394 | ||
3023 | extern void exit_files(struct task_struct *); | ||
3024 | extern void __cleanup_sighand(struct sighand_struct *); | ||
3025 | |||
3026 | extern void exit_itimers(struct signal_struct *); | ||
3027 | extern void flush_itimer_signals(void); | ||
3028 | |||
3029 | extern void do_group_exit(int); | ||
3030 | |||
3031 | extern int do_execve(struct filename *, | ||
3032 | const char __user * const __user *, | ||
3033 | const char __user * const __user *); | ||
3034 | extern int do_execveat(int, struct filename *, | ||
3035 | const char __user * const __user *, | ||
3036 | const char __user * const __user *, | ||
3037 | int); | ||
3038 | extern long _do_fork(unsigned long, unsigned long, unsigned long, int __user *, int __user *, unsigned long); | ||
3039 | extern long do_fork(unsigned long, unsigned long, unsigned long, int __user *, int __user *); | ||
3040 | struct task_struct *fork_idle(int); | ||
3041 | extern pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); | ||
3042 | |||
3043 | extern void __set_task_comm(struct task_struct *tsk, const char *from, bool exec); | 1395 | extern void __set_task_comm(struct task_struct *tsk, const char *from, bool exec); |
1396 | |||
3044 | static inline void set_task_comm(struct task_struct *tsk, const char *from) | 1397 | static inline void set_task_comm(struct task_struct *tsk, const char *from) |
3045 | { | 1398 | { |
3046 | __set_task_comm(tsk, from, false); | 1399 | __set_task_comm(tsk, from, false); |
3047 | } | 1400 | } |
1401 | |||
3048 | extern char *get_task_comm(char *to, struct task_struct *tsk); | 1402 | extern char *get_task_comm(char *to, struct task_struct *tsk); |
3049 | 1403 | ||
3050 | #ifdef CONFIG_SMP | 1404 | #ifdef CONFIG_SMP |
@@ -3052,263 +1406,15 @@ void scheduler_ipi(void); | |||
3052 | extern unsigned long wait_task_inactive(struct task_struct *, long match_state); | 1406 | extern unsigned long wait_task_inactive(struct task_struct *, long match_state); |
3053 | #else | 1407 | #else |
3054 | static inline void scheduler_ipi(void) { } | 1408 | static inline void scheduler_ipi(void) { } |
3055 | static inline unsigned long wait_task_inactive(struct task_struct *p, | 1409 | static inline unsigned long wait_task_inactive(struct task_struct *p, long match_state) |
3056 | long match_state) | ||
3057 | { | 1410 | { |
3058 | return 1; | 1411 | return 1; |
3059 | } | 1412 | } |
3060 | #endif | 1413 | #endif |
3061 | 1414 | ||
3062 | #define tasklist_empty() \ | ||
3063 | list_empty(&init_task.tasks) | ||
3064 | |||
3065 | #define next_task(p) \ | ||
3066 | list_entry_rcu((p)->tasks.next, struct task_struct, tasks) | ||
3067 | |||
3068 | #define for_each_process(p) \ | ||
3069 | for (p = &init_task ; (p = next_task(p)) != &init_task ; ) | ||
3070 | |||
3071 | extern bool current_is_single_threaded(void); | ||
3072 | |||
3073 | /* | ||
3074 | * Careful: do_each_thread/while_each_thread is a double loop so | ||
3075 | * 'break' will not work as expected - use goto instead. | ||
3076 | */ | ||
3077 | #define do_each_thread(g, t) \ | ||
3078 | for (g = t = &init_task ; (g = t = next_task(g)) != &init_task ; ) do | ||
3079 | |||
3080 | #define while_each_thread(g, t) \ | ||
3081 | while ((t = next_thread(t)) != g) | ||
3082 | |||
3083 | #define __for_each_thread(signal, t) \ | ||
3084 | list_for_each_entry_rcu(t, &(signal)->thread_head, thread_node) | ||
3085 | |||
3086 | #define for_each_thread(p, t) \ | ||
3087 | __for_each_thread((p)->signal, t) | ||
3088 | |||
3089 | /* Careful: this is a double loop, 'break' won't work as expected. */ | ||
3090 | #define for_each_process_thread(p, t) \ | ||
3091 | for_each_process(p) for_each_thread(p, t) | ||
3092 | |||
3093 | typedef int (*proc_visitor)(struct task_struct *p, void *data); | ||
3094 | void walk_process_tree(struct task_struct *top, proc_visitor, void *); | ||
3095 | |||
3096 | static inline int get_nr_threads(struct task_struct *tsk) | ||
3097 | { | ||
3098 | return tsk->signal->nr_threads; | ||
3099 | } | ||
3100 | |||
3101 | static inline bool thread_group_leader(struct task_struct *p) | ||
3102 | { | ||
3103 | return p->exit_signal >= 0; | ||
3104 | } | ||
3105 | |||
3106 | /* Do to the insanities of de_thread it is possible for a process | ||
3107 | * to have the pid of the thread group leader without actually being | ||
3108 | * the thread group leader. For iteration through the pids in proc | ||
3109 | * all we care about is that we have a task with the appropriate | ||
3110 | * pid, we don't actually care if we have the right task. | ||
3111 | */ | ||
3112 | static inline bool has_group_leader_pid(struct task_struct *p) | ||
3113 | { | ||
3114 | return task_pid(p) == p->signal->leader_pid; | ||
3115 | } | ||
3116 | |||
3117 | static inline | ||
3118 | bool same_thread_group(struct task_struct *p1, struct task_struct *p2) | ||
3119 | { | ||
3120 | return p1->signal == p2->signal; | ||
3121 | } | ||
3122 | |||
3123 | static inline struct task_struct *next_thread(const struct task_struct *p) | ||
3124 | { | ||
3125 | return list_entry_rcu(p->thread_group.next, | ||
3126 | struct task_struct, thread_group); | ||
3127 | } | ||
3128 | |||
3129 | static inline int thread_group_empty(struct task_struct *p) | ||
3130 | { | ||
3131 | return list_empty(&p->thread_group); | ||
3132 | } | ||
3133 | |||
3134 | #define delay_group_leader(p) \ | ||
3135 | (thread_group_leader(p) && !thread_group_empty(p)) | ||
3136 | |||
3137 | /* | ||
3138 | * Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring | ||
3139 | * subscriptions and synchronises with wait4(). Also used in procfs. Also | ||
3140 | * pins the final release of task.io_context. Also protects ->cpuset and | ||
3141 | * ->cgroup.subsys[]. And ->vfork_done. | ||
3142 | * | ||
3143 | * Nests both inside and outside of read_lock(&tasklist_lock). | ||
3144 | * It must not be nested with write_lock_irq(&tasklist_lock), | ||
3145 | * neither inside nor outside. | ||
3146 | */ | ||
3147 | static inline void task_lock(struct task_struct *p) | ||
3148 | { | ||
3149 | spin_lock(&p->alloc_lock); | ||
3150 | } | ||
3151 | |||
3152 | static inline void task_unlock(struct task_struct *p) | ||
3153 | { | ||
3154 | spin_unlock(&p->alloc_lock); | ||
3155 | } | ||
3156 | |||
3157 | extern struct sighand_struct *__lock_task_sighand(struct task_struct *tsk, | ||
3158 | unsigned long *flags); | ||
3159 | |||
3160 | static inline struct sighand_struct *lock_task_sighand(struct task_struct *tsk, | ||
3161 | unsigned long *flags) | ||
3162 | { | ||
3163 | struct sighand_struct *ret; | ||
3164 | |||
3165 | ret = __lock_task_sighand(tsk, flags); | ||
3166 | (void)__cond_lock(&tsk->sighand->siglock, ret); | ||
3167 | return ret; | ||
3168 | } | ||
3169 | |||
3170 | static inline void unlock_task_sighand(struct task_struct *tsk, | ||
3171 | unsigned long *flags) | ||
3172 | { | ||
3173 | spin_unlock_irqrestore(&tsk->sighand->siglock, *flags); | ||
3174 | } | ||
3175 | |||
3176 | /** | ||
3177 | * threadgroup_change_begin - mark the beginning of changes to a threadgroup | ||
3178 | * @tsk: task causing the changes | ||
3179 | * | ||
3180 | * All operations which modify a threadgroup - a new thread joining the | ||
3181 | * group, death of a member thread (the assertion of PF_EXITING) and | ||
3182 | * exec(2) dethreading the process and replacing the leader - are wrapped | ||
3183 | * by threadgroup_change_{begin|end}(). This is to provide a place which | ||
3184 | * subsystems needing threadgroup stability can hook into for | ||
3185 | * synchronization. | ||
3186 | */ | ||
3187 | static inline void threadgroup_change_begin(struct task_struct *tsk) | ||
3188 | { | ||
3189 | might_sleep(); | ||
3190 | cgroup_threadgroup_change_begin(tsk); | ||
3191 | } | ||
3192 | |||
3193 | /** | ||
3194 | * threadgroup_change_end - mark the end of changes to a threadgroup | ||
3195 | * @tsk: task causing the changes | ||
3196 | * | ||
3197 | * See threadgroup_change_begin(). | ||
3198 | */ | ||
3199 | static inline void threadgroup_change_end(struct task_struct *tsk) | ||
3200 | { | ||
3201 | cgroup_threadgroup_change_end(tsk); | ||
3202 | } | ||
3203 | |||
3204 | #ifdef CONFIG_THREAD_INFO_IN_TASK | ||
3205 | |||
3206 | static inline struct thread_info *task_thread_info(struct task_struct *task) | ||
3207 | { | ||
3208 | return &task->thread_info; | ||
3209 | } | ||
3210 | |||
3211 | /* | 1415 | /* |
3212 | * When accessing the stack of a non-current task that might exit, use | 1416 | * Set thread flags in other task's structures. |
3213 | * try_get_task_stack() instead. task_stack_page will return a pointer | 1417 | * See asm/thread_info.h for TIF_xxxx flags available: |
3214 | * that could get freed out from under you. | ||
3215 | */ | ||
3216 | static inline void *task_stack_page(const struct task_struct *task) | ||
3217 | { | ||
3218 | return task->stack; | ||
3219 | } | ||
3220 | |||
3221 | #define setup_thread_stack(new,old) do { } while(0) | ||
3222 | |||
3223 | static inline unsigned long *end_of_stack(const struct task_struct *task) | ||
3224 | { | ||
3225 | return task->stack; | ||
3226 | } | ||
3227 | |||
3228 | #elif !defined(__HAVE_THREAD_FUNCTIONS) | ||
3229 | |||
3230 | #define task_thread_info(task) ((struct thread_info *)(task)->stack) | ||
3231 | #define task_stack_page(task) ((void *)(task)->stack) | ||
3232 | |||
3233 | static inline void setup_thread_stack(struct task_struct *p, struct task_struct *org) | ||
3234 | { | ||
3235 | *task_thread_info(p) = *task_thread_info(org); | ||
3236 | task_thread_info(p)->task = p; | ||
3237 | } | ||
3238 | |||
3239 | /* | ||
3240 | * Return the address of the last usable long on the stack. | ||
3241 | * | ||
3242 | * When the stack grows down, this is just above the thread | ||
3243 | * info struct. Going any lower will corrupt the threadinfo. | ||
3244 | * | ||
3245 | * When the stack grows up, this is the highest address. | ||
3246 | * Beyond that position, we corrupt data on the next page. | ||
3247 | */ | ||
3248 | static inline unsigned long *end_of_stack(struct task_struct *p) | ||
3249 | { | ||
3250 | #ifdef CONFIG_STACK_GROWSUP | ||
3251 | return (unsigned long *)((unsigned long)task_thread_info(p) + THREAD_SIZE) - 1; | ||
3252 | #else | ||
3253 | return (unsigned long *)(task_thread_info(p) + 1); | ||
3254 | #endif | ||
3255 | } | ||
3256 | |||
3257 | #endif | ||
3258 | |||
3259 | #ifdef CONFIG_THREAD_INFO_IN_TASK | ||
3260 | static inline void *try_get_task_stack(struct task_struct *tsk) | ||
3261 | { | ||
3262 | return atomic_inc_not_zero(&tsk->stack_refcount) ? | ||
3263 | task_stack_page(tsk) : NULL; | ||
3264 | } | ||
3265 | |||
3266 | extern void put_task_stack(struct task_struct *tsk); | ||
3267 | #else | ||
3268 | static inline void *try_get_task_stack(struct task_struct *tsk) | ||
3269 | { | ||
3270 | return task_stack_page(tsk); | ||
3271 | } | ||
3272 | |||
3273 | static inline void put_task_stack(struct task_struct *tsk) {} | ||
3274 | #endif | ||
3275 | |||
3276 | #define task_stack_end_corrupted(task) \ | ||
3277 | (*(end_of_stack(task)) != STACK_END_MAGIC) | ||
3278 | |||
3279 | static inline int object_is_on_stack(void *obj) | ||
3280 | { | ||
3281 | void *stack = task_stack_page(current); | ||
3282 | |||
3283 | return (obj >= stack) && (obj < (stack + THREAD_SIZE)); | ||
3284 | } | ||
3285 | |||
3286 | extern void thread_stack_cache_init(void); | ||
3287 | |||
3288 | #ifdef CONFIG_DEBUG_STACK_USAGE | ||
3289 | static inline unsigned long stack_not_used(struct task_struct *p) | ||
3290 | { | ||
3291 | unsigned long *n = end_of_stack(p); | ||
3292 | |||
3293 | do { /* Skip over canary */ | ||
3294 | # ifdef CONFIG_STACK_GROWSUP | ||
3295 | n--; | ||
3296 | # else | ||
3297 | n++; | ||
3298 | # endif | ||
3299 | } while (!*n); | ||
3300 | |||
3301 | # ifdef CONFIG_STACK_GROWSUP | ||
3302 | return (unsigned long)end_of_stack(p) - (unsigned long)n; | ||
3303 | # else | ||
3304 | return (unsigned long)n - (unsigned long)end_of_stack(p); | ||
3305 | # endif | ||
3306 | } | ||
3307 | #endif | ||
3308 | extern void set_task_stack_end_magic(struct task_struct *tsk); | ||
3309 | |||
3310 | /* set thread flags in other task's structures | ||
3311 | * - see asm/thread_info.h for TIF_xxxx flags available | ||
3312 | */ | 1418 | */ |
3313 | static inline void set_tsk_thread_flag(struct task_struct *tsk, int flag) | 1419 | static inline void set_tsk_thread_flag(struct task_struct *tsk, int flag) |
3314 | { | 1420 | { |
@@ -3350,37 +1456,6 @@ static inline int test_tsk_need_resched(struct task_struct *tsk) | |||
3350 | return unlikely(test_tsk_thread_flag(tsk,TIF_NEED_RESCHED)); | 1456 | return unlikely(test_tsk_thread_flag(tsk,TIF_NEED_RESCHED)); |
3351 | } | 1457 | } |
3352 | 1458 | ||
3353 | static inline int restart_syscall(void) | ||
3354 | { | ||
3355 | set_tsk_thread_flag(current, TIF_SIGPENDING); | ||
3356 | return -ERESTARTNOINTR; | ||
3357 | } | ||
3358 | |||
3359 | static inline int signal_pending(struct task_struct *p) | ||
3360 | { | ||
3361 | return unlikely(test_tsk_thread_flag(p,TIF_SIGPENDING)); | ||
3362 | } | ||
3363 | |||
3364 | static inline int __fatal_signal_pending(struct task_struct *p) | ||
3365 | { | ||
3366 | return unlikely(sigismember(&p->pending.signal, SIGKILL)); | ||
3367 | } | ||
3368 | |||
3369 | static inline int fatal_signal_pending(struct task_struct *p) | ||
3370 | { | ||
3371 | return signal_pending(p) && __fatal_signal_pending(p); | ||
3372 | } | ||
3373 | |||
3374 | static inline int signal_pending_state(long state, struct task_struct *p) | ||
3375 | { | ||
3376 | if (!(state & (TASK_INTERRUPTIBLE | TASK_WAKEKILL))) | ||
3377 | return 0; | ||
3378 | if (!signal_pending(p)) | ||
3379 | return 0; | ||
3380 | |||
3381 | return (state & TASK_INTERRUPTIBLE) || __fatal_signal_pending(p); | ||
3382 | } | ||
3383 | |||
3384 | /* | 1459 | /* |
3385 | * cond_resched() and cond_resched_lock(): latency reduction via | 1460 | * cond_resched() and cond_resched_lock(): latency reduction via |
3386 | * explicit rescheduling in places that are safe. The return | 1461 | * explicit rescheduling in places that are safe. The return |
@@ -3422,15 +1497,6 @@ static inline void cond_resched_rcu(void) | |||
3422 | #endif | 1497 | #endif |
3423 | } | 1498 | } |
3424 | 1499 | ||
3425 | static inline unsigned long get_preempt_disable_ip(struct task_struct *p) | ||
3426 | { | ||
3427 | #ifdef CONFIG_DEBUG_PREEMPT | ||
3428 | return p->preempt_disable_ip; | ||
3429 | #else | ||
3430 | return 0; | ||
3431 | #endif | ||
3432 | } | ||
3433 | |||
3434 | /* | 1500 | /* |
3435 | * Does a critical section need to be broken due to another | 1501 | * Does a critical section need to be broken due to another |
3436 | * task waiting?: (technically does not depend on CONFIG_PREEMPT, | 1502 | * task waiting?: (technically does not depend on CONFIG_PREEMPT, |
@@ -3445,114 +1511,12 @@ static inline int spin_needbreak(spinlock_t *lock) | |||
3445 | #endif | 1511 | #endif |
3446 | } | 1512 | } |
3447 | 1513 | ||
3448 | /* | ||
3449 | * Idle thread specific functions to determine the need_resched | ||
3450 | * polling state. | ||
3451 | */ | ||
3452 | #ifdef TIF_POLLING_NRFLAG | ||
3453 | static inline int tsk_is_polling(struct task_struct *p) | ||
3454 | { | ||
3455 | return test_tsk_thread_flag(p, TIF_POLLING_NRFLAG); | ||
3456 | } | ||
3457 | |||
3458 | static inline void __current_set_polling(void) | ||
3459 | { | ||
3460 | set_thread_flag(TIF_POLLING_NRFLAG); | ||
3461 | } | ||
3462 | |||
3463 | static inline bool __must_check current_set_polling_and_test(void) | ||
3464 | { | ||
3465 | __current_set_polling(); | ||
3466 | |||
3467 | /* | ||
3468 | * Polling state must be visible before we test NEED_RESCHED, | ||
3469 | * paired by resched_curr() | ||
3470 | */ | ||
3471 | smp_mb__after_atomic(); | ||
3472 | |||
3473 | return unlikely(tif_need_resched()); | ||
3474 | } | ||
3475 | |||
3476 | static inline void __current_clr_polling(void) | ||
3477 | { | ||
3478 | clear_thread_flag(TIF_POLLING_NRFLAG); | ||
3479 | } | ||
3480 | |||
3481 | static inline bool __must_check current_clr_polling_and_test(void) | ||
3482 | { | ||
3483 | __current_clr_polling(); | ||
3484 | |||
3485 | /* | ||
3486 | * Polling state must be visible before we test NEED_RESCHED, | ||
3487 | * paired by resched_curr() | ||
3488 | */ | ||
3489 | smp_mb__after_atomic(); | ||
3490 | |||
3491 | return unlikely(tif_need_resched()); | ||
3492 | } | ||
3493 | |||
3494 | #else | ||
3495 | static inline int tsk_is_polling(struct task_struct *p) { return 0; } | ||
3496 | static inline void __current_set_polling(void) { } | ||
3497 | static inline void __current_clr_polling(void) { } | ||
3498 | |||
3499 | static inline bool __must_check current_set_polling_and_test(void) | ||
3500 | { | ||
3501 | return unlikely(tif_need_resched()); | ||
3502 | } | ||
3503 | static inline bool __must_check current_clr_polling_and_test(void) | ||
3504 | { | ||
3505 | return unlikely(tif_need_resched()); | ||
3506 | } | ||
3507 | #endif | ||
3508 | |||
3509 | static inline void current_clr_polling(void) | ||
3510 | { | ||
3511 | __current_clr_polling(); | ||
3512 | |||
3513 | /* | ||
3514 | * Ensure we check TIF_NEED_RESCHED after we clear the polling bit. | ||
3515 | * Once the bit is cleared, we'll get IPIs with every new | ||
3516 | * TIF_NEED_RESCHED and the IPI handler, scheduler_ipi(), will also | ||
3517 | * fold. | ||
3518 | */ | ||
3519 | smp_mb(); /* paired with resched_curr() */ | ||
3520 | |||
3521 | preempt_fold_need_resched(); | ||
3522 | } | ||
3523 | |||
3524 | static __always_inline bool need_resched(void) | 1514 | static __always_inline bool need_resched(void) |
3525 | { | 1515 | { |
3526 | return unlikely(tif_need_resched()); | 1516 | return unlikely(tif_need_resched()); |
3527 | } | 1517 | } |
3528 | 1518 | ||
3529 | /* | 1519 | /* |
3530 | * Thread group CPU time accounting. | ||
3531 | */ | ||
3532 | void thread_group_cputime(struct task_struct *tsk, struct task_cputime *times); | ||
3533 | void thread_group_cputimer(struct task_struct *tsk, struct task_cputime *times); | ||
3534 | |||
3535 | /* | ||
3536 | * Reevaluate whether the task has signals pending delivery. | ||
3537 | * Wake the task if so. | ||
3538 | * This is required every time the blocked sigset_t changes. | ||
3539 | * callers must hold sighand->siglock. | ||
3540 | */ | ||
3541 | extern void recalc_sigpending_and_wake(struct task_struct *t); | ||
3542 | extern void recalc_sigpending(void); | ||
3543 | |||
3544 | extern void signal_wake_up_state(struct task_struct *t, unsigned int state); | ||
3545 | |||
3546 | static inline void signal_wake_up(struct task_struct *t, bool resume) | ||
3547 | { | ||
3548 | signal_wake_up_state(t, resume ? TASK_WAKEKILL : 0); | ||
3549 | } | ||
3550 | static inline void ptrace_signal_wake_up(struct task_struct *t, bool resume) | ||
3551 | { | ||
3552 | signal_wake_up_state(t, resume ? __TASK_TRACED : 0); | ||
3553 | } | ||
3554 | |||
3555 | /* | ||
3556 | * Wrappers for p->thread_info->cpu access. No-op on UP. | 1520 | * Wrappers for p->thread_info->cpu access. No-op on UP. |
3557 | */ | 1521 | */ |
3558 | #ifdef CONFIG_SMP | 1522 | #ifdef CONFIG_SMP |
@@ -3566,11 +1530,6 @@ static inline unsigned int task_cpu(const struct task_struct *p) | |||
3566 | #endif | 1530 | #endif |
3567 | } | 1531 | } |
3568 | 1532 | ||
3569 | static inline int task_node(const struct task_struct *p) | ||
3570 | { | ||
3571 | return cpu_to_node(task_cpu(p)); | ||
3572 | } | ||
3573 | |||
3574 | extern void set_task_cpu(struct task_struct *p, unsigned int cpu); | 1533 | extern void set_task_cpu(struct task_struct *p, unsigned int cpu); |
3575 | 1534 | ||
3576 | #else | 1535 | #else |
@@ -3601,100 +1560,8 @@ static inline void set_task_cpu(struct task_struct *p, unsigned int cpu) | |||
3601 | extern long sched_setaffinity(pid_t pid, const struct cpumask *new_mask); | 1560 | extern long sched_setaffinity(pid_t pid, const struct cpumask *new_mask); |
3602 | extern long sched_getaffinity(pid_t pid, struct cpumask *mask); | 1561 | extern long sched_getaffinity(pid_t pid, struct cpumask *mask); |
3603 | 1562 | ||
3604 | #ifdef CONFIG_CGROUP_SCHED | ||
3605 | extern struct task_group root_task_group; | ||
3606 | #endif /* CONFIG_CGROUP_SCHED */ | ||
3607 | |||
3608 | extern int task_can_switch_user(struct user_struct *up, | ||
3609 | struct task_struct *tsk); | ||
3610 | |||
3611 | #ifdef CONFIG_TASK_XACCT | ||
3612 | static inline void add_rchar(struct task_struct *tsk, ssize_t amt) | ||
3613 | { | ||
3614 | tsk->ioac.rchar += amt; | ||
3615 | } | ||
3616 | |||
3617 | static inline void add_wchar(struct task_struct *tsk, ssize_t amt) | ||
3618 | { | ||
3619 | tsk->ioac.wchar += amt; | ||
3620 | } | ||
3621 | |||
3622 | static inline void inc_syscr(struct task_struct *tsk) | ||
3623 | { | ||
3624 | tsk->ioac.syscr++; | ||
3625 | } | ||
3626 | |||
3627 | static inline void inc_syscw(struct task_struct *tsk) | ||
3628 | { | ||
3629 | tsk->ioac.syscw++; | ||
3630 | } | ||
3631 | #else | ||
3632 | static inline void add_rchar(struct task_struct *tsk, ssize_t amt) | ||
3633 | { | ||
3634 | } | ||
3635 | |||
3636 | static inline void add_wchar(struct task_struct *tsk, ssize_t amt) | ||
3637 | { | ||
3638 | } | ||
3639 | |||
3640 | static inline void inc_syscr(struct task_struct *tsk) | ||
3641 | { | ||
3642 | } | ||
3643 | |||
3644 | static inline void inc_syscw(struct task_struct *tsk) | ||
3645 | { | ||
3646 | } | ||
3647 | #endif | ||
3648 | |||
3649 | #ifndef TASK_SIZE_OF | 1563 | #ifndef TASK_SIZE_OF |
3650 | #define TASK_SIZE_OF(tsk) TASK_SIZE | 1564 | #define TASK_SIZE_OF(tsk) TASK_SIZE |
3651 | #endif | 1565 | #endif |
3652 | 1566 | ||
3653 | #ifdef CONFIG_MEMCG | ||
3654 | extern void mm_update_next_owner(struct mm_struct *mm); | ||
3655 | #else | ||
3656 | static inline void mm_update_next_owner(struct mm_struct *mm) | ||
3657 | { | ||
3658 | } | ||
3659 | #endif /* CONFIG_MEMCG */ | ||
3660 | |||
3661 | static inline unsigned long task_rlimit(const struct task_struct *tsk, | ||
3662 | unsigned int limit) | ||
3663 | { | ||
3664 | return READ_ONCE(tsk->signal->rlim[limit].rlim_cur); | ||
3665 | } | ||
3666 | |||
3667 | static inline unsigned long task_rlimit_max(const struct task_struct *tsk, | ||
3668 | unsigned int limit) | ||
3669 | { | ||
3670 | return READ_ONCE(tsk->signal->rlim[limit].rlim_max); | ||
3671 | } | ||
3672 | |||
3673 | static inline unsigned long rlimit(unsigned int limit) | ||
3674 | { | ||
3675 | return task_rlimit(current, limit); | ||
3676 | } | ||
3677 | |||
3678 | static inline unsigned long rlimit_max(unsigned int limit) | ||
3679 | { | ||
3680 | return task_rlimit_max(current, limit); | ||
3681 | } | ||
3682 | |||
3683 | #define SCHED_CPUFREQ_RT (1U << 0) | ||
3684 | #define SCHED_CPUFREQ_DL (1U << 1) | ||
3685 | #define SCHED_CPUFREQ_IOWAIT (1U << 2) | ||
3686 | |||
3687 | #define SCHED_CPUFREQ_RT_DL (SCHED_CPUFREQ_RT | SCHED_CPUFREQ_DL) | ||
3688 | |||
3689 | #ifdef CONFIG_CPU_FREQ | ||
3690 | struct update_util_data { | ||
3691 | void (*func)(struct update_util_data *data, u64 time, unsigned int flags); | ||
3692 | }; | ||
3693 | |||
3694 | void cpufreq_add_update_util_hook(int cpu, struct update_util_data *data, | ||
3695 | void (*func)(struct update_util_data *data, u64 time, | ||
3696 | unsigned int flags)); | ||
3697 | void cpufreq_remove_update_util_hook(int cpu); | ||
3698 | #endif /* CONFIG_CPU_FREQ */ | ||
3699 | |||
3700 | #endif | 1567 | #endif |
diff --git a/include/linux/sched/autogroup.h b/include/linux/sched/autogroup.h new file mode 100644 index 000000000000..55cd496df884 --- /dev/null +++ b/include/linux/sched/autogroup.h | |||
@@ -0,0 +1,31 @@ | |||
1 | #ifndef _LINUX_SCHED_AUTOGROUP_H | ||
2 | #define _LINUX_SCHED_AUTOGROUP_H | ||
3 | |||
4 | struct signal_struct; | ||
5 | struct task_struct; | ||
6 | struct task_group; | ||
7 | struct seq_file; | ||
8 | |||
9 | #ifdef CONFIG_SCHED_AUTOGROUP | ||
10 | extern void sched_autogroup_create_attach(struct task_struct *p); | ||
11 | extern void sched_autogroup_detach(struct task_struct *p); | ||
12 | extern void sched_autogroup_fork(struct signal_struct *sig); | ||
13 | extern void sched_autogroup_exit(struct signal_struct *sig); | ||
14 | extern void sched_autogroup_exit_task(struct task_struct *p); | ||
15 | #ifdef CONFIG_PROC_FS | ||
16 | extern void proc_sched_autogroup_show_task(struct task_struct *p, struct seq_file *m); | ||
17 | extern int proc_sched_autogroup_set_nice(struct task_struct *p, int nice); | ||
18 | #endif | ||
19 | #else | ||
20 | static inline void sched_autogroup_create_attach(struct task_struct *p) { } | ||
21 | static inline void sched_autogroup_detach(struct task_struct *p) { } | ||
22 | static inline void sched_autogroup_fork(struct signal_struct *sig) { } | ||
23 | static inline void sched_autogroup_exit(struct signal_struct *sig) { } | ||
24 | static inline void sched_autogroup_exit_task(struct task_struct *p) { } | ||
25 | #endif | ||
26 | |||
27 | #ifdef CONFIG_CGROUP_SCHED | ||
28 | extern struct task_group root_task_group; | ||
29 | #endif /* CONFIG_CGROUP_SCHED */ | ||
30 | |||
31 | #endif /* _LINUX_SCHED_AUTOGROUP_H */ | ||
diff --git a/include/linux/sched/clock.h b/include/linux/sched/clock.h new file mode 100644 index 000000000000..4a68c6791207 --- /dev/null +++ b/include/linux/sched/clock.h | |||
@@ -0,0 +1,104 @@ | |||
1 | #ifndef _LINUX_SCHED_CLOCK_H | ||
2 | #define _LINUX_SCHED_CLOCK_H | ||
3 | |||
4 | #include <linux/smp.h> | ||
5 | |||
6 | /* | ||
7 | * Do not use outside of architecture code which knows its limitations. | ||
8 | * | ||
9 | * sched_clock() has no promise of monotonicity or bounded drift between | ||
10 | * CPUs, use (which you should not) requires disabling IRQs. | ||
11 | * | ||
12 | * Please use one of the three interfaces below. | ||
13 | */ | ||
14 | extern unsigned long long notrace sched_clock(void); | ||
15 | |||
16 | /* | ||
17 | * See the comment in kernel/sched/clock.c | ||
18 | */ | ||
19 | extern u64 running_clock(void); | ||
20 | extern u64 sched_clock_cpu(int cpu); | ||
21 | |||
22 | |||
23 | extern void sched_clock_init(void); | ||
24 | |||
25 | #ifndef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK | ||
26 | static inline void sched_clock_init_late(void) | ||
27 | { | ||
28 | } | ||
29 | |||
30 | static inline void sched_clock_tick(void) | ||
31 | { | ||
32 | } | ||
33 | |||
34 | static inline void clear_sched_clock_stable(void) | ||
35 | { | ||
36 | } | ||
37 | |||
38 | static inline void sched_clock_idle_sleep_event(void) | ||
39 | { | ||
40 | } | ||
41 | |||
42 | static inline void sched_clock_idle_wakeup_event(u64 delta_ns) | ||
43 | { | ||
44 | } | ||
45 | |||
46 | static inline u64 cpu_clock(int cpu) | ||
47 | { | ||
48 | return sched_clock(); | ||
49 | } | ||
50 | |||
51 | static inline u64 local_clock(void) | ||
52 | { | ||
53 | return sched_clock(); | ||
54 | } | ||
55 | #else | ||
56 | extern void sched_clock_init_late(void); | ||
57 | /* | ||
58 | * Architectures can set this to 1 if they have specified | ||
59 | * CONFIG_HAVE_UNSTABLE_SCHED_CLOCK in their arch Kconfig, | ||
60 | * but then during bootup it turns out that sched_clock() | ||
61 | * is reliable after all: | ||
62 | */ | ||
63 | extern int sched_clock_stable(void); | ||
64 | extern void clear_sched_clock_stable(void); | ||
65 | |||
66 | extern void sched_clock_tick(void); | ||
67 | extern void sched_clock_idle_sleep_event(void); | ||
68 | extern void sched_clock_idle_wakeup_event(u64 delta_ns); | ||
69 | |||
70 | /* | ||
71 | * As outlined in clock.c, provides a fast, high resolution, nanosecond | ||
72 | * time source that is monotonic per cpu argument and has bounded drift | ||
73 | * between cpus. | ||
74 | * | ||
75 | * ######################### BIG FAT WARNING ########################## | ||
76 | * # when comparing cpu_clock(i) to cpu_clock(j) for i != j, time can # | ||
77 | * # go backwards !! # | ||
78 | * #################################################################### | ||
79 | */ | ||
80 | static inline u64 cpu_clock(int cpu) | ||
81 | { | ||
82 | return sched_clock_cpu(cpu); | ||
83 | } | ||
84 | |||
85 | static inline u64 local_clock(void) | ||
86 | { | ||
87 | return sched_clock_cpu(raw_smp_processor_id()); | ||
88 | } | ||
89 | #endif | ||
90 | |||
91 | #ifdef CONFIG_IRQ_TIME_ACCOUNTING | ||
92 | /* | ||
93 | * An i/f to runtime opt-in for irq time accounting based off of sched_clock. | ||
94 | * The reason for this explicit opt-in is not to have perf penalty with | ||
95 | * slow sched_clocks. | ||
96 | */ | ||
97 | extern void enable_sched_clock_irqtime(void); | ||
98 | extern void disable_sched_clock_irqtime(void); | ||
99 | #else | ||
100 | static inline void enable_sched_clock_irqtime(void) {} | ||
101 | static inline void disable_sched_clock_irqtime(void) {} | ||
102 | #endif | ||
103 | |||
104 | #endif /* _LINUX_SCHED_CLOCK_H */ | ||
diff --git a/include/linux/sched/coredump.h b/include/linux/sched/coredump.h new file mode 100644 index 000000000000..69eedcef8f03 --- /dev/null +++ b/include/linux/sched/coredump.h | |||
@@ -0,0 +1,74 @@ | |||
1 | #ifndef _LINUX_SCHED_COREDUMP_H | ||
2 | #define _LINUX_SCHED_COREDUMP_H | ||
3 | |||
4 | #include <linux/mm_types.h> | ||
5 | |||
6 | #define SUID_DUMP_DISABLE 0 /* No setuid dumping */ | ||
7 | #define SUID_DUMP_USER 1 /* Dump as user of process */ | ||
8 | #define SUID_DUMP_ROOT 2 /* Dump as root */ | ||
9 | |||
10 | /* mm flags */ | ||
11 | |||
12 | /* for SUID_DUMP_* above */ | ||
13 | #define MMF_DUMPABLE_BITS 2 | ||
14 | #define MMF_DUMPABLE_MASK ((1 << MMF_DUMPABLE_BITS) - 1) | ||
15 | |||
16 | extern void set_dumpable(struct mm_struct *mm, int value); | ||
17 | /* | ||
18 | * This returns the actual value of the suid_dumpable flag. For things | ||
19 | * that are using this for checking for privilege transitions, it must | ||
20 | * test against SUID_DUMP_USER rather than treating it as a boolean | ||
21 | * value. | ||
22 | */ | ||
23 | static inline int __get_dumpable(unsigned long mm_flags) | ||
24 | { | ||
25 | return mm_flags & MMF_DUMPABLE_MASK; | ||
26 | } | ||
27 | |||
28 | static inline int get_dumpable(struct mm_struct *mm) | ||
29 | { | ||
30 | return __get_dumpable(mm->flags); | ||
31 | } | ||
32 | |||
33 | /* coredump filter bits */ | ||
34 | #define MMF_DUMP_ANON_PRIVATE 2 | ||
35 | #define MMF_DUMP_ANON_SHARED 3 | ||
36 | #define MMF_DUMP_MAPPED_PRIVATE 4 | ||
37 | #define MMF_DUMP_MAPPED_SHARED 5 | ||
38 | #define MMF_DUMP_ELF_HEADERS 6 | ||
39 | #define MMF_DUMP_HUGETLB_PRIVATE 7 | ||
40 | #define MMF_DUMP_HUGETLB_SHARED 8 | ||
41 | #define MMF_DUMP_DAX_PRIVATE 9 | ||
42 | #define MMF_DUMP_DAX_SHARED 10 | ||
43 | |||
44 | #define MMF_DUMP_FILTER_SHIFT MMF_DUMPABLE_BITS | ||
45 | #define MMF_DUMP_FILTER_BITS 9 | ||
46 | #define MMF_DUMP_FILTER_MASK \ | ||
47 | (((1 << MMF_DUMP_FILTER_BITS) - 1) << MMF_DUMP_FILTER_SHIFT) | ||
48 | #define MMF_DUMP_FILTER_DEFAULT \ | ||
49 | ((1 << MMF_DUMP_ANON_PRIVATE) | (1 << MMF_DUMP_ANON_SHARED) |\ | ||
50 | (1 << MMF_DUMP_HUGETLB_PRIVATE) | MMF_DUMP_MASK_DEFAULT_ELF) | ||
51 | |||
52 | #ifdef CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS | ||
53 | # define MMF_DUMP_MASK_DEFAULT_ELF (1 << MMF_DUMP_ELF_HEADERS) | ||
54 | #else | ||
55 | # define MMF_DUMP_MASK_DEFAULT_ELF 0 | ||
56 | #endif | ||
57 | /* leave room for more dump flags */ | ||
58 | #define MMF_VM_MERGEABLE 16 /* KSM may merge identical pages */ | ||
59 | #define MMF_VM_HUGEPAGE 17 /* set when VM_HUGEPAGE is set on vma */ | ||
60 | /* | ||
61 | * This one-shot flag is dropped due to necessity of changing exe once again | ||
62 | * on NFS restore | ||
63 | */ | ||
64 | //#define MMF_EXE_FILE_CHANGED 18 /* see prctl_set_mm_exe_file() */ | ||
65 | |||
66 | #define MMF_HAS_UPROBES 19 /* has uprobes */ | ||
67 | #define MMF_RECALC_UPROBES 20 /* MMF_HAS_UPROBES can be wrong */ | ||
68 | #define MMF_OOM_SKIP 21 /* mm is of no interest for the OOM killer */ | ||
69 | #define MMF_UNSTABLE 22 /* mm is unstable for copy_from_user */ | ||
70 | #define MMF_HUGE_ZERO_PAGE 23 /* mm has ever used the global huge zero page */ | ||
71 | |||
72 | #define MMF_INIT_MASK (MMF_DUMPABLE_MASK | MMF_DUMP_FILTER_MASK) | ||
73 | |||
74 | #endif /* _LINUX_SCHED_COREDUMP_H */ | ||
diff --git a/include/linux/sched/cpufreq.h b/include/linux/sched/cpufreq.h new file mode 100644 index 000000000000..d2be2ccbb372 --- /dev/null +++ b/include/linux/sched/cpufreq.h | |||
@@ -0,0 +1,27 @@ | |||
1 | #ifndef _LINUX_SCHED_CPUFREQ_H | ||
2 | #define _LINUX_SCHED_CPUFREQ_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | /* | ||
7 | * Interface between cpufreq drivers and the scheduler: | ||
8 | */ | ||
9 | |||
10 | #define SCHED_CPUFREQ_RT (1U << 0) | ||
11 | #define SCHED_CPUFREQ_DL (1U << 1) | ||
12 | #define SCHED_CPUFREQ_IOWAIT (1U << 2) | ||
13 | |||
14 | #define SCHED_CPUFREQ_RT_DL (SCHED_CPUFREQ_RT | SCHED_CPUFREQ_DL) | ||
15 | |||
16 | #ifdef CONFIG_CPU_FREQ | ||
17 | struct update_util_data { | ||
18 | void (*func)(struct update_util_data *data, u64 time, unsigned int flags); | ||
19 | }; | ||
20 | |||
21 | void cpufreq_add_update_util_hook(int cpu, struct update_util_data *data, | ||
22 | void (*func)(struct update_util_data *data, u64 time, | ||
23 | unsigned int flags)); | ||
24 | void cpufreq_remove_update_util_hook(int cpu); | ||
25 | #endif /* CONFIG_CPU_FREQ */ | ||
26 | |||
27 | #endif /* _LINUX_SCHED_CPUFREQ_H */ | ||
diff --git a/include/linux/sched/cputime.h b/include/linux/sched/cputime.h new file mode 100644 index 000000000000..4c5b9735c1ae --- /dev/null +++ b/include/linux/sched/cputime.h | |||
@@ -0,0 +1,187 @@ | |||
1 | #ifndef _LINUX_SCHED_CPUTIME_H | ||
2 | #define _LINUX_SCHED_CPUTIME_H | ||
3 | |||
4 | #include <linux/sched/signal.h> | ||
5 | |||
6 | /* | ||
7 | * cputime accounting APIs: | ||
8 | */ | ||
9 | |||
10 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE | ||
11 | #include <asm/cputime.h> | ||
12 | |||
13 | #ifndef cputime_to_nsecs | ||
14 | # define cputime_to_nsecs(__ct) \ | ||
15 | (cputime_to_usecs(__ct) * NSEC_PER_USEC) | ||
16 | #endif | ||
17 | #endif /* CONFIG_VIRT_CPU_ACCOUNTING_NATIVE */ | ||
18 | |||
19 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN | ||
20 | extern void task_cputime(struct task_struct *t, | ||
21 | u64 *utime, u64 *stime); | ||
22 | extern u64 task_gtime(struct task_struct *t); | ||
23 | #else | ||
24 | static inline void task_cputime(struct task_struct *t, | ||
25 | u64 *utime, u64 *stime) | ||
26 | { | ||
27 | *utime = t->utime; | ||
28 | *stime = t->stime; | ||
29 | } | ||
30 | |||
31 | static inline u64 task_gtime(struct task_struct *t) | ||
32 | { | ||
33 | return t->gtime; | ||
34 | } | ||
35 | #endif | ||
36 | |||
37 | #ifdef CONFIG_ARCH_HAS_SCALED_CPUTIME | ||
38 | static inline void task_cputime_scaled(struct task_struct *t, | ||
39 | u64 *utimescaled, | ||
40 | u64 *stimescaled) | ||
41 | { | ||
42 | *utimescaled = t->utimescaled; | ||
43 | *stimescaled = t->stimescaled; | ||
44 | } | ||
45 | #else | ||
46 | static inline void task_cputime_scaled(struct task_struct *t, | ||
47 | u64 *utimescaled, | ||
48 | u64 *stimescaled) | ||
49 | { | ||
50 | task_cputime(t, utimescaled, stimescaled); | ||
51 | } | ||
52 | #endif | ||
53 | |||
54 | extern void task_cputime_adjusted(struct task_struct *p, u64 *ut, u64 *st); | ||
55 | extern void thread_group_cputime_adjusted(struct task_struct *p, u64 *ut, u64 *st); | ||
56 | |||
57 | |||
58 | /* | ||
59 | * Thread group CPU time accounting. | ||
60 | */ | ||
61 | void thread_group_cputime(struct task_struct *tsk, struct task_cputime *times); | ||
62 | void thread_group_cputimer(struct task_struct *tsk, struct task_cputime *times); | ||
63 | |||
64 | |||
65 | /* | ||
66 | * The following are functions that support scheduler-internal time accounting. | ||
67 | * These functions are generally called at the timer tick. None of this depends | ||
68 | * on CONFIG_SCHEDSTATS. | ||
69 | */ | ||
70 | |||
71 | /** | ||
72 | * get_running_cputimer - return &tsk->signal->cputimer if cputimer is running | ||
73 | * | ||
74 | * @tsk: Pointer to target task. | ||
75 | */ | ||
76 | #ifdef CONFIG_POSIX_TIMERS | ||
77 | static inline | ||
78 | struct thread_group_cputimer *get_running_cputimer(struct task_struct *tsk) | ||
79 | { | ||
80 | struct thread_group_cputimer *cputimer = &tsk->signal->cputimer; | ||
81 | |||
82 | /* Check if cputimer isn't running. This is accessed without locking. */ | ||
83 | if (!READ_ONCE(cputimer->running)) | ||
84 | return NULL; | ||
85 | |||
86 | /* | ||
87 | * After we flush the task's sum_exec_runtime to sig->sum_sched_runtime | ||
88 | * in __exit_signal(), we won't account to the signal struct further | ||
89 | * cputime consumed by that task, even though the task can still be | ||
90 | * ticking after __exit_signal(). | ||
91 | * | ||
92 | * In order to keep a consistent behaviour between thread group cputime | ||
93 | * and thread group cputimer accounting, lets also ignore the cputime | ||
94 | * elapsing after __exit_signal() in any thread group timer running. | ||
95 | * | ||
96 | * This makes sure that POSIX CPU clocks and timers are synchronized, so | ||
97 | * that a POSIX CPU timer won't expire while the corresponding POSIX CPU | ||
98 | * clock delta is behind the expiring timer value. | ||
99 | */ | ||
100 | if (unlikely(!tsk->sighand)) | ||
101 | return NULL; | ||
102 | |||
103 | return cputimer; | ||
104 | } | ||
105 | #else | ||
106 | static inline | ||
107 | struct thread_group_cputimer *get_running_cputimer(struct task_struct *tsk) | ||
108 | { | ||
109 | return NULL; | ||
110 | } | ||
111 | #endif | ||
112 | |||
113 | /** | ||
114 | * account_group_user_time - Maintain utime for a thread group. | ||
115 | * | ||
116 | * @tsk: Pointer to task structure. | ||
117 | * @cputime: Time value by which to increment the utime field of the | ||
118 | * thread_group_cputime structure. | ||
119 | * | ||
120 | * If thread group time is being maintained, get the structure for the | ||
121 | * running CPU and update the utime field there. | ||
122 | */ | ||
123 | static inline void account_group_user_time(struct task_struct *tsk, | ||
124 | u64 cputime) | ||
125 | { | ||
126 | struct thread_group_cputimer *cputimer = get_running_cputimer(tsk); | ||
127 | |||
128 | if (!cputimer) | ||
129 | return; | ||
130 | |||
131 | atomic64_add(cputime, &cputimer->cputime_atomic.utime); | ||
132 | } | ||
133 | |||
134 | /** | ||
135 | * account_group_system_time - Maintain stime for a thread group. | ||
136 | * | ||
137 | * @tsk: Pointer to task structure. | ||
138 | * @cputime: Time value by which to increment the stime field of the | ||
139 | * thread_group_cputime structure. | ||
140 | * | ||
141 | * If thread group time is being maintained, get the structure for the | ||
142 | * running CPU and update the stime field there. | ||
143 | */ | ||
144 | static inline void account_group_system_time(struct task_struct *tsk, | ||
145 | u64 cputime) | ||
146 | { | ||
147 | struct thread_group_cputimer *cputimer = get_running_cputimer(tsk); | ||
148 | |||
149 | if (!cputimer) | ||
150 | return; | ||
151 | |||
152 | atomic64_add(cputime, &cputimer->cputime_atomic.stime); | ||
153 | } | ||
154 | |||
155 | /** | ||
156 | * account_group_exec_runtime - Maintain exec runtime for a thread group. | ||
157 | * | ||
158 | * @tsk: Pointer to task structure. | ||
159 | * @ns: Time value by which to increment the sum_exec_runtime field | ||
160 | * of the thread_group_cputime structure. | ||
161 | * | ||
162 | * If thread group time is being maintained, get the structure for the | ||
163 | * running CPU and update the sum_exec_runtime field there. | ||
164 | */ | ||
165 | static inline void account_group_exec_runtime(struct task_struct *tsk, | ||
166 | unsigned long long ns) | ||
167 | { | ||
168 | struct thread_group_cputimer *cputimer = get_running_cputimer(tsk); | ||
169 | |||
170 | if (!cputimer) | ||
171 | return; | ||
172 | |||
173 | atomic64_add(ns, &cputimer->cputime_atomic.sum_exec_runtime); | ||
174 | } | ||
175 | |||
176 | static inline void prev_cputime_init(struct prev_cputime *prev) | ||
177 | { | ||
178 | #ifndef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE | ||
179 | prev->utime = prev->stime = 0; | ||
180 | raw_spin_lock_init(&prev->lock); | ||
181 | #endif | ||
182 | } | ||
183 | |||
184 | extern unsigned long long | ||
185 | task_sched_runtime(struct task_struct *task); | ||
186 | |||
187 | #endif /* _LINUX_SCHED_CPUTIME_H */ | ||
diff --git a/include/linux/sched/deadline.h b/include/linux/sched/deadline.h index 9089a2ae913d..975be862e083 100644 --- a/include/linux/sched/deadline.h +++ b/include/linux/sched/deadline.h | |||
@@ -1,5 +1,7 @@ | |||
1 | #ifndef _SCHED_DEADLINE_H | 1 | #ifndef _LINUX_SCHED_DEADLINE_H |
2 | #define _SCHED_DEADLINE_H | 2 | #define _LINUX_SCHED_DEADLINE_H |
3 | |||
4 | #include <linux/sched.h> | ||
3 | 5 | ||
4 | /* | 6 | /* |
5 | * SCHED_DEADLINE tasks has negative priorities, reflecting | 7 | * SCHED_DEADLINE tasks has negative priorities, reflecting |
@@ -26,4 +28,4 @@ static inline bool dl_time_before(u64 a, u64 b) | |||
26 | return (s64)(a - b) < 0; | 28 | return (s64)(a - b) < 0; |
27 | } | 29 | } |
28 | 30 | ||
29 | #endif /* _SCHED_DEADLINE_H */ | 31 | #endif /* _LINUX_SCHED_DEADLINE_H */ |
diff --git a/include/linux/sched/debug.h b/include/linux/sched/debug.h new file mode 100644 index 000000000000..e0eaee54c5a4 --- /dev/null +++ b/include/linux/sched/debug.h | |||
@@ -0,0 +1,50 @@ | |||
1 | #ifndef _LINUX_SCHED_DEBUG_H | ||
2 | #define _LINUX_SCHED_DEBUG_H | ||
3 | |||
4 | /* | ||
5 | * Various scheduler/task debugging interfaces: | ||
6 | */ | ||
7 | |||
8 | struct task_struct; | ||
9 | |||
10 | extern void dump_cpu_task(int cpu); | ||
11 | |||
12 | /* | ||
13 | * Only dump TASK_* tasks. (0 for all tasks) | ||
14 | */ | ||
15 | extern void show_state_filter(unsigned long state_filter); | ||
16 | |||
17 | static inline void show_state(void) | ||
18 | { | ||
19 | show_state_filter(0); | ||
20 | } | ||
21 | |||
22 | struct pt_regs; | ||
23 | |||
24 | extern void show_regs(struct pt_regs *); | ||
25 | |||
26 | /* | ||
27 | * TASK is a pointer to the task whose backtrace we want to see (or NULL for current | ||
28 | * task), SP is the stack pointer of the first frame that should be shown in the back | ||
29 | * trace (or NULL if the entire call-chain of the task should be shown). | ||
30 | */ | ||
31 | extern void show_stack(struct task_struct *task, unsigned long *sp); | ||
32 | |||
33 | extern void sched_show_task(struct task_struct *p); | ||
34 | |||
35 | #ifdef CONFIG_SCHED_DEBUG | ||
36 | struct seq_file; | ||
37 | extern void proc_sched_show_task(struct task_struct *p, struct seq_file *m); | ||
38 | extern void proc_sched_set_task(struct task_struct *p); | ||
39 | #endif | ||
40 | |||
41 | /* Attach to any functions which should be ignored in wchan output. */ | ||
42 | #define __sched __attribute__((__section__(".sched.text"))) | ||
43 | |||
44 | /* Linker adds these: start and end of __sched functions */ | ||
45 | extern char __sched_text_start[], __sched_text_end[]; | ||
46 | |||
47 | /* Is this address in the __sched functions? */ | ||
48 | extern int in_sched_functions(unsigned long addr); | ||
49 | |||
50 | #endif /* _LINUX_SCHED_DEBUG_H */ | ||
diff --git a/include/linux/sched/hotplug.h b/include/linux/sched/hotplug.h new file mode 100644 index 000000000000..752ac7e628d7 --- /dev/null +++ b/include/linux/sched/hotplug.h | |||
@@ -0,0 +1,24 @@ | |||
1 | #ifndef _LINUX_SCHED_HOTPLUG_H | ||
2 | #define _LINUX_SCHED_HOTPLUG_H | ||
3 | |||
4 | /* | ||
5 | * Scheduler interfaces for hotplug CPU support: | ||
6 | */ | ||
7 | |||
8 | extern int sched_cpu_starting(unsigned int cpu); | ||
9 | extern int sched_cpu_activate(unsigned int cpu); | ||
10 | extern int sched_cpu_deactivate(unsigned int cpu); | ||
11 | |||
12 | #ifdef CONFIG_HOTPLUG_CPU | ||
13 | extern int sched_cpu_dying(unsigned int cpu); | ||
14 | #else | ||
15 | # define sched_cpu_dying NULL | ||
16 | #endif | ||
17 | |||
18 | #ifdef CONFIG_HOTPLUG_CPU | ||
19 | extern void idle_task_exit(void); | ||
20 | #else | ||
21 | static inline void idle_task_exit(void) {} | ||
22 | #endif | ||
23 | |||
24 | #endif /* _LINUX_SCHED_HOTPLUG_H */ | ||
diff --git a/include/linux/sched/idle.h b/include/linux/sched/idle.h new file mode 100644 index 000000000000..5ca63ebad6b4 --- /dev/null +++ b/include/linux/sched/idle.h | |||
@@ -0,0 +1,86 @@ | |||
1 | #ifndef _LINUX_SCHED_IDLE_H | ||
2 | #define _LINUX_SCHED_IDLE_H | ||
3 | |||
4 | #include <linux/sched.h> | ||
5 | |||
6 | enum cpu_idle_type { | ||
7 | CPU_IDLE, | ||
8 | CPU_NOT_IDLE, | ||
9 | CPU_NEWLY_IDLE, | ||
10 | CPU_MAX_IDLE_TYPES | ||
11 | }; | ||
12 | |||
13 | extern void wake_up_if_idle(int cpu); | ||
14 | |||
15 | /* | ||
16 | * Idle thread specific functions to determine the need_resched | ||
17 | * polling state. | ||
18 | */ | ||
19 | #ifdef TIF_POLLING_NRFLAG | ||
20 | |||
21 | static inline void __current_set_polling(void) | ||
22 | { | ||
23 | set_thread_flag(TIF_POLLING_NRFLAG); | ||
24 | } | ||
25 | |||
26 | static inline bool __must_check current_set_polling_and_test(void) | ||
27 | { | ||
28 | __current_set_polling(); | ||
29 | |||
30 | /* | ||
31 | * Polling state must be visible before we test NEED_RESCHED, | ||
32 | * paired by resched_curr() | ||
33 | */ | ||
34 | smp_mb__after_atomic(); | ||
35 | |||
36 | return unlikely(tif_need_resched()); | ||
37 | } | ||
38 | |||
39 | static inline void __current_clr_polling(void) | ||
40 | { | ||
41 | clear_thread_flag(TIF_POLLING_NRFLAG); | ||
42 | } | ||
43 | |||
44 | static inline bool __must_check current_clr_polling_and_test(void) | ||
45 | { | ||
46 | __current_clr_polling(); | ||
47 | |||
48 | /* | ||
49 | * Polling state must be visible before we test NEED_RESCHED, | ||
50 | * paired by resched_curr() | ||
51 | */ | ||
52 | smp_mb__after_atomic(); | ||
53 | |||
54 | return unlikely(tif_need_resched()); | ||
55 | } | ||
56 | |||
57 | #else | ||
58 | static inline void __current_set_polling(void) { } | ||
59 | static inline void __current_clr_polling(void) { } | ||
60 | |||
61 | static inline bool __must_check current_set_polling_and_test(void) | ||
62 | { | ||
63 | return unlikely(tif_need_resched()); | ||
64 | } | ||
65 | static inline bool __must_check current_clr_polling_and_test(void) | ||
66 | { | ||
67 | return unlikely(tif_need_resched()); | ||
68 | } | ||
69 | #endif | ||
70 | |||
71 | static inline void current_clr_polling(void) | ||
72 | { | ||
73 | __current_clr_polling(); | ||
74 | |||
75 | /* | ||
76 | * Ensure we check TIF_NEED_RESCHED after we clear the polling bit. | ||
77 | * Once the bit is cleared, we'll get IPIs with every new | ||
78 | * TIF_NEED_RESCHED and the IPI handler, scheduler_ipi(), will also | ||
79 | * fold. | ||
80 | */ | ||
81 | smp_mb(); /* paired with resched_curr() */ | ||
82 | |||
83 | preempt_fold_need_resched(); | ||
84 | } | ||
85 | |||
86 | #endif /* _LINUX_SCHED_IDLE_H */ | ||
diff --git a/include/linux/sched/init.h b/include/linux/sched/init.h new file mode 100644 index 000000000000..127215045285 --- /dev/null +++ b/include/linux/sched/init.h | |||
@@ -0,0 +1,11 @@ | |||
1 | #ifndef _LINUX_SCHED_INIT_H | ||
2 | #define _LINUX_SCHED_INIT_H | ||
3 | |||
4 | /* | ||
5 | * Scheduler init related prototypes: | ||
6 | */ | ||
7 | |||
8 | extern void sched_init(void); | ||
9 | extern void sched_init_smp(void); | ||
10 | |||
11 | #endif /* _LINUX_SCHED_INIT_H */ | ||
diff --git a/include/linux/sched/jobctl.h b/include/linux/sched/jobctl.h new file mode 100644 index 000000000000..016afa0fb3bb --- /dev/null +++ b/include/linux/sched/jobctl.h | |||
@@ -0,0 +1,36 @@ | |||
1 | #ifndef _LINUX_SCHED_JOBCTL_H | ||
2 | #define _LINUX_SCHED_JOBCTL_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | struct task_struct; | ||
7 | |||
8 | /* | ||
9 | * task->jobctl flags | ||
10 | */ | ||
11 | #define JOBCTL_STOP_SIGMASK 0xffff /* signr of the last group stop */ | ||
12 | |||
13 | #define JOBCTL_STOP_DEQUEUED_BIT 16 /* stop signal dequeued */ | ||
14 | #define JOBCTL_STOP_PENDING_BIT 17 /* task should stop for group stop */ | ||
15 | #define JOBCTL_STOP_CONSUME_BIT 18 /* consume group stop count */ | ||
16 | #define JOBCTL_TRAP_STOP_BIT 19 /* trap for STOP */ | ||
17 | #define JOBCTL_TRAP_NOTIFY_BIT 20 /* trap for NOTIFY */ | ||
18 | #define JOBCTL_TRAPPING_BIT 21 /* switching to TRACED */ | ||
19 | #define JOBCTL_LISTENING_BIT 22 /* ptracer is listening for events */ | ||
20 | |||
21 | #define JOBCTL_STOP_DEQUEUED (1UL << JOBCTL_STOP_DEQUEUED_BIT) | ||
22 | #define JOBCTL_STOP_PENDING (1UL << JOBCTL_STOP_PENDING_BIT) | ||
23 | #define JOBCTL_STOP_CONSUME (1UL << JOBCTL_STOP_CONSUME_BIT) | ||
24 | #define JOBCTL_TRAP_STOP (1UL << JOBCTL_TRAP_STOP_BIT) | ||
25 | #define JOBCTL_TRAP_NOTIFY (1UL << JOBCTL_TRAP_NOTIFY_BIT) | ||
26 | #define JOBCTL_TRAPPING (1UL << JOBCTL_TRAPPING_BIT) | ||
27 | #define JOBCTL_LISTENING (1UL << JOBCTL_LISTENING_BIT) | ||
28 | |||
29 | #define JOBCTL_TRAP_MASK (JOBCTL_TRAP_STOP | JOBCTL_TRAP_NOTIFY) | ||
30 | #define JOBCTL_PENDING_MASK (JOBCTL_STOP_PENDING | JOBCTL_TRAP_MASK) | ||
31 | |||
32 | extern bool task_set_jobctl_pending(struct task_struct *task, unsigned long mask); | ||
33 | extern void task_clear_jobctl_trapping(struct task_struct *task); | ||
34 | extern void task_clear_jobctl_pending(struct task_struct *task, unsigned long mask); | ||
35 | |||
36 | #endif /* _LINUX_SCHED_JOBCTL_H */ | ||
diff --git a/include/linux/sched/loadavg.h b/include/linux/sched/loadavg.h new file mode 100644 index 000000000000..4264bc6b2c27 --- /dev/null +++ b/include/linux/sched/loadavg.h | |||
@@ -0,0 +1,31 @@ | |||
1 | #ifndef _LINUX_SCHED_LOADAVG_H | ||
2 | #define _LINUX_SCHED_LOADAVG_H | ||
3 | |||
4 | /* | ||
5 | * These are the constant used to fake the fixed-point load-average | ||
6 | * counting. Some notes: | ||
7 | * - 11 bit fractions expand to 22 bits by the multiplies: this gives | ||
8 | * a load-average precision of 10 bits integer + 11 bits fractional | ||
9 | * - if you want to count load-averages more often, you need more | ||
10 | * precision, or rounding will get you. With 2-second counting freq, | ||
11 | * the EXP_n values would be 1981, 2034 and 2043 if still using only | ||
12 | * 11 bit fractions. | ||
13 | */ | ||
14 | extern unsigned long avenrun[]; /* Load averages */ | ||
15 | extern void get_avenrun(unsigned long *loads, unsigned long offset, int shift); | ||
16 | |||
17 | #define FSHIFT 11 /* nr of bits of precision */ | ||
18 | #define FIXED_1 (1<<FSHIFT) /* 1.0 as fixed-point */ | ||
19 | #define LOAD_FREQ (5*HZ+1) /* 5 sec intervals */ | ||
20 | #define EXP_1 1884 /* 1/exp(5sec/1min) as fixed-point */ | ||
21 | #define EXP_5 2014 /* 1/exp(5sec/5min) */ | ||
22 | #define EXP_15 2037 /* 1/exp(5sec/15min) */ | ||
23 | |||
24 | #define CALC_LOAD(load,exp,n) \ | ||
25 | load *= exp; \ | ||
26 | load += n*(FIXED_1-exp); \ | ||
27 | load >>= FSHIFT; | ||
28 | |||
29 | extern void calc_global_load(unsigned long ticks); | ||
30 | |||
31 | #endif /* _LINUX_SCHED_LOADAVG_H */ | ||
diff --git a/include/linux/sched/mm.h b/include/linux/sched/mm.h new file mode 100644 index 000000000000..830953ebb391 --- /dev/null +++ b/include/linux/sched/mm.h | |||
@@ -0,0 +1,174 @@ | |||
1 | #ifndef _LINUX_SCHED_MM_H | ||
2 | #define _LINUX_SCHED_MM_H | ||
3 | |||
4 | #include <linux/kernel.h> | ||
5 | #include <linux/atomic.h> | ||
6 | #include <linux/sched.h> | ||
7 | #include <linux/mm_types.h> | ||
8 | #include <linux/gfp.h> | ||
9 | |||
10 | /* | ||
11 | * Routines for handling mm_structs | ||
12 | */ | ||
13 | extern struct mm_struct * mm_alloc(void); | ||
14 | |||
15 | /** | ||
16 | * mmgrab() - Pin a &struct mm_struct. | ||
17 | * @mm: The &struct mm_struct to pin. | ||
18 | * | ||
19 | * Make sure that @mm will not get freed even after the owning task | ||
20 | * exits. This doesn't guarantee that the associated address space | ||
21 | * will still exist later on and mmget_not_zero() has to be used before | ||
22 | * accessing it. | ||
23 | * | ||
24 | * This is a preferred way to to pin @mm for a longer/unbounded amount | ||
25 | * of time. | ||
26 | * | ||
27 | * Use mmdrop() to release the reference acquired by mmgrab(). | ||
28 | * | ||
29 | * See also <Documentation/vm/active_mm.txt> for an in-depth explanation | ||
30 | * of &mm_struct.mm_count vs &mm_struct.mm_users. | ||
31 | */ | ||
32 | static inline void mmgrab(struct mm_struct *mm) | ||
33 | { | ||
34 | atomic_inc(&mm->mm_count); | ||
35 | } | ||
36 | |||
37 | /* mmdrop drops the mm and the page tables */ | ||
38 | extern void __mmdrop(struct mm_struct *); | ||
39 | static inline void mmdrop(struct mm_struct *mm) | ||
40 | { | ||
41 | if (unlikely(atomic_dec_and_test(&mm->mm_count))) | ||
42 | __mmdrop(mm); | ||
43 | } | ||
44 | |||
45 | static inline void mmdrop_async_fn(struct work_struct *work) | ||
46 | { | ||
47 | struct mm_struct *mm = container_of(work, struct mm_struct, async_put_work); | ||
48 | __mmdrop(mm); | ||
49 | } | ||
50 | |||
51 | static inline void mmdrop_async(struct mm_struct *mm) | ||
52 | { | ||
53 | if (unlikely(atomic_dec_and_test(&mm->mm_count))) { | ||
54 | INIT_WORK(&mm->async_put_work, mmdrop_async_fn); | ||
55 | schedule_work(&mm->async_put_work); | ||
56 | } | ||
57 | } | ||
58 | |||
59 | /** | ||
60 | * mmget() - Pin the address space associated with a &struct mm_struct. | ||
61 | * @mm: The address space to pin. | ||
62 | * | ||
63 | * Make sure that the address space of the given &struct mm_struct doesn't | ||
64 | * go away. This does not protect against parts of the address space being | ||
65 | * modified or freed, however. | ||
66 | * | ||
67 | * Never use this function to pin this address space for an | ||
68 | * unbounded/indefinite amount of time. | ||
69 | * | ||
70 | * Use mmput() to release the reference acquired by mmget(). | ||
71 | * | ||
72 | * See also <Documentation/vm/active_mm.txt> for an in-depth explanation | ||
73 | * of &mm_struct.mm_count vs &mm_struct.mm_users. | ||
74 | */ | ||
75 | static inline void mmget(struct mm_struct *mm) | ||
76 | { | ||
77 | atomic_inc(&mm->mm_users); | ||
78 | } | ||
79 | |||
80 | static inline bool mmget_not_zero(struct mm_struct *mm) | ||
81 | { | ||
82 | return atomic_inc_not_zero(&mm->mm_users); | ||
83 | } | ||
84 | |||
85 | /* mmput gets rid of the mappings and all user-space */ | ||
86 | extern void mmput(struct mm_struct *); | ||
87 | #ifdef CONFIG_MMU | ||
88 | /* same as above but performs the slow path from the async context. Can | ||
89 | * be called from the atomic context as well | ||
90 | */ | ||
91 | extern void mmput_async(struct mm_struct *); | ||
92 | #endif | ||
93 | |||
94 | /* Grab a reference to a task's mm, if it is not already going away */ | ||
95 | extern struct mm_struct *get_task_mm(struct task_struct *task); | ||
96 | /* | ||
97 | * Grab a reference to a task's mm, if it is not already going away | ||
98 | * and ptrace_may_access with the mode parameter passed to it | ||
99 | * succeeds. | ||
100 | */ | ||
101 | extern struct mm_struct *mm_access(struct task_struct *task, unsigned int mode); | ||
102 | /* Remove the current tasks stale references to the old mm_struct */ | ||
103 | extern void mm_release(struct task_struct *, struct mm_struct *); | ||
104 | |||
105 | #ifdef CONFIG_MEMCG | ||
106 | extern void mm_update_next_owner(struct mm_struct *mm); | ||
107 | #else | ||
108 | static inline void mm_update_next_owner(struct mm_struct *mm) | ||
109 | { | ||
110 | } | ||
111 | #endif /* CONFIG_MEMCG */ | ||
112 | |||
113 | #ifdef CONFIG_MMU | ||
114 | extern void arch_pick_mmap_layout(struct mm_struct *mm); | ||
115 | extern unsigned long | ||
116 | arch_get_unmapped_area(struct file *, unsigned long, unsigned long, | ||
117 | unsigned long, unsigned long); | ||
118 | extern unsigned long | ||
119 | arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr, | ||
120 | unsigned long len, unsigned long pgoff, | ||
121 | unsigned long flags); | ||
122 | #else | ||
123 | static inline void arch_pick_mmap_layout(struct mm_struct *mm) {} | ||
124 | #endif | ||
125 | |||
126 | static inline bool in_vfork(struct task_struct *tsk) | ||
127 | { | ||
128 | bool ret; | ||
129 | |||
130 | /* | ||
131 | * need RCU to access ->real_parent if CLONE_VM was used along with | ||
132 | * CLONE_PARENT. | ||
133 | * | ||
134 | * We check real_parent->mm == tsk->mm because CLONE_VFORK does not | ||
135 | * imply CLONE_VM | ||
136 | * | ||
137 | * CLONE_VFORK can be used with CLONE_PARENT/CLONE_THREAD and thus | ||
138 | * ->real_parent is not necessarily the task doing vfork(), so in | ||
139 | * theory we can't rely on task_lock() if we want to dereference it. | ||
140 | * | ||
141 | * And in this case we can't trust the real_parent->mm == tsk->mm | ||
142 | * check, it can be false negative. But we do not care, if init or | ||
143 | * another oom-unkillable task does this it should blame itself. | ||
144 | */ | ||
145 | rcu_read_lock(); | ||
146 | ret = tsk->vfork_done && tsk->real_parent->mm == tsk->mm; | ||
147 | rcu_read_unlock(); | ||
148 | |||
149 | return ret; | ||
150 | } | ||
151 | |||
152 | /* __GFP_IO isn't allowed if PF_MEMALLOC_NOIO is set in current->flags | ||
153 | * __GFP_FS is also cleared as it implies __GFP_IO. | ||
154 | */ | ||
155 | static inline gfp_t memalloc_noio_flags(gfp_t flags) | ||
156 | { | ||
157 | if (unlikely(current->flags & PF_MEMALLOC_NOIO)) | ||
158 | flags &= ~(__GFP_IO | __GFP_FS); | ||
159 | return flags; | ||
160 | } | ||
161 | |||
162 | static inline unsigned int memalloc_noio_save(void) | ||
163 | { | ||
164 | unsigned int flags = current->flags & PF_MEMALLOC_NOIO; | ||
165 | current->flags |= PF_MEMALLOC_NOIO; | ||
166 | return flags; | ||
167 | } | ||
168 | |||
169 | static inline void memalloc_noio_restore(unsigned int flags) | ||
170 | { | ||
171 | current->flags = (current->flags & ~PF_MEMALLOC_NOIO) | flags; | ||
172 | } | ||
173 | |||
174 | #endif /* _LINUX_SCHED_MM_H */ | ||
diff --git a/include/linux/sched/nohz.h b/include/linux/sched/nohz.h new file mode 100644 index 000000000000..4995b717500b --- /dev/null +++ b/include/linux/sched/nohz.h | |||
@@ -0,0 +1,43 @@ | |||
1 | #ifndef _LINUX_SCHED_NOHZ_H | ||
2 | #define _LINUX_SCHED_NOHZ_H | ||
3 | |||
4 | /* | ||
5 | * This is the interface between the scheduler and nohz/dyntics: | ||
6 | */ | ||
7 | |||
8 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON) | ||
9 | extern void cpu_load_update_nohz_start(void); | ||
10 | extern void cpu_load_update_nohz_stop(void); | ||
11 | #else | ||
12 | static inline void cpu_load_update_nohz_start(void) { } | ||
13 | static inline void cpu_load_update_nohz_stop(void) { } | ||
14 | #endif | ||
15 | |||
16 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON) | ||
17 | extern void nohz_balance_enter_idle(int cpu); | ||
18 | extern void set_cpu_sd_state_idle(void); | ||
19 | extern int get_nohz_timer_target(void); | ||
20 | #else | ||
21 | static inline void nohz_balance_enter_idle(int cpu) { } | ||
22 | static inline void set_cpu_sd_state_idle(void) { } | ||
23 | #endif | ||
24 | |||
25 | #ifdef CONFIG_NO_HZ_COMMON | ||
26 | void calc_load_enter_idle(void); | ||
27 | void calc_load_exit_idle(void); | ||
28 | #else | ||
29 | static inline void calc_load_enter_idle(void) { } | ||
30 | static inline void calc_load_exit_idle(void) { } | ||
31 | #endif /* CONFIG_NO_HZ_COMMON */ | ||
32 | |||
33 | #if defined(CONFIG_NO_HZ_COMMON) && defined(CONFIG_SMP) | ||
34 | extern void wake_up_nohz_cpu(int cpu); | ||
35 | #else | ||
36 | static inline void wake_up_nohz_cpu(int cpu) { } | ||
37 | #endif | ||
38 | |||
39 | #ifdef CONFIG_NO_HZ_FULL | ||
40 | extern u64 scheduler_tick_max_deferment(void); | ||
41 | #endif | ||
42 | |||
43 | #endif /* _LINUX_SCHED_NOHZ_H */ | ||
diff --git a/include/linux/sched/numa_balancing.h b/include/linux/sched/numa_balancing.h new file mode 100644 index 000000000000..35d5fc77b4be --- /dev/null +++ b/include/linux/sched/numa_balancing.h | |||
@@ -0,0 +1,46 @@ | |||
1 | #ifndef _LINUX_SCHED_NUMA_BALANCING_H | ||
2 | #define _LINUX_SCHED_NUMA_BALANCING_H | ||
3 | |||
4 | /* | ||
5 | * This is the interface between the scheduler and the MM that | ||
6 | * implements memory access pattern based NUMA-balancing: | ||
7 | */ | ||
8 | |||
9 | #include <linux/sched.h> | ||
10 | |||
11 | #define TNF_MIGRATED 0x01 | ||
12 | #define TNF_NO_GROUP 0x02 | ||
13 | #define TNF_SHARED 0x04 | ||
14 | #define TNF_FAULT_LOCAL 0x08 | ||
15 | #define TNF_MIGRATE_FAIL 0x10 | ||
16 | |||
17 | #ifdef CONFIG_NUMA_BALANCING | ||
18 | extern void task_numa_fault(int last_node, int node, int pages, int flags); | ||
19 | extern pid_t task_numa_group_id(struct task_struct *p); | ||
20 | extern void set_numabalancing_state(bool enabled); | ||
21 | extern void task_numa_free(struct task_struct *p); | ||
22 | extern bool should_numa_migrate_memory(struct task_struct *p, struct page *page, | ||
23 | int src_nid, int dst_cpu); | ||
24 | #else | ||
25 | static inline void task_numa_fault(int last_node, int node, int pages, | ||
26 | int flags) | ||
27 | { | ||
28 | } | ||
29 | static inline pid_t task_numa_group_id(struct task_struct *p) | ||
30 | { | ||
31 | return 0; | ||
32 | } | ||
33 | static inline void set_numabalancing_state(bool enabled) | ||
34 | { | ||
35 | } | ||
36 | static inline void task_numa_free(struct task_struct *p) | ||
37 | { | ||
38 | } | ||
39 | static inline bool should_numa_migrate_memory(struct task_struct *p, | ||
40 | struct page *page, int src_nid, int dst_cpu) | ||
41 | { | ||
42 | return true; | ||
43 | } | ||
44 | #endif | ||
45 | |||
46 | #endif /* _LINUX_SCHED_NUMA_BALANCING_H */ | ||
diff --git a/include/linux/sched/prio.h b/include/linux/sched/prio.h index d9cf5a5762d9..2cc450f6ec54 100644 --- a/include/linux/sched/prio.h +++ b/include/linux/sched/prio.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _SCHED_PRIO_H | 1 | #ifndef _LINUX_SCHED_PRIO_H |
2 | #define _SCHED_PRIO_H | 2 | #define _LINUX_SCHED_PRIO_H |
3 | 3 | ||
4 | #define MAX_NICE 19 | 4 | #define MAX_NICE 19 |
5 | #define MIN_NICE -20 | 5 | #define MIN_NICE -20 |
@@ -57,4 +57,4 @@ static inline long rlimit_to_nice(long prio) | |||
57 | return (MAX_NICE - prio + 1); | 57 | return (MAX_NICE - prio + 1); |
58 | } | 58 | } |
59 | 59 | ||
60 | #endif /* _SCHED_PRIO_H */ | 60 | #endif /* _LINUX_SCHED_PRIO_H */ |
diff --git a/include/linux/sched/rt.h b/include/linux/sched/rt.h index a30b172df6e1..3bd668414f61 100644 --- a/include/linux/sched/rt.h +++ b/include/linux/sched/rt.h | |||
@@ -1,7 +1,9 @@ | |||
1 | #ifndef _SCHED_RT_H | 1 | #ifndef _LINUX_SCHED_RT_H |
2 | #define _SCHED_RT_H | 2 | #define _LINUX_SCHED_RT_H |
3 | 3 | ||
4 | #include <linux/sched/prio.h> | 4 | #include <linux/sched.h> |
5 | |||
6 | struct task_struct; | ||
5 | 7 | ||
6 | static inline int rt_prio(int prio) | 8 | static inline int rt_prio(int prio) |
7 | { | 9 | { |
@@ -57,4 +59,4 @@ extern void normalize_rt_tasks(void); | |||
57 | */ | 59 | */ |
58 | #define RR_TIMESLICE (100 * HZ / 1000) | 60 | #define RR_TIMESLICE (100 * HZ / 1000) |
59 | 61 | ||
60 | #endif /* _SCHED_RT_H */ | 62 | #endif /* _LINUX_SCHED_RT_H */ |
diff --git a/include/linux/sched/signal.h b/include/linux/sched/signal.h new file mode 100644 index 000000000000..2cf446704cd4 --- /dev/null +++ b/include/linux/sched/signal.h | |||
@@ -0,0 +1,613 @@ | |||
1 | #ifndef _LINUX_SCHED_SIGNAL_H | ||
2 | #define _LINUX_SCHED_SIGNAL_H | ||
3 | |||
4 | #include <linux/rculist.h> | ||
5 | #include <linux/signal.h> | ||
6 | #include <linux/sched.h> | ||
7 | #include <linux/sched/jobctl.h> | ||
8 | #include <linux/sched/task.h> | ||
9 | #include <linux/cred.h> | ||
10 | |||
11 | /* | ||
12 | * Types defining task->signal and task->sighand and APIs using them: | ||
13 | */ | ||
14 | |||
15 | struct sighand_struct { | ||
16 | atomic_t count; | ||
17 | struct k_sigaction action[_NSIG]; | ||
18 | spinlock_t siglock; | ||
19 | wait_queue_head_t signalfd_wqh; | ||
20 | }; | ||
21 | |||
22 | /* | ||
23 | * Per-process accounting stats: | ||
24 | */ | ||
25 | struct pacct_struct { | ||
26 | int ac_flag; | ||
27 | long ac_exitcode; | ||
28 | unsigned long ac_mem; | ||
29 | u64 ac_utime, ac_stime; | ||
30 | unsigned long ac_minflt, ac_majflt; | ||
31 | }; | ||
32 | |||
33 | struct cpu_itimer { | ||
34 | u64 expires; | ||
35 | u64 incr; | ||
36 | }; | ||
37 | |||
38 | /* | ||
39 | * This is the atomic variant of task_cputime, which can be used for | ||
40 | * storing and updating task_cputime statistics without locking. | ||
41 | */ | ||
42 | struct task_cputime_atomic { | ||
43 | atomic64_t utime; | ||
44 | atomic64_t stime; | ||
45 | atomic64_t sum_exec_runtime; | ||
46 | }; | ||
47 | |||
48 | #define INIT_CPUTIME_ATOMIC \ | ||
49 | (struct task_cputime_atomic) { \ | ||
50 | .utime = ATOMIC64_INIT(0), \ | ||
51 | .stime = ATOMIC64_INIT(0), \ | ||
52 | .sum_exec_runtime = ATOMIC64_INIT(0), \ | ||
53 | } | ||
54 | /** | ||
55 | * struct thread_group_cputimer - thread group interval timer counts | ||
56 | * @cputime_atomic: atomic thread group interval timers. | ||
57 | * @running: true when there are timers running and | ||
58 | * @cputime_atomic receives updates. | ||
59 | * @checking_timer: true when a thread in the group is in the | ||
60 | * process of checking for thread group timers. | ||
61 | * | ||
62 | * This structure contains the version of task_cputime, above, that is | ||
63 | * used for thread group CPU timer calculations. | ||
64 | */ | ||
65 | struct thread_group_cputimer { | ||
66 | struct task_cputime_atomic cputime_atomic; | ||
67 | bool running; | ||
68 | bool checking_timer; | ||
69 | }; | ||
70 | |||
71 | /* | ||
72 | * NOTE! "signal_struct" does not have its own | ||
73 | * locking, because a shared signal_struct always | ||
74 | * implies a shared sighand_struct, so locking | ||
75 | * sighand_struct is always a proper superset of | ||
76 | * the locking of signal_struct. | ||
77 | */ | ||
78 | struct signal_struct { | ||
79 | atomic_t sigcnt; | ||
80 | atomic_t live; | ||
81 | int nr_threads; | ||
82 | struct list_head thread_head; | ||
83 | |||
84 | wait_queue_head_t wait_chldexit; /* for wait4() */ | ||
85 | |||
86 | /* current thread group signal load-balancing target: */ | ||
87 | struct task_struct *curr_target; | ||
88 | |||
89 | /* shared signal handling: */ | ||
90 | struct sigpending shared_pending; | ||
91 | |||
92 | /* thread group exit support */ | ||
93 | int group_exit_code; | ||
94 | /* overloaded: | ||
95 | * - notify group_exit_task when ->count is equal to notify_count | ||
96 | * - everyone except group_exit_task is stopped during signal delivery | ||
97 | * of fatal signals, group_exit_task processes the signal. | ||
98 | */ | ||
99 | int notify_count; | ||
100 | struct task_struct *group_exit_task; | ||
101 | |||
102 | /* thread group stop support, overloads group_exit_code too */ | ||
103 | int group_stop_count; | ||
104 | unsigned int flags; /* see SIGNAL_* flags below */ | ||
105 | |||
106 | /* | ||
107 | * PR_SET_CHILD_SUBREAPER marks a process, like a service | ||
108 | * manager, to re-parent orphan (double-forking) child processes | ||
109 | * to this process instead of 'init'. The service manager is | ||
110 | * able to receive SIGCHLD signals and is able to investigate | ||
111 | * the process until it calls wait(). All children of this | ||
112 | * process will inherit a flag if they should look for a | ||
113 | * child_subreaper process at exit. | ||
114 | */ | ||
115 | unsigned int is_child_subreaper:1; | ||
116 | unsigned int has_child_subreaper:1; | ||
117 | |||
118 | #ifdef CONFIG_POSIX_TIMERS | ||
119 | |||
120 | /* POSIX.1b Interval Timers */ | ||
121 | int posix_timer_id; | ||
122 | struct list_head posix_timers; | ||
123 | |||
124 | /* ITIMER_REAL timer for the process */ | ||
125 | struct hrtimer real_timer; | ||
126 | ktime_t it_real_incr; | ||
127 | |||
128 | /* | ||
129 | * ITIMER_PROF and ITIMER_VIRTUAL timers for the process, we use | ||
130 | * CPUCLOCK_PROF and CPUCLOCK_VIRT for indexing array as these | ||
131 | * values are defined to 0 and 1 respectively | ||
132 | */ | ||
133 | struct cpu_itimer it[2]; | ||
134 | |||
135 | /* | ||
136 | * Thread group totals for process CPU timers. | ||
137 | * See thread_group_cputimer(), et al, for details. | ||
138 | */ | ||
139 | struct thread_group_cputimer cputimer; | ||
140 | |||
141 | /* Earliest-expiration cache. */ | ||
142 | struct task_cputime cputime_expires; | ||
143 | |||
144 | struct list_head cpu_timers[3]; | ||
145 | |||
146 | #endif | ||
147 | |||
148 | struct pid *leader_pid; | ||
149 | |||
150 | #ifdef CONFIG_NO_HZ_FULL | ||
151 | atomic_t tick_dep_mask; | ||
152 | #endif | ||
153 | |||
154 | struct pid *tty_old_pgrp; | ||
155 | |||
156 | /* boolean value for session group leader */ | ||
157 | int leader; | ||
158 | |||
159 | struct tty_struct *tty; /* NULL if no tty */ | ||
160 | |||
161 | #ifdef CONFIG_SCHED_AUTOGROUP | ||
162 | struct autogroup *autogroup; | ||
163 | #endif | ||
164 | /* | ||
165 | * Cumulative resource counters for dead threads in the group, | ||
166 | * and for reaped dead child processes forked by this group. | ||
167 | * Live threads maintain their own counters and add to these | ||
168 | * in __exit_signal, except for the group leader. | ||
169 | */ | ||
170 | seqlock_t stats_lock; | ||
171 | u64 utime, stime, cutime, cstime; | ||
172 | u64 gtime; | ||
173 | u64 cgtime; | ||
174 | struct prev_cputime prev_cputime; | ||
175 | unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; | ||
176 | unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt; | ||
177 | unsigned long inblock, oublock, cinblock, coublock; | ||
178 | unsigned long maxrss, cmaxrss; | ||
179 | struct task_io_accounting ioac; | ||
180 | |||
181 | /* | ||
182 | * Cumulative ns of schedule CPU time fo dead threads in the | ||
183 | * group, not including a zombie group leader, (This only differs | ||
184 | * from jiffies_to_ns(utime + stime) if sched_clock uses something | ||
185 | * other than jiffies.) | ||
186 | */ | ||
187 | unsigned long long sum_sched_runtime; | ||
188 | |||
189 | /* | ||
190 | * We don't bother to synchronize most readers of this at all, | ||
191 | * because there is no reader checking a limit that actually needs | ||
192 | * to get both rlim_cur and rlim_max atomically, and either one | ||
193 | * alone is a single word that can safely be read normally. | ||
194 | * getrlimit/setrlimit use task_lock(current->group_leader) to | ||
195 | * protect this instead of the siglock, because they really | ||
196 | * have no need to disable irqs. | ||
197 | */ | ||
198 | struct rlimit rlim[RLIM_NLIMITS]; | ||
199 | |||
200 | #ifdef CONFIG_BSD_PROCESS_ACCT | ||
201 | struct pacct_struct pacct; /* per-process accounting information */ | ||
202 | #endif | ||
203 | #ifdef CONFIG_TASKSTATS | ||
204 | struct taskstats *stats; | ||
205 | #endif | ||
206 | #ifdef CONFIG_AUDIT | ||
207 | unsigned audit_tty; | ||
208 | struct tty_audit_buf *tty_audit_buf; | ||
209 | #endif | ||
210 | |||
211 | /* | ||
212 | * Thread is the potential origin of an oom condition; kill first on | ||
213 | * oom | ||
214 | */ | ||
215 | bool oom_flag_origin; | ||
216 | short oom_score_adj; /* OOM kill score adjustment */ | ||
217 | short oom_score_adj_min; /* OOM kill score adjustment min value. | ||
218 | * Only settable by CAP_SYS_RESOURCE. */ | ||
219 | struct mm_struct *oom_mm; /* recorded mm when the thread group got | ||
220 | * killed by the oom killer */ | ||
221 | |||
222 | struct mutex cred_guard_mutex; /* guard against foreign influences on | ||
223 | * credential calculations | ||
224 | * (notably. ptrace) */ | ||
225 | }; | ||
226 | |||
227 | /* | ||
228 | * Bits in flags field of signal_struct. | ||
229 | */ | ||
230 | #define SIGNAL_STOP_STOPPED 0x00000001 /* job control stop in effect */ | ||
231 | #define SIGNAL_STOP_CONTINUED 0x00000002 /* SIGCONT since WCONTINUED reap */ | ||
232 | #define SIGNAL_GROUP_EXIT 0x00000004 /* group exit in progress */ | ||
233 | #define SIGNAL_GROUP_COREDUMP 0x00000008 /* coredump in progress */ | ||
234 | /* | ||
235 | * Pending notifications to parent. | ||
236 | */ | ||
237 | #define SIGNAL_CLD_STOPPED 0x00000010 | ||
238 | #define SIGNAL_CLD_CONTINUED 0x00000020 | ||
239 | #define SIGNAL_CLD_MASK (SIGNAL_CLD_STOPPED|SIGNAL_CLD_CONTINUED) | ||
240 | |||
241 | #define SIGNAL_UNKILLABLE 0x00000040 /* for init: ignore fatal signals */ | ||
242 | |||
243 | #define SIGNAL_STOP_MASK (SIGNAL_CLD_MASK | SIGNAL_STOP_STOPPED | \ | ||
244 | SIGNAL_STOP_CONTINUED) | ||
245 | |||
246 | static inline void signal_set_stop_flags(struct signal_struct *sig, | ||
247 | unsigned int flags) | ||
248 | { | ||
249 | WARN_ON(sig->flags & (SIGNAL_GROUP_EXIT|SIGNAL_GROUP_COREDUMP)); | ||
250 | sig->flags = (sig->flags & ~SIGNAL_STOP_MASK) | flags; | ||
251 | } | ||
252 | |||
253 | /* If true, all threads except ->group_exit_task have pending SIGKILL */ | ||
254 | static inline int signal_group_exit(const struct signal_struct *sig) | ||
255 | { | ||
256 | return (sig->flags & SIGNAL_GROUP_EXIT) || | ||
257 | (sig->group_exit_task != NULL); | ||
258 | } | ||
259 | |||
260 | extern void flush_signals(struct task_struct *); | ||
261 | extern void ignore_signals(struct task_struct *); | ||
262 | extern void flush_signal_handlers(struct task_struct *, int force_default); | ||
263 | extern int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info); | ||
264 | |||
265 | static inline int kernel_dequeue_signal(siginfo_t *info) | ||
266 | { | ||
267 | struct task_struct *tsk = current; | ||
268 | siginfo_t __info; | ||
269 | int ret; | ||
270 | |||
271 | spin_lock_irq(&tsk->sighand->siglock); | ||
272 | ret = dequeue_signal(tsk, &tsk->blocked, info ?: &__info); | ||
273 | spin_unlock_irq(&tsk->sighand->siglock); | ||
274 | |||
275 | return ret; | ||
276 | } | ||
277 | |||
278 | static inline void kernel_signal_stop(void) | ||
279 | { | ||
280 | spin_lock_irq(¤t->sighand->siglock); | ||
281 | if (current->jobctl & JOBCTL_STOP_DEQUEUED) | ||
282 | __set_current_state(TASK_STOPPED); | ||
283 | spin_unlock_irq(¤t->sighand->siglock); | ||
284 | |||
285 | schedule(); | ||
286 | } | ||
287 | extern int send_sig_info(int, struct siginfo *, struct task_struct *); | ||
288 | extern int force_sigsegv(int, struct task_struct *); | ||
289 | extern int force_sig_info(int, struct siginfo *, struct task_struct *); | ||
290 | extern int __kill_pgrp_info(int sig, struct siginfo *info, struct pid *pgrp); | ||
291 | extern int kill_pid_info(int sig, struct siginfo *info, struct pid *pid); | ||
292 | extern int kill_pid_info_as_cred(int, struct siginfo *, struct pid *, | ||
293 | const struct cred *, u32); | ||
294 | extern int kill_pgrp(struct pid *pid, int sig, int priv); | ||
295 | extern int kill_pid(struct pid *pid, int sig, int priv); | ||
296 | extern int kill_proc_info(int, struct siginfo *, pid_t); | ||
297 | extern __must_check bool do_notify_parent(struct task_struct *, int); | ||
298 | extern void __wake_up_parent(struct task_struct *p, struct task_struct *parent); | ||
299 | extern void force_sig(int, struct task_struct *); | ||
300 | extern int send_sig(int, struct task_struct *, int); | ||
301 | extern int zap_other_threads(struct task_struct *p); | ||
302 | extern struct sigqueue *sigqueue_alloc(void); | ||
303 | extern void sigqueue_free(struct sigqueue *); | ||
304 | extern int send_sigqueue(struct sigqueue *, struct task_struct *, int group); | ||
305 | extern int do_sigaction(int, struct k_sigaction *, struct k_sigaction *); | ||
306 | |||
307 | static inline int restart_syscall(void) | ||
308 | { | ||
309 | set_tsk_thread_flag(current, TIF_SIGPENDING); | ||
310 | return -ERESTARTNOINTR; | ||
311 | } | ||
312 | |||
313 | static inline int signal_pending(struct task_struct *p) | ||
314 | { | ||
315 | return unlikely(test_tsk_thread_flag(p,TIF_SIGPENDING)); | ||
316 | } | ||
317 | |||
318 | static inline int __fatal_signal_pending(struct task_struct *p) | ||
319 | { | ||
320 | return unlikely(sigismember(&p->pending.signal, SIGKILL)); | ||
321 | } | ||
322 | |||
323 | static inline int fatal_signal_pending(struct task_struct *p) | ||
324 | { | ||
325 | return signal_pending(p) && __fatal_signal_pending(p); | ||
326 | } | ||
327 | |||
328 | static inline int signal_pending_state(long state, struct task_struct *p) | ||
329 | { | ||
330 | if (!(state & (TASK_INTERRUPTIBLE | TASK_WAKEKILL))) | ||
331 | return 0; | ||
332 | if (!signal_pending(p)) | ||
333 | return 0; | ||
334 | |||
335 | return (state & TASK_INTERRUPTIBLE) || __fatal_signal_pending(p); | ||
336 | } | ||
337 | |||
338 | /* | ||
339 | * Reevaluate whether the task has signals pending delivery. | ||
340 | * Wake the task if so. | ||
341 | * This is required every time the blocked sigset_t changes. | ||
342 | * callers must hold sighand->siglock. | ||
343 | */ | ||
344 | extern void recalc_sigpending_and_wake(struct task_struct *t); | ||
345 | extern void recalc_sigpending(void); | ||
346 | |||
347 | extern void signal_wake_up_state(struct task_struct *t, unsigned int state); | ||
348 | |||
349 | static inline void signal_wake_up(struct task_struct *t, bool resume) | ||
350 | { | ||
351 | signal_wake_up_state(t, resume ? TASK_WAKEKILL : 0); | ||
352 | } | ||
353 | static inline void ptrace_signal_wake_up(struct task_struct *t, bool resume) | ||
354 | { | ||
355 | signal_wake_up_state(t, resume ? __TASK_TRACED : 0); | ||
356 | } | ||
357 | |||
358 | #ifdef TIF_RESTORE_SIGMASK | ||
359 | /* | ||
360 | * Legacy restore_sigmask accessors. These are inefficient on | ||
361 | * SMP architectures because they require atomic operations. | ||
362 | */ | ||
363 | |||
364 | /** | ||
365 | * set_restore_sigmask() - make sure saved_sigmask processing gets done | ||
366 | * | ||
367 | * This sets TIF_RESTORE_SIGMASK and ensures that the arch signal code | ||
368 | * will run before returning to user mode, to process the flag. For | ||
369 | * all callers, TIF_SIGPENDING is already set or it's no harm to set | ||
370 | * it. TIF_RESTORE_SIGMASK need not be in the set of bits that the | ||
371 | * arch code will notice on return to user mode, in case those bits | ||
372 | * are scarce. We set TIF_SIGPENDING here to ensure that the arch | ||
373 | * signal code always gets run when TIF_RESTORE_SIGMASK is set. | ||
374 | */ | ||
375 | static inline void set_restore_sigmask(void) | ||
376 | { | ||
377 | set_thread_flag(TIF_RESTORE_SIGMASK); | ||
378 | WARN_ON(!test_thread_flag(TIF_SIGPENDING)); | ||
379 | } | ||
380 | static inline void clear_restore_sigmask(void) | ||
381 | { | ||
382 | clear_thread_flag(TIF_RESTORE_SIGMASK); | ||
383 | } | ||
384 | static inline bool test_restore_sigmask(void) | ||
385 | { | ||
386 | return test_thread_flag(TIF_RESTORE_SIGMASK); | ||
387 | } | ||
388 | static inline bool test_and_clear_restore_sigmask(void) | ||
389 | { | ||
390 | return test_and_clear_thread_flag(TIF_RESTORE_SIGMASK); | ||
391 | } | ||
392 | |||
393 | #else /* TIF_RESTORE_SIGMASK */ | ||
394 | |||
395 | /* Higher-quality implementation, used if TIF_RESTORE_SIGMASK doesn't exist. */ | ||
396 | static inline void set_restore_sigmask(void) | ||
397 | { | ||
398 | current->restore_sigmask = true; | ||
399 | WARN_ON(!test_thread_flag(TIF_SIGPENDING)); | ||
400 | } | ||
401 | static inline void clear_restore_sigmask(void) | ||
402 | { | ||
403 | current->restore_sigmask = false; | ||
404 | } | ||
405 | static inline bool test_restore_sigmask(void) | ||
406 | { | ||
407 | return current->restore_sigmask; | ||
408 | } | ||
409 | static inline bool test_and_clear_restore_sigmask(void) | ||
410 | { | ||
411 | if (!current->restore_sigmask) | ||
412 | return false; | ||
413 | current->restore_sigmask = false; | ||
414 | return true; | ||
415 | } | ||
416 | #endif | ||
417 | |||
418 | static inline void restore_saved_sigmask(void) | ||
419 | { | ||
420 | if (test_and_clear_restore_sigmask()) | ||
421 | __set_current_blocked(¤t->saved_sigmask); | ||
422 | } | ||
423 | |||
424 | static inline sigset_t *sigmask_to_save(void) | ||
425 | { | ||
426 | sigset_t *res = ¤t->blocked; | ||
427 | if (unlikely(test_restore_sigmask())) | ||
428 | res = ¤t->saved_sigmask; | ||
429 | return res; | ||
430 | } | ||
431 | |||
432 | static inline int kill_cad_pid(int sig, int priv) | ||
433 | { | ||
434 | return kill_pid(cad_pid, sig, priv); | ||
435 | } | ||
436 | |||
437 | /* These can be the second arg to send_sig_info/send_group_sig_info. */ | ||
438 | #define SEND_SIG_NOINFO ((struct siginfo *) 0) | ||
439 | #define SEND_SIG_PRIV ((struct siginfo *) 1) | ||
440 | #define SEND_SIG_FORCED ((struct siginfo *) 2) | ||
441 | |||
442 | /* | ||
443 | * True if we are on the alternate signal stack. | ||
444 | */ | ||
445 | static inline int on_sig_stack(unsigned long sp) | ||
446 | { | ||
447 | /* | ||
448 | * If the signal stack is SS_AUTODISARM then, by construction, we | ||
449 | * can't be on the signal stack unless user code deliberately set | ||
450 | * SS_AUTODISARM when we were already on it. | ||
451 | * | ||
452 | * This improves reliability: if user state gets corrupted such that | ||
453 | * the stack pointer points very close to the end of the signal stack, | ||
454 | * then this check will enable the signal to be handled anyway. | ||
455 | */ | ||
456 | if (current->sas_ss_flags & SS_AUTODISARM) | ||
457 | return 0; | ||
458 | |||
459 | #ifdef CONFIG_STACK_GROWSUP | ||
460 | return sp >= current->sas_ss_sp && | ||
461 | sp - current->sas_ss_sp < current->sas_ss_size; | ||
462 | #else | ||
463 | return sp > current->sas_ss_sp && | ||
464 | sp - current->sas_ss_sp <= current->sas_ss_size; | ||
465 | #endif | ||
466 | } | ||
467 | |||
468 | static inline int sas_ss_flags(unsigned long sp) | ||
469 | { | ||
470 | if (!current->sas_ss_size) | ||
471 | return SS_DISABLE; | ||
472 | |||
473 | return on_sig_stack(sp) ? SS_ONSTACK : 0; | ||
474 | } | ||
475 | |||
476 | static inline void sas_ss_reset(struct task_struct *p) | ||
477 | { | ||
478 | p->sas_ss_sp = 0; | ||
479 | p->sas_ss_size = 0; | ||
480 | p->sas_ss_flags = SS_DISABLE; | ||
481 | } | ||
482 | |||
483 | static inline unsigned long sigsp(unsigned long sp, struct ksignal *ksig) | ||
484 | { | ||
485 | if (unlikely((ksig->ka.sa.sa_flags & SA_ONSTACK)) && ! sas_ss_flags(sp)) | ||
486 | #ifdef CONFIG_STACK_GROWSUP | ||
487 | return current->sas_ss_sp; | ||
488 | #else | ||
489 | return current->sas_ss_sp + current->sas_ss_size; | ||
490 | #endif | ||
491 | return sp; | ||
492 | } | ||
493 | |||
494 | extern void __cleanup_sighand(struct sighand_struct *); | ||
495 | extern void flush_itimer_signals(void); | ||
496 | |||
497 | #define tasklist_empty() \ | ||
498 | list_empty(&init_task.tasks) | ||
499 | |||
500 | #define next_task(p) \ | ||
501 | list_entry_rcu((p)->tasks.next, struct task_struct, tasks) | ||
502 | |||
503 | #define for_each_process(p) \ | ||
504 | for (p = &init_task ; (p = next_task(p)) != &init_task ; ) | ||
505 | |||
506 | extern bool current_is_single_threaded(void); | ||
507 | |||
508 | /* | ||
509 | * Careful: do_each_thread/while_each_thread is a double loop so | ||
510 | * 'break' will not work as expected - use goto instead. | ||
511 | */ | ||
512 | #define do_each_thread(g, t) \ | ||
513 | for (g = t = &init_task ; (g = t = next_task(g)) != &init_task ; ) do | ||
514 | |||
515 | #define while_each_thread(g, t) \ | ||
516 | while ((t = next_thread(t)) != g) | ||
517 | |||
518 | #define __for_each_thread(signal, t) \ | ||
519 | list_for_each_entry_rcu(t, &(signal)->thread_head, thread_node) | ||
520 | |||
521 | #define for_each_thread(p, t) \ | ||
522 | __for_each_thread((p)->signal, t) | ||
523 | |||
524 | /* Careful: this is a double loop, 'break' won't work as expected. */ | ||
525 | #define for_each_process_thread(p, t) \ | ||
526 | for_each_process(p) for_each_thread(p, t) | ||
527 | |||
528 | typedef int (*proc_visitor)(struct task_struct *p, void *data); | ||
529 | void walk_process_tree(struct task_struct *top, proc_visitor, void *); | ||
530 | |||
531 | static inline int get_nr_threads(struct task_struct *tsk) | ||
532 | { | ||
533 | return tsk->signal->nr_threads; | ||
534 | } | ||
535 | |||
536 | static inline bool thread_group_leader(struct task_struct *p) | ||
537 | { | ||
538 | return p->exit_signal >= 0; | ||
539 | } | ||
540 | |||
541 | /* Do to the insanities of de_thread it is possible for a process | ||
542 | * to have the pid of the thread group leader without actually being | ||
543 | * the thread group leader. For iteration through the pids in proc | ||
544 | * all we care about is that we have a task with the appropriate | ||
545 | * pid, we don't actually care if we have the right task. | ||
546 | */ | ||
547 | static inline bool has_group_leader_pid(struct task_struct *p) | ||
548 | { | ||
549 | return task_pid(p) == p->signal->leader_pid; | ||
550 | } | ||
551 | |||
552 | static inline | ||
553 | bool same_thread_group(struct task_struct *p1, struct task_struct *p2) | ||
554 | { | ||
555 | return p1->signal == p2->signal; | ||
556 | } | ||
557 | |||
558 | static inline struct task_struct *next_thread(const struct task_struct *p) | ||
559 | { | ||
560 | return list_entry_rcu(p->thread_group.next, | ||
561 | struct task_struct, thread_group); | ||
562 | } | ||
563 | |||
564 | static inline int thread_group_empty(struct task_struct *p) | ||
565 | { | ||
566 | return list_empty(&p->thread_group); | ||
567 | } | ||
568 | |||
569 | #define delay_group_leader(p) \ | ||
570 | (thread_group_leader(p) && !thread_group_empty(p)) | ||
571 | |||
572 | extern struct sighand_struct *__lock_task_sighand(struct task_struct *tsk, | ||
573 | unsigned long *flags); | ||
574 | |||
575 | static inline struct sighand_struct *lock_task_sighand(struct task_struct *tsk, | ||
576 | unsigned long *flags) | ||
577 | { | ||
578 | struct sighand_struct *ret; | ||
579 | |||
580 | ret = __lock_task_sighand(tsk, flags); | ||
581 | (void)__cond_lock(&tsk->sighand->siglock, ret); | ||
582 | return ret; | ||
583 | } | ||
584 | |||
585 | static inline void unlock_task_sighand(struct task_struct *tsk, | ||
586 | unsigned long *flags) | ||
587 | { | ||
588 | spin_unlock_irqrestore(&tsk->sighand->siglock, *flags); | ||
589 | } | ||
590 | |||
591 | static inline unsigned long task_rlimit(const struct task_struct *tsk, | ||
592 | unsigned int limit) | ||
593 | { | ||
594 | return READ_ONCE(tsk->signal->rlim[limit].rlim_cur); | ||
595 | } | ||
596 | |||
597 | static inline unsigned long task_rlimit_max(const struct task_struct *tsk, | ||
598 | unsigned int limit) | ||
599 | { | ||
600 | return READ_ONCE(tsk->signal->rlim[limit].rlim_max); | ||
601 | } | ||
602 | |||
603 | static inline unsigned long rlimit(unsigned int limit) | ||
604 | { | ||
605 | return task_rlimit(current, limit); | ||
606 | } | ||
607 | |||
608 | static inline unsigned long rlimit_max(unsigned int limit) | ||
609 | { | ||
610 | return task_rlimit_max(current, limit); | ||
611 | } | ||
612 | |||
613 | #endif /* _LINUX_SCHED_SIGNAL_H */ | ||
diff --git a/include/linux/sched/stat.h b/include/linux/sched/stat.h new file mode 100644 index 000000000000..141b74c53fad --- /dev/null +++ b/include/linux/sched/stat.h | |||
@@ -0,0 +1,40 @@ | |||
1 | #ifndef _LINUX_SCHED_STAT_H | ||
2 | #define _LINUX_SCHED_STAT_H | ||
3 | |||
4 | #include <linux/percpu.h> | ||
5 | |||
6 | /* | ||
7 | * Various counters maintained by the scheduler and fork(), | ||
8 | * exposed via /proc, sys.c or used by drivers via these APIs. | ||
9 | * | ||
10 | * ( Note that all these values are aquired without locking, | ||
11 | * so they can only be relied on in narrow circumstances. ) | ||
12 | */ | ||
13 | |||
14 | extern unsigned long total_forks; | ||
15 | extern int nr_threads; | ||
16 | DECLARE_PER_CPU(unsigned long, process_counts); | ||
17 | extern int nr_processes(void); | ||
18 | extern unsigned long nr_running(void); | ||
19 | extern bool single_task_running(void); | ||
20 | extern unsigned long nr_iowait(void); | ||
21 | extern unsigned long nr_iowait_cpu(int cpu); | ||
22 | extern void get_iowait_load(unsigned long *nr_waiters, unsigned long *load); | ||
23 | |||
24 | static inline int sched_info_on(void) | ||
25 | { | ||
26 | #ifdef CONFIG_SCHEDSTATS | ||
27 | return 1; | ||
28 | #elif defined(CONFIG_TASK_DELAY_ACCT) | ||
29 | extern int delayacct_on; | ||
30 | return delayacct_on; | ||
31 | #else | ||
32 | return 0; | ||
33 | #endif | ||
34 | } | ||
35 | |||
36 | #ifdef CONFIG_SCHEDSTATS | ||
37 | void force_schedstat_enabled(void); | ||
38 | #endif | ||
39 | |||
40 | #endif /* _LINUX_SCHED_STAT_H */ | ||
diff --git a/include/linux/sched/sysctl.h b/include/linux/sched/sysctl.h index 49308e142aae..0f5ecd4d298e 100644 --- a/include/linux/sched/sysctl.h +++ b/include/linux/sched/sysctl.h | |||
@@ -1,5 +1,9 @@ | |||
1 | #ifndef _SCHED_SYSCTL_H | 1 | #ifndef _LINUX_SCHED_SYSCTL_H |
2 | #define _SCHED_SYSCTL_H | 2 | #define _LINUX_SCHED_SYSCTL_H |
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | struct ctl_table; | ||
3 | 7 | ||
4 | #ifdef CONFIG_DETECT_HUNG_TASK | 8 | #ifdef CONFIG_DETECT_HUNG_TASK |
5 | extern int sysctl_hung_task_check_count; | 9 | extern int sysctl_hung_task_check_count; |
@@ -78,4 +82,4 @@ extern int sysctl_schedstats(struct ctl_table *table, int write, | |||
78 | void __user *buffer, size_t *lenp, | 82 | void __user *buffer, size_t *lenp, |
79 | loff_t *ppos); | 83 | loff_t *ppos); |
80 | 84 | ||
81 | #endif /* _SCHED_SYSCTL_H */ | 85 | #endif /* _LINUX_SCHED_SYSCTL_H */ |
diff --git a/include/linux/sched/task.h b/include/linux/sched/task.h new file mode 100644 index 000000000000..a978d7189cfd --- /dev/null +++ b/include/linux/sched/task.h | |||
@@ -0,0 +1,139 @@ | |||
1 | #ifndef _LINUX_SCHED_TASK_H | ||
2 | #define _LINUX_SCHED_TASK_H | ||
3 | |||
4 | /* | ||
5 | * Interface between the scheduler and various task lifetime (fork()/exit()) | ||
6 | * functionality: | ||
7 | */ | ||
8 | |||
9 | #include <linux/sched.h> | ||
10 | |||
11 | struct task_struct; | ||
12 | union thread_union; | ||
13 | |||
14 | /* | ||
15 | * This serializes "schedule()" and also protects | ||
16 | * the run-queue from deletions/modifications (but | ||
17 | * _adding_ to the beginning of the run-queue has | ||
18 | * a separate lock). | ||
19 | */ | ||
20 | extern rwlock_t tasklist_lock; | ||
21 | extern spinlock_t mmlist_lock; | ||
22 | |||
23 | extern union thread_union init_thread_union; | ||
24 | extern struct task_struct init_task; | ||
25 | |||
26 | #ifdef CONFIG_PROVE_RCU | ||
27 | extern int lockdep_tasklist_lock_is_held(void); | ||
28 | #endif /* #ifdef CONFIG_PROVE_RCU */ | ||
29 | |||
30 | extern asmlinkage void schedule_tail(struct task_struct *prev); | ||
31 | extern void init_idle(struct task_struct *idle, int cpu); | ||
32 | extern void init_idle_bootup_task(struct task_struct *idle); | ||
33 | |||
34 | extern int sched_fork(unsigned long clone_flags, struct task_struct *p); | ||
35 | extern void sched_dead(struct task_struct *p); | ||
36 | |||
37 | void __noreturn do_task_dead(void); | ||
38 | |||
39 | extern void proc_caches_init(void); | ||
40 | |||
41 | extern void release_task(struct task_struct * p); | ||
42 | |||
43 | #ifdef CONFIG_HAVE_COPY_THREAD_TLS | ||
44 | extern int copy_thread_tls(unsigned long, unsigned long, unsigned long, | ||
45 | struct task_struct *, unsigned long); | ||
46 | #else | ||
47 | extern int copy_thread(unsigned long, unsigned long, unsigned long, | ||
48 | struct task_struct *); | ||
49 | |||
50 | /* Architectures that haven't opted into copy_thread_tls get the tls argument | ||
51 | * via pt_regs, so ignore the tls argument passed via C. */ | ||
52 | static inline int copy_thread_tls( | ||
53 | unsigned long clone_flags, unsigned long sp, unsigned long arg, | ||
54 | struct task_struct *p, unsigned long tls) | ||
55 | { | ||
56 | return copy_thread(clone_flags, sp, arg, p); | ||
57 | } | ||
58 | #endif | ||
59 | extern void flush_thread(void); | ||
60 | |||
61 | #ifdef CONFIG_HAVE_EXIT_THREAD | ||
62 | extern void exit_thread(struct task_struct *tsk); | ||
63 | #else | ||
64 | static inline void exit_thread(struct task_struct *tsk) | ||
65 | { | ||
66 | } | ||
67 | #endif | ||
68 | extern void do_group_exit(int); | ||
69 | |||
70 | extern void exit_files(struct task_struct *); | ||
71 | extern void exit_itimers(struct signal_struct *); | ||
72 | |||
73 | extern long _do_fork(unsigned long, unsigned long, unsigned long, int __user *, int __user *, unsigned long); | ||
74 | extern long do_fork(unsigned long, unsigned long, unsigned long, int __user *, int __user *); | ||
75 | struct task_struct *fork_idle(int); | ||
76 | extern pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); | ||
77 | |||
78 | extern void free_task(struct task_struct *tsk); | ||
79 | |||
80 | /* sched_exec is called by processes performing an exec */ | ||
81 | #ifdef CONFIG_SMP | ||
82 | extern void sched_exec(void); | ||
83 | #else | ||
84 | #define sched_exec() {} | ||
85 | #endif | ||
86 | |||
87 | #define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0) | ||
88 | |||
89 | extern void __put_task_struct(struct task_struct *t); | ||
90 | |||
91 | static inline void put_task_struct(struct task_struct *t) | ||
92 | { | ||
93 | if (atomic_dec_and_test(&t->usage)) | ||
94 | __put_task_struct(t); | ||
95 | } | ||
96 | |||
97 | struct task_struct *task_rcu_dereference(struct task_struct **ptask); | ||
98 | struct task_struct *try_get_task_struct(struct task_struct **ptask); | ||
99 | |||
100 | |||
101 | #ifdef CONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT | ||
102 | extern int arch_task_struct_size __read_mostly; | ||
103 | #else | ||
104 | # define arch_task_struct_size (sizeof(struct task_struct)) | ||
105 | #endif | ||
106 | |||
107 | #ifdef CONFIG_VMAP_STACK | ||
108 | static inline struct vm_struct *task_stack_vm_area(const struct task_struct *t) | ||
109 | { | ||
110 | return t->stack_vm_area; | ||
111 | } | ||
112 | #else | ||
113 | static inline struct vm_struct *task_stack_vm_area(const struct task_struct *t) | ||
114 | { | ||
115 | return NULL; | ||
116 | } | ||
117 | #endif | ||
118 | |||
119 | /* | ||
120 | * Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring | ||
121 | * subscriptions and synchronises with wait4(). Also used in procfs. Also | ||
122 | * pins the final release of task.io_context. Also protects ->cpuset and | ||
123 | * ->cgroup.subsys[]. And ->vfork_done. | ||
124 | * | ||
125 | * Nests both inside and outside of read_lock(&tasklist_lock). | ||
126 | * It must not be nested with write_lock_irq(&tasklist_lock), | ||
127 | * neither inside nor outside. | ||
128 | */ | ||
129 | static inline void task_lock(struct task_struct *p) | ||
130 | { | ||
131 | spin_lock(&p->alloc_lock); | ||
132 | } | ||
133 | |||
134 | static inline void task_unlock(struct task_struct *p) | ||
135 | { | ||
136 | spin_unlock(&p->alloc_lock); | ||
137 | } | ||
138 | |||
139 | #endif /* _LINUX_SCHED_TASK_H */ | ||
diff --git a/include/linux/sched/task_stack.h b/include/linux/sched/task_stack.h new file mode 100644 index 000000000000..df6ea6665b31 --- /dev/null +++ b/include/linux/sched/task_stack.h | |||
@@ -0,0 +1,121 @@ | |||
1 | #ifndef _LINUX_SCHED_TASK_STACK_H | ||
2 | #define _LINUX_SCHED_TASK_STACK_H | ||
3 | |||
4 | /* | ||
5 | * task->stack (kernel stack) handling interfaces: | ||
6 | */ | ||
7 | |||
8 | #include <linux/sched.h> | ||
9 | #include <linux/magic.h> | ||
10 | |||
11 | #ifdef CONFIG_THREAD_INFO_IN_TASK | ||
12 | |||
13 | /* | ||
14 | * When accessing the stack of a non-current task that might exit, use | ||
15 | * try_get_task_stack() instead. task_stack_page will return a pointer | ||
16 | * that could get freed out from under you. | ||
17 | */ | ||
18 | static inline void *task_stack_page(const struct task_struct *task) | ||
19 | { | ||
20 | return task->stack; | ||
21 | } | ||
22 | |||
23 | #define setup_thread_stack(new,old) do { } while(0) | ||
24 | |||
25 | static inline unsigned long *end_of_stack(const struct task_struct *task) | ||
26 | { | ||
27 | return task->stack; | ||
28 | } | ||
29 | |||
30 | #elif !defined(__HAVE_THREAD_FUNCTIONS) | ||
31 | |||
32 | #define task_stack_page(task) ((void *)(task)->stack) | ||
33 | |||
34 | static inline void setup_thread_stack(struct task_struct *p, struct task_struct *org) | ||
35 | { | ||
36 | *task_thread_info(p) = *task_thread_info(org); | ||
37 | task_thread_info(p)->task = p; | ||
38 | } | ||
39 | |||
40 | /* | ||
41 | * Return the address of the last usable long on the stack. | ||
42 | * | ||
43 | * When the stack grows down, this is just above the thread | ||
44 | * info struct. Going any lower will corrupt the threadinfo. | ||
45 | * | ||
46 | * When the stack grows up, this is the highest address. | ||
47 | * Beyond that position, we corrupt data on the next page. | ||
48 | */ | ||
49 | static inline unsigned long *end_of_stack(struct task_struct *p) | ||
50 | { | ||
51 | #ifdef CONFIG_STACK_GROWSUP | ||
52 | return (unsigned long *)((unsigned long)task_thread_info(p) + THREAD_SIZE) - 1; | ||
53 | #else | ||
54 | return (unsigned long *)(task_thread_info(p) + 1); | ||
55 | #endif | ||
56 | } | ||
57 | |||
58 | #endif | ||
59 | |||
60 | #ifdef CONFIG_THREAD_INFO_IN_TASK | ||
61 | static inline void *try_get_task_stack(struct task_struct *tsk) | ||
62 | { | ||
63 | return atomic_inc_not_zero(&tsk->stack_refcount) ? | ||
64 | task_stack_page(tsk) : NULL; | ||
65 | } | ||
66 | |||
67 | extern void put_task_stack(struct task_struct *tsk); | ||
68 | #else | ||
69 | static inline void *try_get_task_stack(struct task_struct *tsk) | ||
70 | { | ||
71 | return task_stack_page(tsk); | ||
72 | } | ||
73 | |||
74 | static inline void put_task_stack(struct task_struct *tsk) {} | ||
75 | #endif | ||
76 | |||
77 | #define task_stack_end_corrupted(task) \ | ||
78 | (*(end_of_stack(task)) != STACK_END_MAGIC) | ||
79 | |||
80 | static inline int object_is_on_stack(void *obj) | ||
81 | { | ||
82 | void *stack = task_stack_page(current); | ||
83 | |||
84 | return (obj >= stack) && (obj < (stack + THREAD_SIZE)); | ||
85 | } | ||
86 | |||
87 | extern void thread_stack_cache_init(void); | ||
88 | |||
89 | #ifdef CONFIG_DEBUG_STACK_USAGE | ||
90 | static inline unsigned long stack_not_used(struct task_struct *p) | ||
91 | { | ||
92 | unsigned long *n = end_of_stack(p); | ||
93 | |||
94 | do { /* Skip over canary */ | ||
95 | # ifdef CONFIG_STACK_GROWSUP | ||
96 | n--; | ||
97 | # else | ||
98 | n++; | ||
99 | # endif | ||
100 | } while (!*n); | ||
101 | |||
102 | # ifdef CONFIG_STACK_GROWSUP | ||
103 | return (unsigned long)end_of_stack(p) - (unsigned long)n; | ||
104 | # else | ||
105 | return (unsigned long)n - (unsigned long)end_of_stack(p); | ||
106 | # endif | ||
107 | } | ||
108 | #endif | ||
109 | extern void set_task_stack_end_magic(struct task_struct *tsk); | ||
110 | |||
111 | #ifndef __HAVE_ARCH_KSTACK_END | ||
112 | static inline int kstack_end(void *addr) | ||
113 | { | ||
114 | /* Reliable end of stack detection: | ||
115 | * Some APM bios versions misalign the stack | ||
116 | */ | ||
117 | return !(((unsigned long)addr+sizeof(void*)-1) & (THREAD_SIZE-sizeof(void*))); | ||
118 | } | ||
119 | #endif | ||
120 | |||
121 | #endif /* _LINUX_SCHED_TASK_STACK_H */ | ||
diff --git a/include/linux/sched/topology.h b/include/linux/sched/topology.h new file mode 100644 index 000000000000..7d065abc7a47 --- /dev/null +++ b/include/linux/sched/topology.h | |||
@@ -0,0 +1,226 @@ | |||
1 | #ifndef _LINUX_SCHED_TOPOLOGY_H | ||
2 | #define _LINUX_SCHED_TOPOLOGY_H | ||
3 | |||
4 | #include <linux/topology.h> | ||
5 | |||
6 | #include <linux/sched/idle.h> | ||
7 | |||
8 | /* | ||
9 | * sched-domains (multiprocessor balancing) declarations: | ||
10 | */ | ||
11 | #ifdef CONFIG_SMP | ||
12 | |||
13 | #define SD_LOAD_BALANCE 0x0001 /* Do load balancing on this domain. */ | ||
14 | #define SD_BALANCE_NEWIDLE 0x0002 /* Balance when about to become idle */ | ||
15 | #define SD_BALANCE_EXEC 0x0004 /* Balance on exec */ | ||
16 | #define SD_BALANCE_FORK 0x0008 /* Balance on fork, clone */ | ||
17 | #define SD_BALANCE_WAKE 0x0010 /* Balance on wakeup */ | ||
18 | #define SD_WAKE_AFFINE 0x0020 /* Wake task to waking CPU */ | ||
19 | #define SD_ASYM_CPUCAPACITY 0x0040 /* Groups have different max cpu capacities */ | ||
20 | #define SD_SHARE_CPUCAPACITY 0x0080 /* Domain members share cpu capacity */ | ||
21 | #define SD_SHARE_POWERDOMAIN 0x0100 /* Domain members share power domain */ | ||
22 | #define SD_SHARE_PKG_RESOURCES 0x0200 /* Domain members share cpu pkg resources */ | ||
23 | #define SD_SERIALIZE 0x0400 /* Only a single load balancing instance */ | ||
24 | #define SD_ASYM_PACKING 0x0800 /* Place busy groups earlier in the domain */ | ||
25 | #define SD_PREFER_SIBLING 0x1000 /* Prefer to place tasks in a sibling domain */ | ||
26 | #define SD_OVERLAP 0x2000 /* sched_domains of this level overlap */ | ||
27 | #define SD_NUMA 0x4000 /* cross-node balancing */ | ||
28 | |||
29 | /* | ||
30 | * Increase resolution of cpu_capacity calculations | ||
31 | */ | ||
32 | #define SCHED_CAPACITY_SHIFT SCHED_FIXEDPOINT_SHIFT | ||
33 | #define SCHED_CAPACITY_SCALE (1L << SCHED_CAPACITY_SHIFT) | ||
34 | |||
35 | #ifdef CONFIG_SCHED_SMT | ||
36 | static inline int cpu_smt_flags(void) | ||
37 | { | ||
38 | return SD_SHARE_CPUCAPACITY | SD_SHARE_PKG_RESOURCES; | ||
39 | } | ||
40 | #endif | ||
41 | |||
42 | #ifdef CONFIG_SCHED_MC | ||
43 | static inline int cpu_core_flags(void) | ||
44 | { | ||
45 | return SD_SHARE_PKG_RESOURCES; | ||
46 | } | ||
47 | #endif | ||
48 | |||
49 | #ifdef CONFIG_NUMA | ||
50 | static inline int cpu_numa_flags(void) | ||
51 | { | ||
52 | return SD_NUMA; | ||
53 | } | ||
54 | #endif | ||
55 | |||
56 | extern int arch_asym_cpu_priority(int cpu); | ||
57 | |||
58 | struct sched_domain_attr { | ||
59 | int relax_domain_level; | ||
60 | }; | ||
61 | |||
62 | #define SD_ATTR_INIT (struct sched_domain_attr) { \ | ||
63 | .relax_domain_level = -1, \ | ||
64 | } | ||
65 | |||
66 | extern int sched_domain_level_max; | ||
67 | |||
68 | struct sched_group; | ||
69 | |||
70 | struct sched_domain_shared { | ||
71 | atomic_t ref; | ||
72 | atomic_t nr_busy_cpus; | ||
73 | int has_idle_cores; | ||
74 | }; | ||
75 | |||
76 | struct sched_domain { | ||
77 | /* These fields must be setup */ | ||
78 | struct sched_domain *parent; /* top domain must be null terminated */ | ||
79 | struct sched_domain *child; /* bottom domain must be null terminated */ | ||
80 | struct sched_group *groups; /* the balancing groups of the domain */ | ||
81 | unsigned long min_interval; /* Minimum balance interval ms */ | ||
82 | unsigned long max_interval; /* Maximum balance interval ms */ | ||
83 | unsigned int busy_factor; /* less balancing by factor if busy */ | ||
84 | unsigned int imbalance_pct; /* No balance until over watermark */ | ||
85 | unsigned int cache_nice_tries; /* Leave cache hot tasks for # tries */ | ||
86 | unsigned int busy_idx; | ||
87 | unsigned int idle_idx; | ||
88 | unsigned int newidle_idx; | ||
89 | unsigned int wake_idx; | ||
90 | unsigned int forkexec_idx; | ||
91 | unsigned int smt_gain; | ||
92 | |||
93 | int nohz_idle; /* NOHZ IDLE status */ | ||
94 | int flags; /* See SD_* */ | ||
95 | int level; | ||
96 | |||
97 | /* Runtime fields. */ | ||
98 | unsigned long last_balance; /* init to jiffies. units in jiffies */ | ||
99 | unsigned int balance_interval; /* initialise to 1. units in ms. */ | ||
100 | unsigned int nr_balance_failed; /* initialise to 0 */ | ||
101 | |||
102 | /* idle_balance() stats */ | ||
103 | u64 max_newidle_lb_cost; | ||
104 | unsigned long next_decay_max_lb_cost; | ||
105 | |||
106 | u64 avg_scan_cost; /* select_idle_sibling */ | ||
107 | |||
108 | #ifdef CONFIG_SCHEDSTATS | ||
109 | /* load_balance() stats */ | ||
110 | unsigned int lb_count[CPU_MAX_IDLE_TYPES]; | ||
111 | unsigned int lb_failed[CPU_MAX_IDLE_TYPES]; | ||
112 | unsigned int lb_balanced[CPU_MAX_IDLE_TYPES]; | ||
113 | unsigned int lb_imbalance[CPU_MAX_IDLE_TYPES]; | ||
114 | unsigned int lb_gained[CPU_MAX_IDLE_TYPES]; | ||
115 | unsigned int lb_hot_gained[CPU_MAX_IDLE_TYPES]; | ||
116 | unsigned int lb_nobusyg[CPU_MAX_IDLE_TYPES]; | ||
117 | unsigned int lb_nobusyq[CPU_MAX_IDLE_TYPES]; | ||
118 | |||
119 | /* Active load balancing */ | ||
120 | unsigned int alb_count; | ||
121 | unsigned int alb_failed; | ||
122 | unsigned int alb_pushed; | ||
123 | |||
124 | /* SD_BALANCE_EXEC stats */ | ||
125 | unsigned int sbe_count; | ||
126 | unsigned int sbe_balanced; | ||
127 | unsigned int sbe_pushed; | ||
128 | |||
129 | /* SD_BALANCE_FORK stats */ | ||
130 | unsigned int sbf_count; | ||
131 | unsigned int sbf_balanced; | ||
132 | unsigned int sbf_pushed; | ||
133 | |||
134 | /* try_to_wake_up() stats */ | ||
135 | unsigned int ttwu_wake_remote; | ||
136 | unsigned int ttwu_move_affine; | ||
137 | unsigned int ttwu_move_balance; | ||
138 | #endif | ||
139 | #ifdef CONFIG_SCHED_DEBUG | ||
140 | char *name; | ||
141 | #endif | ||
142 | union { | ||
143 | void *private; /* used during construction */ | ||
144 | struct rcu_head rcu; /* used during destruction */ | ||
145 | }; | ||
146 | struct sched_domain_shared *shared; | ||
147 | |||
148 | unsigned int span_weight; | ||
149 | /* | ||
150 | * Span of all CPUs in this domain. | ||
151 | * | ||
152 | * NOTE: this field is variable length. (Allocated dynamically | ||
153 | * by attaching extra space to the end of the structure, | ||
154 | * depending on how many CPUs the kernel has booted up with) | ||
155 | */ | ||
156 | unsigned long span[0]; | ||
157 | }; | ||
158 | |||
159 | static inline struct cpumask *sched_domain_span(struct sched_domain *sd) | ||
160 | { | ||
161 | return to_cpumask(sd->span); | ||
162 | } | ||
163 | |||
164 | extern void partition_sched_domains(int ndoms_new, cpumask_var_t doms_new[], | ||
165 | struct sched_domain_attr *dattr_new); | ||
166 | |||
167 | /* Allocate an array of sched domains, for partition_sched_domains(). */ | ||
168 | cpumask_var_t *alloc_sched_domains(unsigned int ndoms); | ||
169 | void free_sched_domains(cpumask_var_t doms[], unsigned int ndoms); | ||
170 | |||
171 | bool cpus_share_cache(int this_cpu, int that_cpu); | ||
172 | |||
173 | typedef const struct cpumask *(*sched_domain_mask_f)(int cpu); | ||
174 | typedef int (*sched_domain_flags_f)(void); | ||
175 | |||
176 | #define SDTL_OVERLAP 0x01 | ||
177 | |||
178 | struct sd_data { | ||
179 | struct sched_domain **__percpu sd; | ||
180 | struct sched_domain_shared **__percpu sds; | ||
181 | struct sched_group **__percpu sg; | ||
182 | struct sched_group_capacity **__percpu sgc; | ||
183 | }; | ||
184 | |||
185 | struct sched_domain_topology_level { | ||
186 | sched_domain_mask_f mask; | ||
187 | sched_domain_flags_f sd_flags; | ||
188 | int flags; | ||
189 | int numa_level; | ||
190 | struct sd_data data; | ||
191 | #ifdef CONFIG_SCHED_DEBUG | ||
192 | char *name; | ||
193 | #endif | ||
194 | }; | ||
195 | |||
196 | extern void set_sched_topology(struct sched_domain_topology_level *tl); | ||
197 | |||
198 | #ifdef CONFIG_SCHED_DEBUG | ||
199 | # define SD_INIT_NAME(type) .name = #type | ||
200 | #else | ||
201 | # define SD_INIT_NAME(type) | ||
202 | #endif | ||
203 | |||
204 | #else /* CONFIG_SMP */ | ||
205 | |||
206 | struct sched_domain_attr; | ||
207 | |||
208 | static inline void | ||
209 | partition_sched_domains(int ndoms_new, cpumask_var_t doms_new[], | ||
210 | struct sched_domain_attr *dattr_new) | ||
211 | { | ||
212 | } | ||
213 | |||
214 | static inline bool cpus_share_cache(int this_cpu, int that_cpu) | ||
215 | { | ||
216 | return true; | ||
217 | } | ||
218 | |||
219 | #endif /* !CONFIG_SMP */ | ||
220 | |||
221 | static inline int task_node(const struct task_struct *p) | ||
222 | { | ||
223 | return cpu_to_node(task_cpu(p)); | ||
224 | } | ||
225 | |||
226 | #endif /* _LINUX_SCHED_TOPOLOGY_H */ | ||
diff --git a/include/linux/sched/user.h b/include/linux/sched/user.h new file mode 100644 index 000000000000..5d5415e129d4 --- /dev/null +++ b/include/linux/sched/user.h | |||
@@ -0,0 +1,61 @@ | |||
1 | #ifndef _LINUX_SCHED_USER_H | ||
2 | #define _LINUX_SCHED_USER_H | ||
3 | |||
4 | #include <linux/uidgid.h> | ||
5 | #include <linux/atomic.h> | ||
6 | |||
7 | struct key; | ||
8 | |||
9 | /* | ||
10 | * Some day this will be a full-fledged user tracking system.. | ||
11 | */ | ||
12 | struct user_struct { | ||
13 | atomic_t __count; /* reference count */ | ||
14 | atomic_t processes; /* How many processes does this user have? */ | ||
15 | atomic_t sigpending; /* How many pending signals does this user have? */ | ||
16 | #ifdef CONFIG_FANOTIFY | ||
17 | atomic_t fanotify_listeners; | ||
18 | #endif | ||
19 | #ifdef CONFIG_EPOLL | ||
20 | atomic_long_t epoll_watches; /* The number of file descriptors currently watched */ | ||
21 | #endif | ||
22 | #ifdef CONFIG_POSIX_MQUEUE | ||
23 | /* protected by mq_lock */ | ||
24 | unsigned long mq_bytes; /* How many bytes can be allocated to mqueue? */ | ||
25 | #endif | ||
26 | unsigned long locked_shm; /* How many pages of mlocked shm ? */ | ||
27 | unsigned long unix_inflight; /* How many files in flight in unix sockets */ | ||
28 | atomic_long_t pipe_bufs; /* how many pages are allocated in pipe buffers */ | ||
29 | |||
30 | #ifdef CONFIG_KEYS | ||
31 | struct key *uid_keyring; /* UID specific keyring */ | ||
32 | struct key *session_keyring; /* UID's default session keyring */ | ||
33 | #endif | ||
34 | |||
35 | /* Hash table maintenance information */ | ||
36 | struct hlist_node uidhash_node; | ||
37 | kuid_t uid; | ||
38 | |||
39 | #if defined(CONFIG_PERF_EVENTS) || defined(CONFIG_BPF_SYSCALL) | ||
40 | atomic_long_t locked_vm; | ||
41 | #endif | ||
42 | }; | ||
43 | |||
44 | extern int uids_sysfs_init(void); | ||
45 | |||
46 | extern struct user_struct *find_user(kuid_t); | ||
47 | |||
48 | extern struct user_struct root_user; | ||
49 | #define INIT_USER (&root_user) | ||
50 | |||
51 | |||
52 | /* per-UID process charging. */ | ||
53 | extern struct user_struct * alloc_uid(kuid_t); | ||
54 | static inline struct user_struct *get_uid(struct user_struct *u) | ||
55 | { | ||
56 | atomic_inc(&u->__count); | ||
57 | return u; | ||
58 | } | ||
59 | extern void free_uid(struct user_struct *); | ||
60 | |||
61 | #endif /* _LINUX_SCHED_USER_H */ | ||
diff --git a/include/linux/sched/wake_q.h b/include/linux/sched/wake_q.h new file mode 100644 index 000000000000..d03d8a9047dc --- /dev/null +++ b/include/linux/sched/wake_q.h | |||
@@ -0,0 +1,53 @@ | |||
1 | #ifndef _LINUX_SCHED_WAKE_Q_H | ||
2 | #define _LINUX_SCHED_WAKE_Q_H | ||
3 | |||
4 | /* | ||
5 | * Wake-queues are lists of tasks with a pending wakeup, whose | ||
6 | * callers have already marked the task as woken internally, | ||
7 | * and can thus carry on. A common use case is being able to | ||
8 | * do the wakeups once the corresponding user lock as been | ||
9 | * released. | ||
10 | * | ||
11 | * We hold reference to each task in the list across the wakeup, | ||
12 | * thus guaranteeing that the memory is still valid by the time | ||
13 | * the actual wakeups are performed in wake_up_q(). | ||
14 | * | ||
15 | * One per task suffices, because there's never a need for a task to be | ||
16 | * in two wake queues simultaneously; it is forbidden to abandon a task | ||
17 | * in a wake queue (a call to wake_up_q() _must_ follow), so if a task is | ||
18 | * already in a wake queue, the wakeup will happen soon and the second | ||
19 | * waker can just skip it. | ||
20 | * | ||
21 | * The DEFINE_WAKE_Q macro declares and initializes the list head. | ||
22 | * wake_up_q() does NOT reinitialize the list; it's expected to be | ||
23 | * called near the end of a function. Otherwise, the list can be | ||
24 | * re-initialized for later re-use by wake_q_init(). | ||
25 | * | ||
26 | * Note that this can cause spurious wakeups. schedule() callers | ||
27 | * must ensure the call is done inside a loop, confirming that the | ||
28 | * wakeup condition has in fact occurred. | ||
29 | */ | ||
30 | |||
31 | #include <linux/sched.h> | ||
32 | |||
33 | struct wake_q_head { | ||
34 | struct wake_q_node *first; | ||
35 | struct wake_q_node **lastp; | ||
36 | }; | ||
37 | |||
38 | #define WAKE_Q_TAIL ((struct wake_q_node *) 0x01) | ||
39 | |||
40 | #define DEFINE_WAKE_Q(name) \ | ||
41 | struct wake_q_head name = { WAKE_Q_TAIL, &name.first } | ||
42 | |||
43 | static inline void wake_q_init(struct wake_q_head *head) | ||
44 | { | ||
45 | head->first = WAKE_Q_TAIL; | ||
46 | head->lastp = &head->first; | ||
47 | } | ||
48 | |||
49 | extern void wake_q_add(struct wake_q_head *head, | ||
50 | struct task_struct *task); | ||
51 | extern void wake_up_q(struct wake_q_head *head); | ||
52 | |||
53 | #endif /* _LINUX_SCHED_WAKE_Q_H */ | ||
diff --git a/include/linux/sched/xacct.h b/include/linux/sched/xacct.h new file mode 100644 index 000000000000..a28156a0d34a --- /dev/null +++ b/include/linux/sched/xacct.h | |||
@@ -0,0 +1,48 @@ | |||
1 | #ifndef _LINUX_SCHED_XACCT_H | ||
2 | #define _LINUX_SCHED_XACCT_H | ||
3 | |||
4 | /* | ||
5 | * Extended task accounting methods: | ||
6 | */ | ||
7 | |||
8 | #include <linux/sched.h> | ||
9 | |||
10 | #ifdef CONFIG_TASK_XACCT | ||
11 | static inline void add_rchar(struct task_struct *tsk, ssize_t amt) | ||
12 | { | ||
13 | tsk->ioac.rchar += amt; | ||
14 | } | ||
15 | |||
16 | static inline void add_wchar(struct task_struct *tsk, ssize_t amt) | ||
17 | { | ||
18 | tsk->ioac.wchar += amt; | ||
19 | } | ||
20 | |||
21 | static inline void inc_syscr(struct task_struct *tsk) | ||
22 | { | ||
23 | tsk->ioac.syscr++; | ||
24 | } | ||
25 | |||
26 | static inline void inc_syscw(struct task_struct *tsk) | ||
27 | { | ||
28 | tsk->ioac.syscw++; | ||
29 | } | ||
30 | #else | ||
31 | static inline void add_rchar(struct task_struct *tsk, ssize_t amt) | ||
32 | { | ||
33 | } | ||
34 | |||
35 | static inline void add_wchar(struct task_struct *tsk, ssize_t amt) | ||
36 | { | ||
37 | } | ||
38 | |||
39 | static inline void inc_syscr(struct task_struct *tsk) | ||
40 | { | ||
41 | } | ||
42 | |||
43 | static inline void inc_syscw(struct task_struct *tsk) | ||
44 | { | ||
45 | } | ||
46 | #endif | ||
47 | |||
48 | #endif /* _LINUX_SCHED_XACCT_H */ | ||
diff --git a/include/linux/signal.h b/include/linux/signal.h index 5308304993be..94ad6eea9550 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
@@ -1,32 +1,13 @@ | |||
1 | #ifndef _LINUX_SIGNAL_H | 1 | #ifndef _LINUX_SIGNAL_H |
2 | #define _LINUX_SIGNAL_H | 2 | #define _LINUX_SIGNAL_H |
3 | 3 | ||
4 | #include <linux/list.h> | ||
5 | #include <linux/bug.h> | 4 | #include <linux/bug.h> |
6 | #include <uapi/linux/signal.h> | 5 | #include <linux/signal_types.h> |
7 | 6 | ||
8 | struct task_struct; | 7 | struct task_struct; |
9 | 8 | ||
10 | /* for sysctl */ | 9 | /* for sysctl */ |
11 | extern int print_fatal_signals; | 10 | extern int print_fatal_signals; |
12 | /* | ||
13 | * Real Time signals may be queued. | ||
14 | */ | ||
15 | |||
16 | struct sigqueue { | ||
17 | struct list_head list; | ||
18 | int flags; | ||
19 | siginfo_t info; | ||
20 | struct user_struct *user; | ||
21 | }; | ||
22 | |||
23 | /* flags values. */ | ||
24 | #define SIGQUEUE_PREALLOC 1 | ||
25 | |||
26 | struct sigpending { | ||
27 | struct list_head list; | ||
28 | sigset_t signal; | ||
29 | }; | ||
30 | 11 | ||
31 | #ifndef HAVE_ARCH_COPY_SIGINFO | 12 | #ifndef HAVE_ARCH_COPY_SIGINFO |
32 | 13 | ||
@@ -272,42 +253,6 @@ extern void set_current_blocked(sigset_t *); | |||
272 | extern void __set_current_blocked(const sigset_t *); | 253 | extern void __set_current_blocked(const sigset_t *); |
273 | extern int show_unhandled_signals; | 254 | extern int show_unhandled_signals; |
274 | 255 | ||
275 | struct sigaction { | ||
276 | #ifndef __ARCH_HAS_IRIX_SIGACTION | ||
277 | __sighandler_t sa_handler; | ||
278 | unsigned long sa_flags; | ||
279 | #else | ||
280 | unsigned int sa_flags; | ||
281 | __sighandler_t sa_handler; | ||
282 | #endif | ||
283 | #ifdef __ARCH_HAS_SA_RESTORER | ||
284 | __sigrestore_t sa_restorer; | ||
285 | #endif | ||
286 | sigset_t sa_mask; /* mask last for extensibility */ | ||
287 | }; | ||
288 | |||
289 | struct k_sigaction { | ||
290 | struct sigaction sa; | ||
291 | #ifdef __ARCH_HAS_KA_RESTORER | ||
292 | __sigrestore_t ka_restorer; | ||
293 | #endif | ||
294 | }; | ||
295 | |||
296 | #ifdef CONFIG_OLD_SIGACTION | ||
297 | struct old_sigaction { | ||
298 | __sighandler_t sa_handler; | ||
299 | old_sigset_t sa_mask; | ||
300 | unsigned long sa_flags; | ||
301 | __sigrestore_t sa_restorer; | ||
302 | }; | ||
303 | #endif | ||
304 | |||
305 | struct ksignal { | ||
306 | struct k_sigaction ka; | ||
307 | siginfo_t info; | ||
308 | int sig; | ||
309 | }; | ||
310 | |||
311 | extern int get_signal(struct ksignal *ksig); | 256 | extern int get_signal(struct ksignal *ksig); |
312 | extern void signal_setup_done(int failed, struct ksignal *ksig, int stepping); | 257 | extern void signal_setup_done(int failed, struct ksignal *ksig, int stepping); |
313 | extern void exit_signals(struct task_struct *tsk); | 258 | extern void exit_signals(struct task_struct *tsk); |
diff --git a/include/linux/signal_types.h b/include/linux/signal_types.h new file mode 100644 index 000000000000..16d862a3d8f3 --- /dev/null +++ b/include/linux/signal_types.h | |||
@@ -0,0 +1,66 @@ | |||
1 | #ifndef _LINUX_SIGNAL_TYPES_H | ||
2 | #define _LINUX_SIGNAL_TYPES_H | ||
3 | |||
4 | /* | ||
5 | * Basic signal handling related data type definitions: | ||
6 | */ | ||
7 | |||
8 | #include <linux/list.h> | ||
9 | #include <uapi/linux/signal.h> | ||
10 | |||
11 | /* | ||
12 | * Real Time signals may be queued. | ||
13 | */ | ||
14 | |||
15 | struct sigqueue { | ||
16 | struct list_head list; | ||
17 | int flags; | ||
18 | siginfo_t info; | ||
19 | struct user_struct *user; | ||
20 | }; | ||
21 | |||
22 | /* flags values. */ | ||
23 | #define SIGQUEUE_PREALLOC 1 | ||
24 | |||
25 | struct sigpending { | ||
26 | struct list_head list; | ||
27 | sigset_t signal; | ||
28 | }; | ||
29 | |||
30 | struct sigaction { | ||
31 | #ifndef __ARCH_HAS_IRIX_SIGACTION | ||
32 | __sighandler_t sa_handler; | ||
33 | unsigned long sa_flags; | ||
34 | #else | ||
35 | unsigned int sa_flags; | ||
36 | __sighandler_t sa_handler; | ||
37 | #endif | ||
38 | #ifdef __ARCH_HAS_SA_RESTORER | ||
39 | __sigrestore_t sa_restorer; | ||
40 | #endif | ||
41 | sigset_t sa_mask; /* mask last for extensibility */ | ||
42 | }; | ||
43 | |||
44 | struct k_sigaction { | ||
45 | struct sigaction sa; | ||
46 | #ifdef __ARCH_HAS_KA_RESTORER | ||
47 | __sigrestore_t ka_restorer; | ||
48 | #endif | ||
49 | }; | ||
50 | |||
51 | #ifdef CONFIG_OLD_SIGACTION | ||
52 | struct old_sigaction { | ||
53 | __sighandler_t sa_handler; | ||
54 | old_sigset_t sa_mask; | ||
55 | unsigned long sa_flags; | ||
56 | __sigrestore_t sa_restorer; | ||
57 | }; | ||
58 | #endif | ||
59 | |||
60 | struct ksignal { | ||
61 | struct k_sigaction ka; | ||
62 | siginfo_t info; | ||
63 | int sig; | ||
64 | }; | ||
65 | |||
66 | #endif /* _LINUX_SIGNAL_TYPES_H */ | ||
diff --git a/include/linux/signalfd.h b/include/linux/signalfd.h index eadbe227c256..4985048640a7 100644 --- a/include/linux/signalfd.h +++ b/include/linux/signalfd.h | |||
@@ -8,7 +8,7 @@ | |||
8 | #define _LINUX_SIGNALFD_H | 8 | #define _LINUX_SIGNALFD_H |
9 | 9 | ||
10 | #include <uapi/linux/signalfd.h> | 10 | #include <uapi/linux/signalfd.h> |
11 | 11 | #include <linux/sched/signal.h> | |
12 | 12 | ||
13 | #ifdef CONFIG_SIGNALFD | 13 | #ifdef CONFIG_SIGNALFD |
14 | 14 | ||
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 69ccd2636911..c776abd86937 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/dma-mapping.h> | 34 | #include <linux/dma-mapping.h> |
35 | #include <linux/netdev_features.h> | 35 | #include <linux/netdev_features.h> |
36 | #include <linux/sched.h> | 36 | #include <linux/sched.h> |
37 | #include <linux/sched/clock.h> | ||
37 | #include <net/flow_dissector.h> | 38 | #include <net/flow_dissector.h> |
38 | #include <linux/splice.h> | 39 | #include <linux/splice.h> |
39 | #include <linux/in6.h> | 40 | #include <linux/in6.h> |
diff --git a/include/linux/sunrpc/types.h b/include/linux/sunrpc/types.h index d222f47550af..11a7536c0fd2 100644 --- a/include/linux/sunrpc/types.h +++ b/include/linux/sunrpc/types.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #define _LINUX_SUNRPC_TYPES_H_ | 10 | #define _LINUX_SUNRPC_TYPES_H_ |
11 | 11 | ||
12 | #include <linux/timer.h> | 12 | #include <linux/timer.h> |
13 | #include <linux/sched/signal.h> | ||
13 | #include <linux/workqueue.h> | 14 | #include <linux/workqueue.h> |
14 | #include <linux/sunrpc/debug.h> | 15 | #include <linux/sunrpc/debug.h> |
15 | #include <linux/list.h> | 16 | #include <linux/list.h> |
diff --git a/include/linux/taskstats_kern.h b/include/linux/taskstats_kern.h index 58de6edf751f..e2a5daf8d14f 100644 --- a/include/linux/taskstats_kern.h +++ b/include/linux/taskstats_kern.h | |||
@@ -8,7 +8,7 @@ | |||
8 | #define _LINUX_TASKSTATS_KERN_H | 8 | #define _LINUX_TASKSTATS_KERN_H |
9 | 9 | ||
10 | #include <linux/taskstats.h> | 10 | #include <linux/taskstats.h> |
11 | #include <linux/sched.h> | 11 | #include <linux/sched/signal.h> |
12 | #include <linux/slab.h> | 12 | #include <linux/slab.h> |
13 | 13 | ||
14 | #ifdef CONFIG_TASKSTATS | 14 | #ifdef CONFIG_TASKSTATS |
diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h index d2e804e15c3e..b598cbc7b576 100644 --- a/include/linux/timekeeping.h +++ b/include/linux/timekeeping.h | |||
@@ -8,6 +8,10 @@ | |||
8 | void timekeeping_init(void); | 8 | void timekeeping_init(void); |
9 | extern int timekeeping_suspended; | 9 | extern int timekeeping_suspended; |
10 | 10 | ||
11 | /* Architecture timer tick functions: */ | ||
12 | extern void update_process_times(int user); | ||
13 | extern void xtime_update(unsigned long ticks); | ||
14 | |||
11 | /* | 15 | /* |
12 | * Get and set timeofday | 16 | * Get and set timeofday |
13 | */ | 17 | */ |
diff --git a/include/linux/timer.h b/include/linux/timer.h index c7bdf895179c..e6789b8757d5 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
@@ -212,7 +212,7 @@ struct hrtimer; | |||
212 | extern enum hrtimer_restart it_real_fn(struct hrtimer *); | 212 | extern enum hrtimer_restart it_real_fn(struct hrtimer *); |
213 | 213 | ||
214 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON) | 214 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON) |
215 | #include <linux/sysctl.h> | 215 | struct ctl_table; |
216 | 216 | ||
217 | extern unsigned int sysctl_timer_migration; | 217 | extern unsigned int sysctl_timer_migration; |
218 | int timer_migration_handler(struct ctl_table *table, int write, | 218 | int timer_migration_handler(struct ctl_table *table, int write, |
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h index 363e0e8082a9..be765234c0a2 100644 --- a/include/linux/user_namespace.h +++ b/include/linux/user_namespace.h | |||
@@ -5,6 +5,9 @@ | |||
5 | #include <linux/nsproxy.h> | 5 | #include <linux/nsproxy.h> |
6 | #include <linux/ns_common.h> | 6 | #include <linux/ns_common.h> |
7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
8 | #include <linux/workqueue.h> | ||
9 | #include <linux/rwsem.h> | ||
10 | #include <linux/sysctl.h> | ||
8 | #include <linux/err.h> | 11 | #include <linux/err.h> |
9 | 12 | ||
10 | #define UID_GID_MAP_MAX_EXTENTS 5 | 13 | #define UID_GID_MAP_MAX_EXTENTS 5 |
diff --git a/include/linux/vmacache.h b/include/linux/vmacache.h index c3fa0fd43949..1081db987391 100644 --- a/include/linux/vmacache.h +++ b/include/linux/vmacache.h | |||
@@ -12,7 +12,7 @@ | |||
12 | 12 | ||
13 | static inline void vmacache_flush(struct task_struct *tsk) | 13 | static inline void vmacache_flush(struct task_struct *tsk) |
14 | { | 14 | { |
15 | memset(tsk->vmacache, 0, sizeof(tsk->vmacache)); | 15 | memset(tsk->vmacache.vmas, 0, sizeof(tsk->vmacache.vmas)); |
16 | } | 16 | } |
17 | 17 | ||
18 | extern void vmacache_flush_all(struct mm_struct *mm); | 18 | extern void vmacache_flush_all(struct mm_struct *mm); |
diff --git a/include/linux/wait.h b/include/linux/wait.h index 1421132e9086..aacb1282d19a 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/list.h> | 6 | #include <linux/list.h> |
7 | #include <linux/stddef.h> | 7 | #include <linux/stddef.h> |
8 | #include <linux/spinlock.h> | 8 | #include <linux/spinlock.h> |
9 | |||
9 | #include <asm/current.h> | 10 | #include <asm/current.h> |
10 | #include <uapi/linux/wait.h> | 11 | #include <uapi/linux/wait.h> |
11 | 12 | ||
diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h index 574ff2ae94be..6cd94e5ee113 100644 --- a/include/media/v4l2-ioctl.h +++ b/include/media/v4l2-ioctl.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/poll.h> | 12 | #include <linux/poll.h> |
13 | #include <linux/fs.h> | 13 | #include <linux/fs.h> |
14 | #include <linux/mutex.h> | 14 | #include <linux/mutex.h> |
15 | #include <linux/sched/signal.h> | ||
15 | #include <linux/compiler.h> /* need __user */ | 16 | #include <linux/compiler.h> /* need __user */ |
16 | #include <linux/videodev2.h> | 17 | #include <linux/videodev2.h> |
17 | 18 | ||
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 90708f68cc02..95ccc1eef558 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -26,6 +26,8 @@ | |||
26 | #define __HCI_CORE_H | 26 | #define __HCI_CORE_H |
27 | 27 | ||
28 | #include <linux/leds.h> | 28 | #include <linux/leds.h> |
29 | #include <linux/rculist.h> | ||
30 | |||
29 | #include <net/bluetooth/hci.h> | 31 | #include <net/bluetooth/hci.h> |
30 | #include <net/bluetooth/hci_sock.h> | 32 | #include <net/bluetooth/hci_sock.h> |
31 | 33 | ||
diff --git a/include/net/busy_poll.h b/include/net/busy_poll.h index b8d637225a07..c0452de83086 100644 --- a/include/net/busy_poll.h +++ b/include/net/busy_poll.h | |||
@@ -25,6 +25,8 @@ | |||
25 | #define _LINUX_NET_BUSY_POLL_H | 25 | #define _LINUX_NET_BUSY_POLL_H |
26 | 26 | ||
27 | #include <linux/netdevice.h> | 27 | #include <linux/netdevice.h> |
28 | #include <linux/sched/clock.h> | ||
29 | #include <linux/sched/signal.h> | ||
28 | #include <net/ip.h> | 30 | #include <net/ip.h> |
29 | 31 | ||
30 | #ifdef CONFIG_NET_RX_BUSY_POLL | 32 | #ifdef CONFIG_NET_RX_BUSY_POLL |
diff --git a/include/net/scm.h b/include/net/scm.h index 59fa93c01d2a..142ea9e7a6d0 100644 --- a/include/net/scm.h +++ b/include/net/scm.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/limits.h> | 4 | #include <linux/limits.h> |
5 | #include <linux/net.h> | 5 | #include <linux/net.h> |
6 | #include <linux/cred.h> | ||
6 | #include <linux/security.h> | 7 | #include <linux/security.h> |
7 | #include <linux/pid.h> | 8 | #include <linux/pid.h> |
8 | #include <linux/nsproxy.h> | 9 | #include <linux/nsproxy.h> |
diff --git a/include/rdma/ib.h b/include/rdma/ib.h index a6b93706b0fc..9b4c22a36931 100644 --- a/include/rdma/ib.h +++ b/include/rdma/ib.h | |||
@@ -35,6 +35,7 @@ | |||
35 | 35 | ||
36 | #include <linux/types.h> | 36 | #include <linux/types.h> |
37 | #include <linux/sched.h> | 37 | #include <linux/sched.h> |
38 | #include <linux/cred.h> | ||
38 | 39 | ||
39 | struct ib_addr { | 40 | struct ib_addr { |
40 | union { | 41 | union { |
diff --git a/include/sound/control.h b/include/sound/control.h index 21d047f229a1..bd7246de58e7 100644 --- a/include/sound/control.h +++ b/include/sound/control.h | |||
@@ -22,6 +22,7 @@ | |||
22 | * | 22 | * |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/wait.h> | ||
25 | #include <sound/asound.h> | 26 | #include <sound/asound.h> |
26 | 27 | ||
27 | #define snd_kcontrol_chip(kcontrol) ((kcontrol)->private_data) | 28 | #define snd_kcontrol_chip(kcontrol) ((kcontrol)->private_data) |
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 721664129894..37c274e61acc 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
@@ -4,7 +4,9 @@ | |||
4 | #include <linux/configfs.h> /* struct config_group */ | 4 | #include <linux/configfs.h> /* struct config_group */ |
5 | #include <linux/dma-direction.h> /* enum dma_data_direction */ | 5 | #include <linux/dma-direction.h> /* enum dma_data_direction */ |
6 | #include <linux/percpu_ida.h> /* struct percpu_ida */ | 6 | #include <linux/percpu_ida.h> /* struct percpu_ida */ |
7 | #include <linux/percpu-refcount.h> | ||
7 | #include <linux/semaphore.h> /* struct semaphore */ | 8 | #include <linux/semaphore.h> /* struct semaphore */ |
9 | #include <linux/completion.h> | ||
8 | 10 | ||
9 | #define TARGET_CORE_VERSION "v5.0" | 11 | #define TARGET_CORE_VERSION "v5.0" |
10 | 12 | ||
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index 9b90c57517a9..9e3ef6c99e4b 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h | |||
@@ -4,7 +4,7 @@ | |||
4 | #if !defined(_TRACE_SCHED_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_SCHED_H) || defined(TRACE_HEADER_MULTI_READ) |
5 | #define _TRACE_SCHED_H | 5 | #define _TRACE_SCHED_H |
6 | 6 | ||
7 | #include <linux/sched.h> | 7 | #include <linux/sched/numa_balancing.h> |
8 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
9 | #include <linux/binfmts.h> | 9 | #include <linux/binfmts.h> |
10 | 10 | ||
diff --git a/include/uapi/linux/sched/types.h b/include/uapi/linux/sched/types.h new file mode 100644 index 000000000000..307acbc82d80 --- /dev/null +++ b/include/uapi/linux/sched/types.h | |||
@@ -0,0 +1,74 @@ | |||
1 | #ifndef _UAPI_LINUX_SCHED_TYPES_H | ||
2 | #define _UAPI_LINUX_SCHED_TYPES_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | struct sched_param { | ||
7 | int sched_priority; | ||
8 | }; | ||
9 | |||
10 | #define SCHED_ATTR_SIZE_VER0 48 /* sizeof first published struct */ | ||
11 | |||
12 | /* | ||
13 | * Extended scheduling parameters data structure. | ||
14 | * | ||
15 | * This is needed because the original struct sched_param can not be | ||
16 | * altered without introducing ABI issues with legacy applications | ||
17 | * (e.g., in sched_getparam()). | ||
18 | * | ||
19 | * However, the possibility of specifying more than just a priority for | ||
20 | * the tasks may be useful for a wide variety of application fields, e.g., | ||
21 | * multimedia, streaming, automation and control, and many others. | ||
22 | * | ||
23 | * This variant (sched_attr) is meant at describing a so-called | ||
24 | * sporadic time-constrained task. In such model a task is specified by: | ||
25 | * - the activation period or minimum instance inter-arrival time; | ||
26 | * - the maximum (or average, depending on the actual scheduling | ||
27 | * discipline) computation time of all instances, a.k.a. runtime; | ||
28 | * - the deadline (relative to the actual activation time) of each | ||
29 | * instance. | ||
30 | * Very briefly, a periodic (sporadic) task asks for the execution of | ||
31 | * some specific computation --which is typically called an instance-- | ||
32 | * (at most) every period. Moreover, each instance typically lasts no more | ||
33 | * than the runtime and must be completed by time instant t equal to | ||
34 | * the instance activation time + the deadline. | ||
35 | * | ||
36 | * This is reflected by the actual fields of the sched_attr structure: | ||
37 | * | ||
38 | * @size size of the structure, for fwd/bwd compat. | ||
39 | * | ||
40 | * @sched_policy task's scheduling policy | ||
41 | * @sched_flags for customizing the scheduler behaviour | ||
42 | * @sched_nice task's nice value (SCHED_NORMAL/BATCH) | ||
43 | * @sched_priority task's static priority (SCHED_FIFO/RR) | ||
44 | * @sched_deadline representative of the task's deadline | ||
45 | * @sched_runtime representative of the task's runtime | ||
46 | * @sched_period representative of the task's period | ||
47 | * | ||
48 | * Given this task model, there are a multiplicity of scheduling algorithms | ||
49 | * and policies, that can be used to ensure all the tasks will make their | ||
50 | * timing constraints. | ||
51 | * | ||
52 | * As of now, the SCHED_DEADLINE policy (sched_dl scheduling class) is the | ||
53 | * only user of this new interface. More information about the algorithm | ||
54 | * available in the scheduling class file or in Documentation/. | ||
55 | */ | ||
56 | struct sched_attr { | ||
57 | u32 size; | ||
58 | |||
59 | u32 sched_policy; | ||
60 | u64 sched_flags; | ||
61 | |||
62 | /* SCHED_NORMAL, SCHED_BATCH */ | ||
63 | s32 sched_nice; | ||
64 | |||
65 | /* SCHED_FIFO, SCHED_RR */ | ||
66 | u32 sched_priority; | ||
67 | |||
68 | /* SCHED_DEADLINE */ | ||
69 | u64 sched_runtime; | ||
70 | u64 sched_deadline; | ||
71 | u64 sched_period; | ||
72 | }; | ||
73 | |||
74 | #endif /* _UAPI_LINUX_SCHED_TYPES_H */ | ||
diff --git a/init/init_task.c b/init/init_task.c index 53d4ce942a88..66787e30a419 100644 --- a/init/init_task.c +++ b/init/init_task.c | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/sched.h> | 4 | #include <linux/sched.h> |
5 | #include <linux/sched/sysctl.h> | 5 | #include <linux/sched/sysctl.h> |
6 | #include <linux/sched/rt.h> | 6 | #include <linux/sched/rt.h> |
7 | #include <linux/sched/task.h> | ||
7 | #include <linux/init.h> | 8 | #include <linux/init.h> |
8 | #include <linux/fs.h> | 9 | #include <linux/fs.h> |
9 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
diff --git a/init/main.c b/init/main.c index ae9f2008fb86..eae2f15657c6 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/extable.h> | 15 | #include <linux/extable.h> |
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/proc_fs.h> | 17 | #include <linux/proc_fs.h> |
18 | #include <linux/binfmts.h> | ||
18 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
19 | #include <linux/syscalls.h> | 20 | #include <linux/syscalls.h> |
20 | #include <linux/stackprotector.h> | 21 | #include <linux/stackprotector.h> |
@@ -27,6 +28,7 @@ | |||
27 | #include <linux/bootmem.h> | 28 | #include <linux/bootmem.h> |
28 | #include <linux/acpi.h> | 29 | #include <linux/acpi.h> |
29 | #include <linux/tty.h> | 30 | #include <linux/tty.h> |
31 | #include <linux/nmi.h> | ||
30 | #include <linux/percpu.h> | 32 | #include <linux/percpu.h> |
31 | #include <linux/kmod.h> | 33 | #include <linux/kmod.h> |
32 | #include <linux/vmalloc.h> | 34 | #include <linux/vmalloc.h> |
@@ -61,6 +63,7 @@ | |||
61 | #include <linux/device.h> | 63 | #include <linux/device.h> |
62 | #include <linux/kthread.h> | 64 | #include <linux/kthread.h> |
63 | #include <linux/sched.h> | 65 | #include <linux/sched.h> |
66 | #include <linux/sched/init.h> | ||
64 | #include <linux/signal.h> | 67 | #include <linux/signal.h> |
65 | #include <linux/idr.h> | 68 | #include <linux/idr.h> |
66 | #include <linux/kgdb.h> | 69 | #include <linux/kgdb.h> |
@@ -75,6 +78,8 @@ | |||
75 | #include <linux/blkdev.h> | 78 | #include <linux/blkdev.h> |
76 | #include <linux/elevator.h> | 79 | #include <linux/elevator.h> |
77 | #include <linux/sched_clock.h> | 80 | #include <linux/sched_clock.h> |
81 | #include <linux/sched/task.h> | ||
82 | #include <linux/sched/task_stack.h> | ||
78 | #include <linux/context_tracking.h> | 83 | #include <linux/context_tracking.h> |
79 | #include <linux/random.h> | 84 | #include <linux/random.h> |
80 | #include <linux/list.h> | 85 | #include <linux/list.h> |
diff --git a/ipc/mqueue.c b/ipc/mqueue.c index 4fdd97031431..e8d41ff57241 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c | |||
@@ -35,6 +35,9 @@ | |||
35 | #include <linux/ipc_namespace.h> | 35 | #include <linux/ipc_namespace.h> |
36 | #include <linux/user_namespace.h> | 36 | #include <linux/user_namespace.h> |
37 | #include <linux/slab.h> | 37 | #include <linux/slab.h> |
38 | #include <linux/sched/wake_q.h> | ||
39 | #include <linux/sched/signal.h> | ||
40 | #include <linux/sched/user.h> | ||
38 | 41 | ||
39 | #include <net/sock.h> | 42 | #include <net/sock.h> |
40 | #include "util.h" | 43 | #include "util.h" |
@@ -30,7 +30,7 @@ | |||
30 | #include <linux/proc_fs.h> | 30 | #include <linux/proc_fs.h> |
31 | #include <linux/list.h> | 31 | #include <linux/list.h> |
32 | #include <linux/security.h> | 32 | #include <linux/security.h> |
33 | #include <linux/sched.h> | 33 | #include <linux/sched/wake_q.h> |
34 | #include <linux/syscalls.h> | 34 | #include <linux/syscalls.h> |
35 | #include <linux/audit.h> | 35 | #include <linux/audit.h> |
36 | #include <linux/seq_file.h> | 36 | #include <linux/seq_file.h> |
diff --git a/ipc/namespace.c b/ipc/namespace.c index 0abdea496493..b4d80f9f7246 100644 --- a/ipc/namespace.c +++ b/ipc/namespace.c | |||
@@ -9,10 +9,12 @@ | |||
9 | #include <linux/rcupdate.h> | 9 | #include <linux/rcupdate.h> |
10 | #include <linux/nsproxy.h> | 10 | #include <linux/nsproxy.h> |
11 | #include <linux/slab.h> | 11 | #include <linux/slab.h> |
12 | #include <linux/cred.h> | ||
12 | #include <linux/fs.h> | 13 | #include <linux/fs.h> |
13 | #include <linux/mount.h> | 14 | #include <linux/mount.h> |
14 | #include <linux/user_namespace.h> | 15 | #include <linux/user_namespace.h> |
15 | #include <linux/proc_ns.h> | 16 | #include <linux/proc_ns.h> |
17 | #include <linux/sched/task.h> | ||
16 | 18 | ||
17 | #include "util.h" | 19 | #include "util.h" |
18 | 20 | ||
@@ -82,6 +82,7 @@ | |||
82 | #include <linux/rwsem.h> | 82 | #include <linux/rwsem.h> |
83 | #include <linux/nsproxy.h> | 83 | #include <linux/nsproxy.h> |
84 | #include <linux/ipc_namespace.h> | 84 | #include <linux/ipc_namespace.h> |
85 | #include <linux/sched/wake_q.h> | ||
85 | 86 | ||
86 | #include <linux/uaccess.h> | 87 | #include <linux/uaccess.h> |
87 | #include "util.h" | 88 | #include "util.h" |
diff --git a/kernel/acct.c b/kernel/acct.c index ca9cb55b5855..5b1284370367 100644 --- a/kernel/acct.c +++ b/kernel/acct.c | |||
@@ -56,6 +56,8 @@ | |||
56 | #include <linux/syscalls.h> | 56 | #include <linux/syscalls.h> |
57 | #include <linux/mount.h> | 57 | #include <linux/mount.h> |
58 | #include <linux/uaccess.h> | 58 | #include <linux/uaccess.h> |
59 | #include <linux/sched/cputime.h> | ||
60 | |||
59 | #include <asm/div64.h> | 61 | #include <asm/div64.h> |
60 | #include <linux/blkdev.h> /* sector_div */ | 62 | #include <linux/blkdev.h> /* sector_div */ |
61 | #include <linux/pid_namespace.h> | 63 | #include <linux/pid_namespace.h> |
diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c index 461eb1e66a0f..7af0dcc5d755 100644 --- a/kernel/bpf/syscall.c +++ b/kernel/bpf/syscall.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/bpf_trace.h> | 13 | #include <linux/bpf_trace.h> |
14 | #include <linux/syscalls.h> | 14 | #include <linux/syscalls.h> |
15 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
16 | #include <linux/sched/signal.h> | ||
16 | #include <linux/vmalloc.h> | 17 | #include <linux/vmalloc.h> |
17 | #include <linux/mmzone.h> | 18 | #include <linux/mmzone.h> |
18 | #include <linux/anon_inodes.h> | 19 | #include <linux/anon_inodes.h> |
diff --git a/kernel/cgroup/cgroup-v1.c b/kernel/cgroup/cgroup-v1.c index fc34bcf2329f..56eba9caa632 100644 --- a/kernel/cgroup/cgroup-v1.c +++ b/kernel/cgroup/cgroup-v1.c | |||
@@ -5,6 +5,9 @@ | |||
5 | #include <linux/sort.h> | 5 | #include <linux/sort.h> |
6 | #include <linux/delay.h> | 6 | #include <linux/delay.h> |
7 | #include <linux/mm.h> | 7 | #include <linux/mm.h> |
8 | #include <linux/sched/signal.h> | ||
9 | #include <linux/sched/task.h> | ||
10 | #include <linux/magic.h> | ||
8 | #include <linux/slab.h> | 11 | #include <linux/slab.h> |
9 | #include <linux/vmalloc.h> | 12 | #include <linux/vmalloc.h> |
10 | #include <linux/delayacct.h> | 13 | #include <linux/delayacct.h> |
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index e8f87bf9840c..0125589c7428 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/proc_fs.h> | 41 | #include <linux/proc_fs.h> |
42 | #include <linux/rcupdate.h> | 42 | #include <linux/rcupdate.h> |
43 | #include <linux/sched.h> | 43 | #include <linux/sched.h> |
44 | #include <linux/sched/task.h> | ||
44 | #include <linux/slab.h> | 45 | #include <linux/slab.h> |
45 | #include <linux/spinlock.h> | 46 | #include <linux/spinlock.h> |
46 | #include <linux/percpu-rwsem.h> | 47 | #include <linux/percpu-rwsem.h> |
diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index b3088886cd37..0f41292be0fb 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c | |||
@@ -44,6 +44,8 @@ | |||
44 | #include <linux/proc_fs.h> | 44 | #include <linux/proc_fs.h> |
45 | #include <linux/rcupdate.h> | 45 | #include <linux/rcupdate.h> |
46 | #include <linux/sched.h> | 46 | #include <linux/sched.h> |
47 | #include <linux/sched/mm.h> | ||
48 | #include <linux/sched/task.h> | ||
47 | #include <linux/seq_file.h> | 49 | #include <linux/seq_file.h> |
48 | #include <linux/security.h> | 50 | #include <linux/security.h> |
49 | #include <linux/slab.h> | 51 | #include <linux/slab.h> |
diff --git a/kernel/cgroup/namespace.c b/kernel/cgroup/namespace.c index cff7ea62c38f..96d38dab6fb2 100644 --- a/kernel/cgroup/namespace.c +++ b/kernel/cgroup/namespace.c | |||
@@ -1,6 +1,6 @@ | |||
1 | #include "cgroup-internal.h" | 1 | #include "cgroup-internal.h" |
2 | 2 | ||
3 | #include <linux/sched.h> | 3 | #include <linux/sched/task.h> |
4 | #include <linux/slab.h> | 4 | #include <linux/slab.h> |
5 | #include <linux/nsproxy.h> | 5 | #include <linux/nsproxy.h> |
6 | #include <linux/proc_ns.h> | 6 | #include <linux/proc_ns.h> |
diff --git a/kernel/cgroup/pids.c b/kernel/cgroup/pids.c index 2bd673783f1a..e756dae49300 100644 --- a/kernel/cgroup/pids.c +++ b/kernel/cgroup/pids.c | |||
@@ -214,7 +214,7 @@ static void pids_cancel_attach(struct cgroup_taskset *tset) | |||
214 | 214 | ||
215 | /* | 215 | /* |
216 | * task_css_check(true) in pids_can_fork() and pids_cancel_fork() relies | 216 | * task_css_check(true) in pids_can_fork() and pids_cancel_fork() relies |
217 | * on threadgroup_change_begin() held by the copy_process(). | 217 | * on cgroup_threadgroup_change_begin() held by the copy_process(). |
218 | */ | 218 | */ |
219 | static int pids_can_fork(struct task_struct *task) | 219 | static int pids_can_fork(struct task_struct *task) |
220 | { | 220 | { |
diff --git a/kernel/cpu.c b/kernel/cpu.c index 0a5f630f5c54..f7c063239fa5 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c | |||
@@ -7,7 +7,9 @@ | |||
7 | #include <linux/smp.h> | 7 | #include <linux/smp.h> |
8 | #include <linux/init.h> | 8 | #include <linux/init.h> |
9 | #include <linux/notifier.h> | 9 | #include <linux/notifier.h> |
10 | #include <linux/sched.h> | 10 | #include <linux/sched/signal.h> |
11 | #include <linux/sched/hotplug.h> | ||
12 | #include <linux/sched/task.h> | ||
11 | #include <linux/unistd.h> | 13 | #include <linux/unistd.h> |
12 | #include <linux/cpu.h> | 14 | #include <linux/cpu.h> |
13 | #include <linux/oom.h> | 15 | #include <linux/oom.h> |
diff --git a/kernel/cred.c b/kernel/cred.c index 5f264fb5737d..2bc66075740f 100644 --- a/kernel/cred.c +++ b/kernel/cred.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/cred.h> | 12 | #include <linux/cred.h> |
13 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
15 | #include <linux/sched/coredump.h> | ||
15 | #include <linux/key.h> | 16 | #include <linux/key.h> |
16 | #include <linux/keyctl.h> | 17 | #include <linux/keyctl.h> |
17 | #include <linux/init_task.h> | 18 | #include <linux/init_task.h> |
diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c index 79517e5549f1..65c0f1363788 100644 --- a/kernel/debug/debug_core.c +++ b/kernel/debug/debug_core.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <linux/init.h> | 49 | #include <linux/init.h> |
50 | #include <linux/kgdb.h> | 50 | #include <linux/kgdb.h> |
51 | #include <linux/kdb.h> | 51 | #include <linux/kdb.h> |
52 | #include <linux/nmi.h> | ||
52 | #include <linux/pid.h> | 53 | #include <linux/pid.h> |
53 | #include <linux/smp.h> | 54 | #include <linux/smp.h> |
54 | #include <linux/mm.h> | 55 | #include <linux/mm.h> |
@@ -232,9 +233,9 @@ static void kgdb_flush_swbreak_addr(unsigned long addr) | |||
232 | int i; | 233 | int i; |
233 | 234 | ||
234 | for (i = 0; i < VMACACHE_SIZE; i++) { | 235 | for (i = 0; i < VMACACHE_SIZE; i++) { |
235 | if (!current->vmacache[i]) | 236 | if (!current->vmacache.vmas[i]) |
236 | continue; | 237 | continue; |
237 | flush_cache_range(current->vmacache[i], | 238 | flush_cache_range(current->vmacache.vmas[i], |
238 | addr, addr + BREAK_INSTR_SIZE); | 239 | addr, addr + BREAK_INSTR_SIZE); |
239 | } | 240 | } |
240 | } | 241 | } |
diff --git a/kernel/debug/gdbstub.c b/kernel/debug/gdbstub.c index 19d9a578c753..7510dc687c0d 100644 --- a/kernel/debug/gdbstub.c +++ b/kernel/debug/gdbstub.c | |||
@@ -29,6 +29,7 @@ | |||
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
32 | #include <linux/sched/signal.h> | ||
32 | #include <linux/kgdb.h> | 33 | #include <linux/kgdb.h> |
33 | #include <linux/kdb.h> | 34 | #include <linux/kdb.h> |
34 | #include <linux/serial_core.h> | 35 | #include <linux/serial_core.h> |
diff --git a/kernel/debug/kdb/kdb_bt.c b/kernel/debug/kdb/kdb_bt.c index fe15fff5df53..6ad4a9fcbd6f 100644 --- a/kernel/debug/kdb/kdb_bt.c +++ b/kernel/debug/kdb/kdb_bt.c | |||
@@ -12,7 +12,8 @@ | |||
12 | #include <linux/ctype.h> | 12 | #include <linux/ctype.h> |
13 | #include <linux/string.h> | 13 | #include <linux/string.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/sched.h> | 15 | #include <linux/sched/signal.h> |
16 | #include <linux/sched/debug.h> | ||
16 | #include <linux/kdb.h> | 17 | #include <linux/kdb.h> |
17 | #include <linux/nmi.h> | 18 | #include <linux/nmi.h> |
18 | #include "kdb_private.h" | 19 | #include "kdb_private.h" |
diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c index ca183919d302..c8146d53ca67 100644 --- a/kernel/debug/kdb/kdb_main.c +++ b/kernel/debug/kdb/kdb_main.c | |||
@@ -18,6 +18,9 @@ | |||
18 | #include <linux/kmsg_dump.h> | 18 | #include <linux/kmsg_dump.h> |
19 | #include <linux/reboot.h> | 19 | #include <linux/reboot.h> |
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/sched/loadavg.h> | ||
22 | #include <linux/sched/stat.h> | ||
23 | #include <linux/sched/debug.h> | ||
21 | #include <linux/sysrq.h> | 24 | #include <linux/sysrq.h> |
22 | #include <linux/smp.h> | 25 | #include <linux/smp.h> |
23 | #include <linux/utsname.h> | 26 | #include <linux/utsname.h> |
diff --git a/kernel/delayacct.c b/kernel/delayacct.c index 660549656991..4a1c33416b6a 100644 --- a/kernel/delayacct.c +++ b/kernel/delayacct.c | |||
@@ -14,6 +14,8 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/sched/task.h> | ||
18 | #include <linux/sched/cputime.h> | ||
17 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
18 | #include <linux/taskstats.h> | 20 | #include <linux/taskstats.h> |
19 | #include <linux/time.h> | 21 | #include <linux/time.h> |
diff --git a/kernel/events/callchain.c b/kernel/events/callchain.c index e9fdb5203de5..c04917cad1bf 100644 --- a/kernel/events/callchain.c +++ b/kernel/events/callchain.c | |||
@@ -11,6 +11,8 @@ | |||
11 | 11 | ||
12 | #include <linux/perf_event.h> | 12 | #include <linux/perf_event.h> |
13 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
14 | #include <linux/sched/task_stack.h> | ||
15 | |||
14 | #include "internal.h" | 16 | #include "internal.h" |
15 | 17 | ||
16 | struct callchain_cpus_entries { | 18 | struct callchain_cpus_entries { |
diff --git a/kernel/events/core.c b/kernel/events/core.c index 1031bdf9f012..6f41548f2e32 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c | |||
@@ -46,6 +46,8 @@ | |||
46 | #include <linux/filter.h> | 46 | #include <linux/filter.h> |
47 | #include <linux/namei.h> | 47 | #include <linux/namei.h> |
48 | #include <linux/parser.h> | 48 | #include <linux/parser.h> |
49 | #include <linux/sched/clock.h> | ||
50 | #include <linux/sched/mm.h> | ||
49 | 51 | ||
50 | #include "internal.h" | 52 | #include "internal.h" |
51 | 53 | ||
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c index d630f8ac4d2f..0e137f98a50c 100644 --- a/kernel/events/uprobes.c +++ b/kernel/events/uprobes.c | |||
@@ -27,6 +27,8 @@ | |||
27 | #include <linux/pagemap.h> /* read_mapping_page */ | 27 | #include <linux/pagemap.h> /* read_mapping_page */ |
28 | #include <linux/slab.h> | 28 | #include <linux/slab.h> |
29 | #include <linux/sched.h> | 29 | #include <linux/sched.h> |
30 | #include <linux/sched/mm.h> | ||
31 | #include <linux/sched/coredump.h> | ||
30 | #include <linux/export.h> | 32 | #include <linux/export.h> |
31 | #include <linux/rmap.h> /* anon_vma_prepare */ | 33 | #include <linux/rmap.h> /* anon_vma_prepare */ |
32 | #include <linux/mmu_notifier.h> /* set_pte_at_notify */ | 34 | #include <linux/mmu_notifier.h> /* set_pte_at_notify */ |
diff --git a/kernel/exit.c b/kernel/exit.c index 8a768a3672a5..e126ebf2400c 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -6,6 +6,12 @@ | |||
6 | 6 | ||
7 | #include <linux/mm.h> | 7 | #include <linux/mm.h> |
8 | #include <linux/slab.h> | 8 | #include <linux/slab.h> |
9 | #include <linux/sched/autogroup.h> | ||
10 | #include <linux/sched/mm.h> | ||
11 | #include <linux/sched/stat.h> | ||
12 | #include <linux/sched/task.h> | ||
13 | #include <linux/sched/task_stack.h> | ||
14 | #include <linux/sched/cputime.h> | ||
9 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
10 | #include <linux/module.h> | 16 | #include <linux/module.h> |
11 | #include <linux/capability.h> | 17 | #include <linux/capability.h> |
diff --git a/kernel/fork.c b/kernel/fork.c index 246bf9aaf9df..6c463c80e93d 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -12,6 +12,16 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
15 | #include <linux/sched/autogroup.h> | ||
16 | #include <linux/sched/mm.h> | ||
17 | #include <linux/sched/coredump.h> | ||
18 | #include <linux/sched/user.h> | ||
19 | #include <linux/sched/numa_balancing.h> | ||
20 | #include <linux/sched/stat.h> | ||
21 | #include <linux/sched/task.h> | ||
22 | #include <linux/sched/task_stack.h> | ||
23 | #include <linux/sched/cputime.h> | ||
24 | #include <linux/rtmutex.h> | ||
15 | #include <linux/init.h> | 25 | #include <linux/init.h> |
16 | #include <linux/unistd.h> | 26 | #include <linux/unistd.h> |
17 | #include <linux/module.h> | 27 | #include <linux/module.h> |
@@ -1455,6 +1465,21 @@ init_task_pid(struct task_struct *task, enum pid_type type, struct pid *pid) | |||
1455 | task->pids[type].pid = pid; | 1465 | task->pids[type].pid = pid; |
1456 | } | 1466 | } |
1457 | 1467 | ||
1468 | static inline void rcu_copy_process(struct task_struct *p) | ||
1469 | { | ||
1470 | #ifdef CONFIG_PREEMPT_RCU | ||
1471 | p->rcu_read_lock_nesting = 0; | ||
1472 | p->rcu_read_unlock_special.s = 0; | ||
1473 | p->rcu_blocked_node = NULL; | ||
1474 | INIT_LIST_HEAD(&p->rcu_node_entry); | ||
1475 | #endif /* #ifdef CONFIG_PREEMPT_RCU */ | ||
1476 | #ifdef CONFIG_TASKS_RCU | ||
1477 | p->rcu_tasks_holdout = false; | ||
1478 | INIT_LIST_HEAD(&p->rcu_tasks_holdout_list); | ||
1479 | p->rcu_tasks_idle_cpu = -1; | ||
1480 | #endif /* #ifdef CONFIG_TASKS_RCU */ | ||
1481 | } | ||
1482 | |||
1458 | /* | 1483 | /* |
1459 | * This creates a new process as a copy of the old one, | 1484 | * This creates a new process as a copy of the old one, |
1460 | * but does not actually start it yet. | 1485 | * but does not actually start it yet. |
@@ -1746,7 +1771,7 @@ static __latent_entropy struct task_struct *copy_process( | |||
1746 | INIT_LIST_HEAD(&p->thread_group); | 1771 | INIT_LIST_HEAD(&p->thread_group); |
1747 | p->task_works = NULL; | 1772 | p->task_works = NULL; |
1748 | 1773 | ||
1749 | threadgroup_change_begin(current); | 1774 | cgroup_threadgroup_change_begin(current); |
1750 | /* | 1775 | /* |
1751 | * Ensure that the cgroup subsystem policies allow the new process to be | 1776 | * Ensure that the cgroup subsystem policies allow the new process to be |
1752 | * forked. It should be noted the the new process's css_set can be changed | 1777 | * forked. It should be noted the the new process's css_set can be changed |
@@ -1843,7 +1868,7 @@ static __latent_entropy struct task_struct *copy_process( | |||
1843 | 1868 | ||
1844 | proc_fork_connector(p); | 1869 | proc_fork_connector(p); |
1845 | cgroup_post_fork(p); | 1870 | cgroup_post_fork(p); |
1846 | threadgroup_change_end(current); | 1871 | cgroup_threadgroup_change_end(current); |
1847 | perf_event_fork(p); | 1872 | perf_event_fork(p); |
1848 | 1873 | ||
1849 | trace_task_newtask(p, clone_flags); | 1874 | trace_task_newtask(p, clone_flags); |
@@ -1854,7 +1879,7 @@ static __latent_entropy struct task_struct *copy_process( | |||
1854 | bad_fork_cancel_cgroup: | 1879 | bad_fork_cancel_cgroup: |
1855 | cgroup_cancel_fork(p); | 1880 | cgroup_cancel_fork(p); |
1856 | bad_fork_free_pid: | 1881 | bad_fork_free_pid: |
1857 | threadgroup_change_end(current); | 1882 | cgroup_threadgroup_change_end(current); |
1858 | if (pid != &init_struct_pid) | 1883 | if (pid != &init_struct_pid) |
1859 | free_pid(pid); | 1884 | free_pid(pid); |
1860 | bad_fork_cleanup_thread: | 1885 | bad_fork_cleanup_thread: |
diff --git a/kernel/futex.c b/kernel/futex.c index b687cb22301c..229a744b1781 100644 --- a/kernel/futex.c +++ b/kernel/futex.c | |||
@@ -61,6 +61,8 @@ | |||
61 | #include <linux/nsproxy.h> | 61 | #include <linux/nsproxy.h> |
62 | #include <linux/ptrace.h> | 62 | #include <linux/ptrace.h> |
63 | #include <linux/sched/rt.h> | 63 | #include <linux/sched/rt.h> |
64 | #include <linux/sched/wake_q.h> | ||
65 | #include <linux/sched/mm.h> | ||
64 | #include <linux/hugetlb.h> | 66 | #include <linux/hugetlb.h> |
65 | #include <linux/freezer.h> | 67 | #include <linux/freezer.h> |
66 | #include <linux/bootmem.h> | 68 | #include <linux/bootmem.h> |
diff --git a/kernel/hung_task.c b/kernel/hung_task.c index 40c07e4fa116..f0f8e2a8496f 100644 --- a/kernel/hung_task.c +++ b/kernel/hung_task.c | |||
@@ -16,6 +16,9 @@ | |||
16 | #include <linux/export.h> | 16 | #include <linux/export.h> |
17 | #include <linux/sysctl.h> | 17 | #include <linux/sysctl.h> |
18 | #include <linux/utsname.h> | 18 | #include <linux/utsname.h> |
19 | #include <linux/sched/signal.h> | ||
20 | #include <linux/sched/debug.h> | ||
21 | |||
19 | #include <trace/events/sched.h> | 22 | #include <trace/events/sched.h> |
20 | 23 | ||
21 | /* | 24 | /* |
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 944d068b6c48..a4afe5cc5af1 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c | |||
@@ -17,6 +17,8 @@ | |||
17 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
19 | #include <linux/sched/rt.h> | 19 | #include <linux/sched/rt.h> |
20 | #include <linux/sched/task.h> | ||
21 | #include <uapi/linux/sched/types.h> | ||
20 | #include <linux/task_work.h> | 22 | #include <linux/task_work.h> |
21 | 23 | ||
22 | #include "internals.h" | 24 | #include "internals.h" |
diff --git a/kernel/kmod.c b/kernel/kmod.c index 0c407f905ca4..563f97e2be36 100644 --- a/kernel/kmod.c +++ b/kernel/kmod.c | |||
@@ -20,6 +20,8 @@ | |||
20 | */ | 20 | */ |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/sched.h> | 22 | #include <linux/sched.h> |
23 | #include <linux/sched/task.h> | ||
24 | #include <linux/binfmts.h> | ||
23 | #include <linux/syscalls.h> | 25 | #include <linux/syscalls.h> |
24 | #include <linux/unistd.h> | 26 | #include <linux/unistd.h> |
25 | #include <linux/kmod.h> | 27 | #include <linux/kmod.h> |
diff --git a/kernel/kthread.c b/kernel/kthread.c index 8461a4372e8a..2f26adea0f84 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c | |||
@@ -5,7 +5,9 @@ | |||
5 | * even if we're invoked from userspace (think modprobe, hotplug cpu, | 5 | * even if we're invoked from userspace (think modprobe, hotplug cpu, |
6 | * etc.). | 6 | * etc.). |
7 | */ | 7 | */ |
8 | #include <uapi/linux/sched/types.h> | ||
8 | #include <linux/sched.h> | 9 | #include <linux/sched.h> |
10 | #include <linux/sched/task.h> | ||
9 | #include <linux/kthread.h> | 11 | #include <linux/kthread.h> |
10 | #include <linux/completion.h> | 12 | #include <linux/completion.h> |
11 | #include <linux/err.h> | 13 | #include <linux/err.h> |
diff --git a/kernel/latencytop.c b/kernel/latencytop.c index b5c30d9f46c5..96b4179cee6a 100644 --- a/kernel/latencytop.c +++ b/kernel/latencytop.c | |||
@@ -55,6 +55,8 @@ | |||
55 | #include <linux/latencytop.h> | 55 | #include <linux/latencytop.h> |
56 | #include <linux/export.h> | 56 | #include <linux/export.h> |
57 | #include <linux/sched.h> | 57 | #include <linux/sched.h> |
58 | #include <linux/sched/debug.h> | ||
59 | #include <linux/sched/stat.h> | ||
58 | #include <linux/list.h> | 60 | #include <linux/list.h> |
59 | #include <linux/stacktrace.h> | 61 | #include <linux/stacktrace.h> |
60 | 62 | ||
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index 9812e5dd409e..12e38c213b70 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c | |||
@@ -28,6 +28,8 @@ | |||
28 | #define DISABLE_BRANCH_PROFILING | 28 | #define DISABLE_BRANCH_PROFILING |
29 | #include <linux/mutex.h> | 29 | #include <linux/mutex.h> |
30 | #include <linux/sched.h> | 30 | #include <linux/sched.h> |
31 | #include <linux/sched/clock.h> | ||
32 | #include <linux/sched/task.h> | ||
31 | #include <linux/delay.h> | 33 | #include <linux/delay.h> |
32 | #include <linux/module.h> | 34 | #include <linux/module.h> |
33 | #include <linux/proc_fs.h> | 35 | #include <linux/proc_fs.h> |
diff --git a/kernel/locking/locktorture.c b/kernel/locking/locktorture.c index 28350dc8ecbb..f24582d4dad3 100644 --- a/kernel/locking/locktorture.c +++ b/kernel/locking/locktorture.c | |||
@@ -32,6 +32,8 @@ | |||
32 | #include <linux/smp.h> | 32 | #include <linux/smp.h> |
33 | #include <linux/interrupt.h> | 33 | #include <linux/interrupt.h> |
34 | #include <linux/sched.h> | 34 | #include <linux/sched.h> |
35 | #include <uapi/linux/sched/types.h> | ||
36 | #include <linux/rtmutex.h> | ||
35 | #include <linux/atomic.h> | 37 | #include <linux/atomic.h> |
36 | #include <linux/moduleparam.h> | 38 | #include <linux/moduleparam.h> |
37 | #include <linux/delay.h> | 39 | #include <linux/delay.h> |
diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c index ad2d9e22697b..198527a62149 100644 --- a/kernel/locking/mutex.c +++ b/kernel/locking/mutex.c | |||
@@ -19,8 +19,10 @@ | |||
19 | */ | 19 | */ |
20 | #include <linux/mutex.h> | 20 | #include <linux/mutex.h> |
21 | #include <linux/ww_mutex.h> | 21 | #include <linux/ww_mutex.h> |
22 | #include <linux/sched.h> | 22 | #include <linux/sched/signal.h> |
23 | #include <linux/sched/rt.h> | 23 | #include <linux/sched/rt.h> |
24 | #include <linux/sched/wake_q.h> | ||
25 | #include <linux/sched/debug.h> | ||
24 | #include <linux/export.h> | 26 | #include <linux/export.h> |
25 | #include <linux/spinlock.h> | 27 | #include <linux/spinlock.h> |
26 | #include <linux/interrupt.h> | 28 | #include <linux/interrupt.h> |
diff --git a/kernel/locking/qspinlock_stat.h b/kernel/locking/qspinlock_stat.h index e852be4851fc..4a30ef63c607 100644 --- a/kernel/locking/qspinlock_stat.h +++ b/kernel/locking/qspinlock_stat.h | |||
@@ -63,6 +63,7 @@ enum qlock_stats { | |||
63 | */ | 63 | */ |
64 | #include <linux/debugfs.h> | 64 | #include <linux/debugfs.h> |
65 | #include <linux/sched.h> | 65 | #include <linux/sched.h> |
66 | #include <linux/sched/clock.h> | ||
66 | #include <linux/fs.h> | 67 | #include <linux/fs.h> |
67 | 68 | ||
68 | static const char * const qstat_names[qstat_num + 1] = { | 69 | static const char * const qstat_names[qstat_num + 1] = { |
diff --git a/kernel/locking/rtmutex-debug.c b/kernel/locking/rtmutex-debug.c index 62b6cee8ea7f..97ee9df32e0f 100644 --- a/kernel/locking/rtmutex-debug.c +++ b/kernel/locking/rtmutex-debug.c | |||
@@ -18,6 +18,7 @@ | |||
18 | */ | 18 | */ |
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/sched/rt.h> | 20 | #include <linux/sched/rt.h> |
21 | #include <linux/sched/debug.h> | ||
21 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
22 | #include <linux/export.h> | 23 | #include <linux/export.h> |
23 | #include <linux/spinlock.h> | 24 | #include <linux/spinlock.h> |
diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c index d340be3a488f..6edc32ecd9c5 100644 --- a/kernel/locking/rtmutex.c +++ b/kernel/locking/rtmutex.c | |||
@@ -12,9 +12,11 @@ | |||
12 | */ | 12 | */ |
13 | #include <linux/spinlock.h> | 13 | #include <linux/spinlock.h> |
14 | #include <linux/export.h> | 14 | #include <linux/export.h> |
15 | #include <linux/sched.h> | 15 | #include <linux/sched/signal.h> |
16 | #include <linux/sched/rt.h> | 16 | #include <linux/sched/rt.h> |
17 | #include <linux/sched/deadline.h> | 17 | #include <linux/sched/deadline.h> |
18 | #include <linux/sched/wake_q.h> | ||
19 | #include <linux/sched/debug.h> | ||
18 | #include <linux/timer.h> | 20 | #include <linux/timer.h> |
19 | 21 | ||
20 | #include "rtmutex_common.h" | 22 | #include "rtmutex_common.h" |
diff --git a/kernel/locking/rtmutex_common.h b/kernel/locking/rtmutex_common.h index 990134617b4c..856dfff5c33a 100644 --- a/kernel/locking/rtmutex_common.h +++ b/kernel/locking/rtmutex_common.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #define __KERNEL_RTMUTEX_COMMON_H | 13 | #define __KERNEL_RTMUTEX_COMMON_H |
14 | 14 | ||
15 | #include <linux/rtmutex.h> | 15 | #include <linux/rtmutex.h> |
16 | #include <linux/sched/wake_q.h> | ||
16 | 17 | ||
17 | /* | 18 | /* |
18 | * This is the control structure for tasks blocked on a rt_mutex, | 19 | * This is the control structure for tasks blocked on a rt_mutex, |
diff --git a/kernel/locking/rwsem-spinlock.c b/kernel/locking/rwsem-spinlock.c index 5eacab880f67..7bc24d477805 100644 --- a/kernel/locking/rwsem-spinlock.c +++ b/kernel/locking/rwsem-spinlock.c | |||
@@ -6,7 +6,8 @@ | |||
6 | * - Derived also from comments by Linus | 6 | * - Derived also from comments by Linus |
7 | */ | 7 | */ |
8 | #include <linux/rwsem.h> | 8 | #include <linux/rwsem.h> |
9 | #include <linux/sched.h> | 9 | #include <linux/sched/signal.h> |
10 | #include <linux/sched/debug.h> | ||
10 | #include <linux/export.h> | 11 | #include <linux/export.h> |
11 | 12 | ||
12 | enum rwsem_waiter_type { | 13 | enum rwsem_waiter_type { |
diff --git a/kernel/locking/rwsem-xadd.c b/kernel/locking/rwsem-xadd.c index 2ad8d8dc3bb1..34e727f18e49 100644 --- a/kernel/locking/rwsem-xadd.c +++ b/kernel/locking/rwsem-xadd.c | |||
@@ -10,10 +10,12 @@ | |||
10 | * and Davidlohr Bueso <davidlohr@hp.com>. Based on mutexes. | 10 | * and Davidlohr Bueso <davidlohr@hp.com>. Based on mutexes. |
11 | */ | 11 | */ |
12 | #include <linux/rwsem.h> | 12 | #include <linux/rwsem.h> |
13 | #include <linux/sched.h> | ||
14 | #include <linux/init.h> | 13 | #include <linux/init.h> |
15 | #include <linux/export.h> | 14 | #include <linux/export.h> |
15 | #include <linux/sched/signal.h> | ||
16 | #include <linux/sched/rt.h> | 16 | #include <linux/sched/rt.h> |
17 | #include <linux/sched/wake_q.h> | ||
18 | #include <linux/sched/debug.h> | ||
17 | #include <linux/osq_lock.h> | 19 | #include <linux/osq_lock.h> |
18 | 20 | ||
19 | #include "rwsem.h" | 21 | #include "rwsem.h" |
diff --git a/kernel/locking/rwsem.c b/kernel/locking/rwsem.c index 45ba475d4be3..90a74ccd85a4 100644 --- a/kernel/locking/rwsem.c +++ b/kernel/locking/rwsem.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/types.h> | 7 | #include <linux/types.h> |
8 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
9 | #include <linux/sched.h> | 9 | #include <linux/sched.h> |
10 | #include <linux/sched/debug.h> | ||
10 | #include <linux/export.h> | 11 | #include <linux/export.h> |
11 | #include <linux/rwsem.h> | 12 | #include <linux/rwsem.h> |
12 | #include <linux/atomic.h> | 13 | #include <linux/atomic.h> |
diff --git a/kernel/locking/semaphore.c b/kernel/locking/semaphore.c index 9512e37637dc..561acdd39960 100644 --- a/kernel/locking/semaphore.c +++ b/kernel/locking/semaphore.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
30 | #include <linux/export.h> | 30 | #include <linux/export.h> |
31 | #include <linux/sched.h> | 31 | #include <linux/sched.h> |
32 | #include <linux/sched/debug.h> | ||
32 | #include <linux/semaphore.h> | 33 | #include <linux/semaphore.h> |
33 | #include <linux/spinlock.h> | 34 | #include <linux/spinlock.h> |
34 | #include <linux/ftrace.h> | 35 | #include <linux/ftrace.h> |
diff --git a/kernel/panic.c b/kernel/panic.c index 3ec16e603e88..a58932b41700 100644 --- a/kernel/panic.c +++ b/kernel/panic.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * to indicate a major problem. | 9 | * to indicate a major problem. |
10 | */ | 10 | */ |
11 | #include <linux/debug_locks.h> | 11 | #include <linux/debug_locks.h> |
12 | #include <linux/sched/debug.h> | ||
12 | #include <linux/interrupt.h> | 13 | #include <linux/interrupt.h> |
13 | #include <linux/kmsg_dump.h> | 14 | #include <linux/kmsg_dump.h> |
14 | #include <linux/kallsyms.h> | 15 | #include <linux/kallsyms.h> |
diff --git a/kernel/pid.c b/kernel/pid.c index 0291804151b5..0143ac0ddceb 100644 --- a/kernel/pid.c +++ b/kernel/pid.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/syscalls.h> | 38 | #include <linux/syscalls.h> |
39 | #include <linux/proc_ns.h> | 39 | #include <linux/proc_ns.h> |
40 | #include <linux/proc_fs.h> | 40 | #include <linux/proc_fs.h> |
41 | #include <linux/sched/task.h> | ||
41 | 42 | ||
42 | #define pid_hashfn(nr, ns) \ | 43 | #define pid_hashfn(nr, ns) \ |
43 | hash_long((unsigned long)nr + (unsigned long)ns, pidhash_shift) | 44 | hash_long((unsigned long)nr + (unsigned long)ns, pidhash_shift) |
diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c index eef2ce968636..de461aa0bf9a 100644 --- a/kernel/pid_namespace.c +++ b/kernel/pid_namespace.c | |||
@@ -12,12 +12,15 @@ | |||
12 | #include <linux/pid_namespace.h> | 12 | #include <linux/pid_namespace.h> |
13 | #include <linux/user_namespace.h> | 13 | #include <linux/user_namespace.h> |
14 | #include <linux/syscalls.h> | 14 | #include <linux/syscalls.h> |
15 | #include <linux/cred.h> | ||
15 | #include <linux/err.h> | 16 | #include <linux/err.h> |
16 | #include <linux/acct.h> | 17 | #include <linux/acct.h> |
17 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
18 | #include <linux/proc_ns.h> | 19 | #include <linux/proc_ns.h> |
19 | #include <linux/reboot.h> | 20 | #include <linux/reboot.h> |
20 | #include <linux/export.h> | 21 | #include <linux/export.h> |
22 | #include <linux/sched/task.h> | ||
23 | #include <linux/sched/signal.h> | ||
21 | 24 | ||
22 | struct pid_cache { | 25 | struct pid_cache { |
23 | int nr_ids; | 26 | int nr_ids; |
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c index 9e1cba069385..a8b978c35a6a 100644 --- a/kernel/power/hibernate.c +++ b/kernel/power/hibernate.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/fs.h> | 23 | #include <linux/fs.h> |
24 | #include <linux/mount.h> | 24 | #include <linux/mount.h> |
25 | #include <linux/pm.h> | 25 | #include <linux/pm.h> |
26 | #include <linux/nmi.h> | ||
26 | #include <linux/console.h> | 27 | #include <linux/console.h> |
27 | #include <linux/cpu.h> | 28 | #include <linux/cpu.h> |
28 | #include <linux/freezer.h> | 29 | #include <linux/freezer.h> |
diff --git a/kernel/power/process.c b/kernel/power/process.c index 2fba066e125f..c7209f060eeb 100644 --- a/kernel/power/process.c +++ b/kernel/power/process.c | |||
@@ -12,6 +12,8 @@ | |||
12 | #include <linux/oom.h> | 12 | #include <linux/oom.h> |
13 | #include <linux/suspend.h> | 13 | #include <linux/suspend.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/sched/debug.h> | ||
16 | #include <linux/sched/task.h> | ||
15 | #include <linux/syscalls.h> | 17 | #include <linux/syscalls.h> |
16 | #include <linux/freezer.h> | 18 | #include <linux/freezer.h> |
17 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c index 905d5bbd595f..d79a38de425a 100644 --- a/kernel/power/snapshot.c +++ b/kernel/power/snapshot.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/device.h> | 22 | #include <linux/device.h> |
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/bootmem.h> | 24 | #include <linux/bootmem.h> |
25 | #include <linux/nmi.h> | ||
25 | #include <linux/syscalls.h> | 26 | #include <linux/syscalls.h> |
26 | #include <linux/console.h> | 27 | #include <linux/console.h> |
27 | #include <linux/highmem.h> | 28 | #include <linux/highmem.h> |
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 34da86e73d00..2984fb0f0257 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c | |||
@@ -45,6 +45,9 @@ | |||
45 | #include <linux/utsname.h> | 45 | #include <linux/utsname.h> |
46 | #include <linux/ctype.h> | 46 | #include <linux/ctype.h> |
47 | #include <linux/uio.h> | 47 | #include <linux/uio.h> |
48 | #include <linux/sched/clock.h> | ||
49 | #include <linux/sched/debug.h> | ||
50 | #include <linux/sched/task_stack.h> | ||
48 | 51 | ||
49 | #include <linux/uaccess.h> | 52 | #include <linux/uaccess.h> |
50 | #include <asm/sections.h> | 53 | #include <asm/sections.h> |
diff --git a/kernel/profile.c b/kernel/profile.c index f67ce0aa6bc4..9aa2a4445b0d 100644 --- a/kernel/profile.c +++ b/kernel/profile.c | |||
@@ -25,6 +25,8 @@ | |||
25 | #include <linux/mutex.h> | 25 | #include <linux/mutex.h> |
26 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
27 | #include <linux/vmalloc.h> | 27 | #include <linux/vmalloc.h> |
28 | #include <linux/sched/stat.h> | ||
29 | |||
28 | #include <asm/sections.h> | 30 | #include <asm/sections.h> |
29 | #include <asm/irq_regs.h> | 31 | #include <asm/irq_regs.h> |
30 | #include <asm/ptrace.h> | 32 | #include <asm/ptrace.h> |
diff --git a/kernel/ptrace.c b/kernel/ptrace.c index 49ba7c1ade9d..0af928712174 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c | |||
@@ -10,6 +10,9 @@ | |||
10 | #include <linux/capability.h> | 10 | #include <linux/capability.h> |
11 | #include <linux/export.h> | 11 | #include <linux/export.h> |
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/sched/mm.h> | ||
14 | #include <linux/sched/coredump.h> | ||
15 | #include <linux/sched/task.h> | ||
13 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
14 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
15 | #include <linux/highmem.h> | 18 | #include <linux/highmem.h> |
diff --git a/kernel/rcu/rcuperf.c b/kernel/rcu/rcuperf.c index 123ccbd22449..a4a86fb47e4a 100644 --- a/kernel/rcu/rcuperf.c +++ b/kernel/rcu/rcuperf.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/rcupdate.h> | 30 | #include <linux/rcupdate.h> |
31 | #include <linux/interrupt.h> | 31 | #include <linux/interrupt.h> |
32 | #include <linux/sched.h> | 32 | #include <linux/sched.h> |
33 | #include <uapi/linux/sched/types.h> | ||
33 | #include <linux/atomic.h> | 34 | #include <linux/atomic.h> |
34 | #include <linux/bitops.h> | 35 | #include <linux/bitops.h> |
35 | #include <linux/completion.h> | 36 | #include <linux/completion.h> |
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c index d81345be730e..cccc417a8135 100644 --- a/kernel/rcu/rcutorture.c +++ b/kernel/rcu/rcutorture.c | |||
@@ -32,7 +32,8 @@ | |||
32 | #include <linux/smp.h> | 32 | #include <linux/smp.h> |
33 | #include <linux/rcupdate.h> | 33 | #include <linux/rcupdate.h> |
34 | #include <linux/interrupt.h> | 34 | #include <linux/interrupt.h> |
35 | #include <linux/sched.h> | 35 | #include <linux/sched/signal.h> |
36 | #include <uapi/linux/sched/types.h> | ||
36 | #include <linux/atomic.h> | 37 | #include <linux/atomic.h> |
37 | #include <linux/bitops.h> | 38 | #include <linux/bitops.h> |
38 | #include <linux/completion.h> | 39 | #include <linux/completion.h> |
diff --git a/kernel/rcu/srcu.c b/kernel/rcu/srcu.c index e773129c8b08..ef3bcfb15b39 100644 --- a/kernel/rcu/srcu.c +++ b/kernel/rcu/srcu.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include <linux/mutex.h> | 30 | #include <linux/mutex.h> |
31 | #include <linux/percpu.h> | 31 | #include <linux/percpu.h> |
32 | #include <linux/preempt.h> | 32 | #include <linux/preempt.h> |
33 | #include <linux/rcupdate.h> | 33 | #include <linux/rcupdate_wait.h> |
34 | #include <linux/sched.h> | 34 | #include <linux/sched.h> |
35 | #include <linux/smp.h> | 35 | #include <linux/smp.h> |
36 | #include <linux/delay.h> | 36 | #include <linux/delay.h> |
diff --git a/kernel/rcu/tiny.c b/kernel/rcu/tiny.c index fa6a48d3917b..6ad330dbbae2 100644 --- a/kernel/rcu/tiny.c +++ b/kernel/rcu/tiny.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <linux/completion.h> | 25 | #include <linux/completion.h> |
26 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
27 | #include <linux/notifier.h> | 27 | #include <linux/notifier.h> |
28 | #include <linux/rcupdate.h> | 28 | #include <linux/rcupdate_wait.h> |
29 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
30 | #include <linux/export.h> | 30 | #include <linux/export.h> |
31 | #include <linux/mutex.h> | 31 | #include <linux/mutex.h> |
@@ -47,6 +47,18 @@ static void __call_rcu(struct rcu_head *head, | |||
47 | 47 | ||
48 | #include "tiny_plugin.h" | 48 | #include "tiny_plugin.h" |
49 | 49 | ||
50 | void rcu_barrier_bh(void) | ||
51 | { | ||
52 | wait_rcu_gp(call_rcu_bh); | ||
53 | } | ||
54 | EXPORT_SYMBOL(rcu_barrier_bh); | ||
55 | |||
56 | void rcu_barrier_sched(void) | ||
57 | { | ||
58 | wait_rcu_gp(call_rcu_sched); | ||
59 | } | ||
60 | EXPORT_SYMBOL(rcu_barrier_sched); | ||
61 | |||
50 | #if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_RCU_TRACE) | 62 | #if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_RCU_TRACE) |
51 | 63 | ||
52 | /* | 64 | /* |
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index d80e0d2f68c6..50fee7689e71 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c | |||
@@ -32,9 +32,10 @@ | |||
32 | #include <linux/init.h> | 32 | #include <linux/init.h> |
33 | #include <linux/spinlock.h> | 33 | #include <linux/spinlock.h> |
34 | #include <linux/smp.h> | 34 | #include <linux/smp.h> |
35 | #include <linux/rcupdate.h> | 35 | #include <linux/rcupdate_wait.h> |
36 | #include <linux/interrupt.h> | 36 | #include <linux/interrupt.h> |
37 | #include <linux/sched.h> | 37 | #include <linux/sched.h> |
38 | #include <linux/sched/debug.h> | ||
38 | #include <linux/nmi.h> | 39 | #include <linux/nmi.h> |
39 | #include <linux/atomic.h> | 40 | #include <linux/atomic.h> |
40 | #include <linux/bitops.h> | 41 | #include <linux/bitops.h> |
@@ -49,6 +50,7 @@ | |||
49 | #include <linux/kernel_stat.h> | 50 | #include <linux/kernel_stat.h> |
50 | #include <linux/wait.h> | 51 | #include <linux/wait.h> |
51 | #include <linux/kthread.h> | 52 | #include <linux/kthread.h> |
53 | #include <uapi/linux/sched/types.h> | ||
52 | #include <linux/prefetch.h> | 54 | #include <linux/prefetch.h> |
53 | #include <linux/delay.h> | 55 | #include <linux/delay.h> |
54 | #include <linux/stop_machine.h> | 56 | #include <linux/stop_machine.h> |
diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h index b60f2b6caa14..ec62a05bfdb3 100644 --- a/kernel/rcu/tree.h +++ b/kernel/rcu/tree.h | |||
@@ -24,6 +24,7 @@ | |||
24 | 24 | ||
25 | #include <linux/cache.h> | 25 | #include <linux/cache.h> |
26 | #include <linux/spinlock.h> | 26 | #include <linux/spinlock.h> |
27 | #include <linux/rtmutex.h> | ||
27 | #include <linux/threads.h> | 28 | #include <linux/threads.h> |
28 | #include <linux/cpumask.h> | 29 | #include <linux/cpumask.h> |
29 | #include <linux/seqlock.h> | 30 | #include <linux/seqlock.h> |
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index a240f3308be6..0a62a8f1caac 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h | |||
@@ -27,7 +27,9 @@ | |||
27 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
28 | #include <linux/gfp.h> | 28 | #include <linux/gfp.h> |
29 | #include <linux/oom.h> | 29 | #include <linux/oom.h> |
30 | #include <linux/sched/debug.h> | ||
30 | #include <linux/smpboot.h> | 31 | #include <linux/smpboot.h> |
32 | #include <uapi/linux/sched/types.h> | ||
31 | #include "../time/tick-internal.h" | 33 | #include "../time/tick-internal.h" |
32 | 34 | ||
33 | #ifdef CONFIG_RCU_BOOST | 35 | #ifdef CONFIG_RCU_BOOST |
diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c index 9e03db9ea9c0..55c8530316c7 100644 --- a/kernel/rcu/update.c +++ b/kernel/rcu/update.c | |||
@@ -36,7 +36,8 @@ | |||
36 | #include <linux/spinlock.h> | 36 | #include <linux/spinlock.h> |
37 | #include <linux/smp.h> | 37 | #include <linux/smp.h> |
38 | #include <linux/interrupt.h> | 38 | #include <linux/interrupt.h> |
39 | #include <linux/sched.h> | 39 | #include <linux/sched/signal.h> |
40 | #include <linux/sched/debug.h> | ||
40 | #include <linux/atomic.h> | 41 | #include <linux/atomic.h> |
41 | #include <linux/bitops.h> | 42 | #include <linux/bitops.h> |
42 | #include <linux/percpu.h> | 43 | #include <linux/percpu.h> |
@@ -49,6 +50,7 @@ | |||
49 | #include <linux/moduleparam.h> | 50 | #include <linux/moduleparam.h> |
50 | #include <linux/kthread.h> | 51 | #include <linux/kthread.h> |
51 | #include <linux/tick.h> | 52 | #include <linux/tick.h> |
53 | #include <linux/rcupdate_wait.h> | ||
52 | 54 | ||
53 | #define CREATE_TRACE_POINTS | 55 | #define CREATE_TRACE_POINTS |
54 | 56 | ||
diff --git a/kernel/sched/autogroup.h b/kernel/sched/autogroup.h index 890c95f2587a..ce40c810cd5c 100644 --- a/kernel/sched/autogroup.h +++ b/kernel/sched/autogroup.h | |||
@@ -2,6 +2,7 @@ | |||
2 | 2 | ||
3 | #include <linux/kref.h> | 3 | #include <linux/kref.h> |
4 | #include <linux/rwsem.h> | 4 | #include <linux/rwsem.h> |
5 | #include <linux/sched/autogroup.h> | ||
5 | 6 | ||
6 | struct autogroup { | 7 | struct autogroup { |
7 | /* | 8 | /* |
diff --git a/kernel/sched/clock.c b/kernel/sched/clock.c index ad64efe41722..a08795e21628 100644 --- a/kernel/sched/clock.c +++ b/kernel/sched/clock.c | |||
@@ -58,6 +58,8 @@ | |||
58 | #include <linux/percpu.h> | 58 | #include <linux/percpu.h> |
59 | #include <linux/ktime.h> | 59 | #include <linux/ktime.h> |
60 | #include <linux/sched.h> | 60 | #include <linux/sched.h> |
61 | #include <linux/nmi.h> | ||
62 | #include <linux/sched/clock.h> | ||
61 | #include <linux/static_key.h> | 63 | #include <linux/static_key.h> |
62 | #include <linux/workqueue.h> | 64 | #include <linux/workqueue.h> |
63 | #include <linux/compiler.h> | 65 | #include <linux/compiler.h> |
diff --git a/kernel/sched/completion.c b/kernel/sched/completion.c index f063a25d4449..53f9558fa925 100644 --- a/kernel/sched/completion.c +++ b/kernel/sched/completion.c | |||
@@ -11,7 +11,8 @@ | |||
11 | * Waiting for completion is a typically sync point, but not an exclusion point. | 11 | * Waiting for completion is a typically sync point, but not an exclusion point. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/sched.h> | 14 | #include <linux/sched/signal.h> |
15 | #include <linux/sched/debug.h> | ||
15 | #include <linux/completion.h> | 16 | #include <linux/completion.h> |
16 | 17 | ||
17 | /** | 18 | /** |
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index bbfb917a9b49..956383844116 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
@@ -6,10 +6,15 @@ | |||
6 | * Copyright (C) 1991-2002 Linus Torvalds | 6 | * Copyright (C) 1991-2002 Linus Torvalds |
7 | */ | 7 | */ |
8 | #include <linux/sched.h> | 8 | #include <linux/sched.h> |
9 | #include <linux/sched/clock.h> | ||
10 | #include <uapi/linux/sched/types.h> | ||
11 | #include <linux/sched/loadavg.h> | ||
12 | #include <linux/sched/hotplug.h> | ||
9 | #include <linux/cpuset.h> | 13 | #include <linux/cpuset.h> |
10 | #include <linux/delayacct.h> | 14 | #include <linux/delayacct.h> |
11 | #include <linux/init_task.h> | 15 | #include <linux/init_task.h> |
12 | #include <linux/context_tracking.h> | 16 | #include <linux/context_tracking.h> |
17 | #include <linux/rcupdate_wait.h> | ||
13 | 18 | ||
14 | #include <linux/blkdev.h> | 19 | #include <linux/blkdev.h> |
15 | #include <linux/kprobes.h> | 20 | #include <linux/kprobes.h> |
@@ -981,7 +986,7 @@ static struct rq *__migrate_task(struct rq *rq, struct task_struct *p, int dest_ | |||
981 | return rq; | 986 | return rq; |
982 | 987 | ||
983 | /* Affinity changed (again). */ | 988 | /* Affinity changed (again). */ |
984 | if (!cpumask_test_cpu(dest_cpu, tsk_cpus_allowed(p))) | 989 | if (!cpumask_test_cpu(dest_cpu, &p->cpus_allowed)) |
985 | return rq; | 990 | return rq; |
986 | 991 | ||
987 | rq = move_queued_task(rq, p, dest_cpu); | 992 | rq = move_queued_task(rq, p, dest_cpu); |
@@ -1259,10 +1264,10 @@ static int migrate_swap_stop(void *data) | |||
1259 | if (task_cpu(arg->src_task) != arg->src_cpu) | 1264 | if (task_cpu(arg->src_task) != arg->src_cpu) |
1260 | goto unlock; | 1265 | goto unlock; |
1261 | 1266 | ||
1262 | if (!cpumask_test_cpu(arg->dst_cpu, tsk_cpus_allowed(arg->src_task))) | 1267 | if (!cpumask_test_cpu(arg->dst_cpu, &arg->src_task->cpus_allowed)) |
1263 | goto unlock; | 1268 | goto unlock; |
1264 | 1269 | ||
1265 | if (!cpumask_test_cpu(arg->src_cpu, tsk_cpus_allowed(arg->dst_task))) | 1270 | if (!cpumask_test_cpu(arg->src_cpu, &arg->dst_task->cpus_allowed)) |
1266 | goto unlock; | 1271 | goto unlock; |
1267 | 1272 | ||
1268 | __migrate_swap_task(arg->src_task, arg->dst_cpu); | 1273 | __migrate_swap_task(arg->src_task, arg->dst_cpu); |
@@ -1303,10 +1308,10 @@ int migrate_swap(struct task_struct *cur, struct task_struct *p) | |||
1303 | if (!cpu_active(arg.src_cpu) || !cpu_active(arg.dst_cpu)) | 1308 | if (!cpu_active(arg.src_cpu) || !cpu_active(arg.dst_cpu)) |
1304 | goto out; | 1309 | goto out; |
1305 | 1310 | ||
1306 | if (!cpumask_test_cpu(arg.dst_cpu, tsk_cpus_allowed(arg.src_task))) | 1311 | if (!cpumask_test_cpu(arg.dst_cpu, &arg.src_task->cpus_allowed)) |
1307 | goto out; | 1312 | goto out; |
1308 | 1313 | ||
1309 | if (!cpumask_test_cpu(arg.src_cpu, tsk_cpus_allowed(arg.dst_task))) | 1314 | if (!cpumask_test_cpu(arg.src_cpu, &arg.dst_task->cpus_allowed)) |
1310 | goto out; | 1315 | goto out; |
1311 | 1316 | ||
1312 | trace_sched_swap_numa(cur, arg.src_cpu, p, arg.dst_cpu); | 1317 | trace_sched_swap_numa(cur, arg.src_cpu, p, arg.dst_cpu); |
@@ -1490,14 +1495,14 @@ static int select_fallback_rq(int cpu, struct task_struct *p) | |||
1490 | for_each_cpu(dest_cpu, nodemask) { | 1495 | for_each_cpu(dest_cpu, nodemask) { |
1491 | if (!cpu_active(dest_cpu)) | 1496 | if (!cpu_active(dest_cpu)) |
1492 | continue; | 1497 | continue; |
1493 | if (cpumask_test_cpu(dest_cpu, tsk_cpus_allowed(p))) | 1498 | if (cpumask_test_cpu(dest_cpu, &p->cpus_allowed)) |
1494 | return dest_cpu; | 1499 | return dest_cpu; |
1495 | } | 1500 | } |
1496 | } | 1501 | } |
1497 | 1502 | ||
1498 | for (;;) { | 1503 | for (;;) { |
1499 | /* Any allowed, online CPU? */ | 1504 | /* Any allowed, online CPU? */ |
1500 | for_each_cpu(dest_cpu, tsk_cpus_allowed(p)) { | 1505 | for_each_cpu(dest_cpu, &p->cpus_allowed) { |
1501 | if (!(p->flags & PF_KTHREAD) && !cpu_active(dest_cpu)) | 1506 | if (!(p->flags & PF_KTHREAD) && !cpu_active(dest_cpu)) |
1502 | continue; | 1507 | continue; |
1503 | if (!cpu_online(dest_cpu)) | 1508 | if (!cpu_online(dest_cpu)) |
@@ -1549,10 +1554,10 @@ int select_task_rq(struct task_struct *p, int cpu, int sd_flags, int wake_flags) | |||
1549 | { | 1554 | { |
1550 | lockdep_assert_held(&p->pi_lock); | 1555 | lockdep_assert_held(&p->pi_lock); |
1551 | 1556 | ||
1552 | if (tsk_nr_cpus_allowed(p) > 1) | 1557 | if (p->nr_cpus_allowed > 1) |
1553 | cpu = p->sched_class->select_task_rq(p, cpu, sd_flags, wake_flags); | 1558 | cpu = p->sched_class->select_task_rq(p, cpu, sd_flags, wake_flags); |
1554 | else | 1559 | else |
1555 | cpu = cpumask_any(tsk_cpus_allowed(p)); | 1560 | cpu = cpumask_any(&p->cpus_allowed); |
1556 | 1561 | ||
1557 | /* | 1562 | /* |
1558 | * In order not to call set_task_cpu() on a blocking task we need | 1563 | * In order not to call set_task_cpu() on a blocking task we need |
@@ -1564,7 +1569,7 @@ int select_task_rq(struct task_struct *p, int cpu, int sd_flags, int wake_flags) | |||
1564 | * [ this allows ->select_task() to simply return task_cpu(p) and | 1569 | * [ this allows ->select_task() to simply return task_cpu(p) and |
1565 | * not worry about this generic constraint ] | 1570 | * not worry about this generic constraint ] |
1566 | */ | 1571 | */ |
1567 | if (unlikely(!cpumask_test_cpu(cpu, tsk_cpus_allowed(p)) || | 1572 | if (unlikely(!cpumask_test_cpu(cpu, &p->cpus_allowed) || |
1568 | !cpu_online(cpu))) | 1573 | !cpu_online(cpu))) |
1569 | cpu = select_fallback_rq(task_cpu(p), p); | 1574 | cpu = select_fallback_rq(task_cpu(p), p); |
1570 | 1575 | ||
@@ -3211,6 +3216,15 @@ static inline void preempt_latency_start(int val) { } | |||
3211 | static inline void preempt_latency_stop(int val) { } | 3216 | static inline void preempt_latency_stop(int val) { } |
3212 | #endif | 3217 | #endif |
3213 | 3218 | ||
3219 | static inline unsigned long get_preempt_disable_ip(struct task_struct *p) | ||
3220 | { | ||
3221 | #ifdef CONFIG_DEBUG_PREEMPT | ||
3222 | return p->preempt_disable_ip; | ||
3223 | #else | ||
3224 | return 0; | ||
3225 | #endif | ||
3226 | } | ||
3227 | |||
3214 | /* | 3228 | /* |
3215 | * Print scheduling while atomic bug: | 3229 | * Print scheduling while atomic bug: |
3216 | */ | 3230 | */ |
@@ -5233,6 +5247,9 @@ void sched_show_task(struct task_struct *p) | |||
5233 | int ppid; | 5247 | int ppid; |
5234 | unsigned long state = p->state; | 5248 | unsigned long state = p->state; |
5235 | 5249 | ||
5250 | /* Make sure the string lines up properly with the number of task states: */ | ||
5251 | BUILD_BUG_ON(sizeof(TASK_STATE_TO_CHAR_STR)-1 != ilog2(TASK_STATE_MAX)+1); | ||
5252 | |||
5236 | if (!try_get_task_stack(p)) | 5253 | if (!try_get_task_stack(p)) |
5237 | return; | 5254 | return; |
5238 | if (state) | 5255 | if (state) |
@@ -5461,7 +5478,7 @@ int migrate_task_to(struct task_struct *p, int target_cpu) | |||
5461 | if (curr_cpu == target_cpu) | 5478 | if (curr_cpu == target_cpu) |
5462 | return 0; | 5479 | return 0; |
5463 | 5480 | ||
5464 | if (!cpumask_test_cpu(target_cpu, tsk_cpus_allowed(p))) | 5481 | if (!cpumask_test_cpu(target_cpu, &p->cpus_allowed)) |
5465 | return -EINVAL; | 5482 | return -EINVAL; |
5466 | 5483 | ||
5467 | /* TODO: This is not properly updating schedstats */ | 5484 | /* TODO: This is not properly updating schedstats */ |
diff --git a/kernel/sched/cpudeadline.c b/kernel/sched/cpudeadline.c index e73119013c53..fba235c7d026 100644 --- a/kernel/sched/cpudeadline.c +++ b/kernel/sched/cpudeadline.c | |||
@@ -128,10 +128,10 @@ int cpudl_find(struct cpudl *cp, struct task_struct *p, | |||
128 | const struct sched_dl_entity *dl_se = &p->dl; | 128 | const struct sched_dl_entity *dl_se = &p->dl; |
129 | 129 | ||
130 | if (later_mask && | 130 | if (later_mask && |
131 | cpumask_and(later_mask, cp->free_cpus, tsk_cpus_allowed(p))) { | 131 | cpumask_and(later_mask, cp->free_cpus, &p->cpus_allowed)) { |
132 | best_cpu = cpumask_any(later_mask); | 132 | best_cpu = cpumask_any(later_mask); |
133 | goto out; | 133 | goto out; |
134 | } else if (cpumask_test_cpu(cpudl_maximum(cp), tsk_cpus_allowed(p)) && | 134 | } else if (cpumask_test_cpu(cpudl_maximum(cp), &p->cpus_allowed) && |
135 | dl_time_before(dl_se->deadline, cp->elements[0].dl)) { | 135 | dl_time_before(dl_se->deadline, cp->elements[0].dl)) { |
136 | best_cpu = cpudl_maximum(cp); | 136 | best_cpu = cpudl_maximum(cp); |
137 | if (later_mask) | 137 | if (later_mask) |
diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c index fd4659313640..8f8de3d4d6b7 100644 --- a/kernel/sched/cpufreq_schedutil.c +++ b/kernel/sched/cpufreq_schedutil.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/cpufreq.h> | 14 | #include <linux/cpufreq.h> |
15 | #include <linux/kthread.h> | 15 | #include <linux/kthread.h> |
16 | #include <uapi/linux/sched/types.h> | ||
16 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
17 | #include <trace/events/power.h> | 18 | #include <trace/events/power.h> |
18 | 19 | ||
diff --git a/kernel/sched/cpupri.c b/kernel/sched/cpupri.c index 11e9705bf937..981fcd7dc394 100644 --- a/kernel/sched/cpupri.c +++ b/kernel/sched/cpupri.c | |||
@@ -103,11 +103,11 @@ int cpupri_find(struct cpupri *cp, struct task_struct *p, | |||
103 | if (skip) | 103 | if (skip) |
104 | continue; | 104 | continue; |
105 | 105 | ||
106 | if (cpumask_any_and(tsk_cpus_allowed(p), vec->mask) >= nr_cpu_ids) | 106 | if (cpumask_any_and(&p->cpus_allowed, vec->mask) >= nr_cpu_ids) |
107 | continue; | 107 | continue; |
108 | 108 | ||
109 | if (lowest_mask) { | 109 | if (lowest_mask) { |
110 | cpumask_and(lowest_mask, tsk_cpus_allowed(p), vec->mask); | 110 | cpumask_and(lowest_mask, &p->cpus_allowed, vec->mask); |
111 | 111 | ||
112 | /* | 112 | /* |
113 | * We have to ensure that we have at least one bit | 113 | * We have to ensure that we have at least one bit |
diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c index 2ecec3a4f1ee..f3778e2b46c8 100644 --- a/kernel/sched/cputime.c +++ b/kernel/sched/cputime.c | |||
@@ -4,12 +4,8 @@ | |||
4 | #include <linux/kernel_stat.h> | 4 | #include <linux/kernel_stat.h> |
5 | #include <linux/static_key.h> | 5 | #include <linux/static_key.h> |
6 | #include <linux/context_tracking.h> | 6 | #include <linux/context_tracking.h> |
7 | #include <linux/cputime.h> | 7 | #include <linux/sched/cputime.h> |
8 | #include "sched.h" | 8 | #include "sched.h" |
9 | #ifdef CONFIG_PARAVIRT | ||
10 | #include <asm/paravirt.h> | ||
11 | #endif | ||
12 | |||
13 | 9 | ||
14 | #ifdef CONFIG_IRQ_TIME_ACCOUNTING | 10 | #ifdef CONFIG_IRQ_TIME_ACCOUNTING |
15 | 11 | ||
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c index 27737f34757d..99b2c33a9fbc 100644 --- a/kernel/sched/deadline.c +++ b/kernel/sched/deadline.c | |||
@@ -134,7 +134,7 @@ static void inc_dl_migration(struct sched_dl_entity *dl_se, struct dl_rq *dl_rq) | |||
134 | { | 134 | { |
135 | struct task_struct *p = dl_task_of(dl_se); | 135 | struct task_struct *p = dl_task_of(dl_se); |
136 | 136 | ||
137 | if (tsk_nr_cpus_allowed(p) > 1) | 137 | if (p->nr_cpus_allowed > 1) |
138 | dl_rq->dl_nr_migratory++; | 138 | dl_rq->dl_nr_migratory++; |
139 | 139 | ||
140 | update_dl_migration(dl_rq); | 140 | update_dl_migration(dl_rq); |
@@ -144,7 +144,7 @@ static void dec_dl_migration(struct sched_dl_entity *dl_se, struct dl_rq *dl_rq) | |||
144 | { | 144 | { |
145 | struct task_struct *p = dl_task_of(dl_se); | 145 | struct task_struct *p = dl_task_of(dl_se); |
146 | 146 | ||
147 | if (tsk_nr_cpus_allowed(p) > 1) | 147 | if (p->nr_cpus_allowed > 1) |
148 | dl_rq->dl_nr_migratory--; | 148 | dl_rq->dl_nr_migratory--; |
149 | 149 | ||
150 | update_dl_migration(dl_rq); | 150 | update_dl_migration(dl_rq); |
@@ -252,7 +252,7 @@ static struct rq *dl_task_offline_migration(struct rq *rq, struct task_struct *p | |||
252 | * If we cannot preempt any rq, fall back to pick any | 252 | * If we cannot preempt any rq, fall back to pick any |
253 | * online cpu. | 253 | * online cpu. |
254 | */ | 254 | */ |
255 | cpu = cpumask_any_and(cpu_active_mask, tsk_cpus_allowed(p)); | 255 | cpu = cpumask_any_and(cpu_active_mask, &p->cpus_allowed); |
256 | if (cpu >= nr_cpu_ids) { | 256 | if (cpu >= nr_cpu_ids) { |
257 | /* | 257 | /* |
258 | * Fail to find any suitable cpu. | 258 | * Fail to find any suitable cpu. |
@@ -958,7 +958,7 @@ static void enqueue_task_dl(struct rq *rq, struct task_struct *p, int flags) | |||
958 | 958 | ||
959 | enqueue_dl_entity(&p->dl, pi_se, flags); | 959 | enqueue_dl_entity(&p->dl, pi_se, flags); |
960 | 960 | ||
961 | if (!task_current(rq, p) && tsk_nr_cpus_allowed(p) > 1) | 961 | if (!task_current(rq, p) && p->nr_cpus_allowed > 1) |
962 | enqueue_pushable_dl_task(rq, p); | 962 | enqueue_pushable_dl_task(rq, p); |
963 | } | 963 | } |
964 | 964 | ||
@@ -1032,9 +1032,9 @@ select_task_rq_dl(struct task_struct *p, int cpu, int sd_flag, int flags) | |||
1032 | * try to make it stay here, it might be important. | 1032 | * try to make it stay here, it might be important. |
1033 | */ | 1033 | */ |
1034 | if (unlikely(dl_task(curr)) && | 1034 | if (unlikely(dl_task(curr)) && |
1035 | (tsk_nr_cpus_allowed(curr) < 2 || | 1035 | (curr->nr_cpus_allowed < 2 || |
1036 | !dl_entity_preempt(&p->dl, &curr->dl)) && | 1036 | !dl_entity_preempt(&p->dl, &curr->dl)) && |
1037 | (tsk_nr_cpus_allowed(p) > 1)) { | 1037 | (p->nr_cpus_allowed > 1)) { |
1038 | int target = find_later_rq(p); | 1038 | int target = find_later_rq(p); |
1039 | 1039 | ||
1040 | if (target != -1 && | 1040 | if (target != -1 && |
@@ -1055,7 +1055,7 @@ static void check_preempt_equal_dl(struct rq *rq, struct task_struct *p) | |||
1055 | * Current can't be migrated, useless to reschedule, | 1055 | * Current can't be migrated, useless to reschedule, |
1056 | * let's hope p can move out. | 1056 | * let's hope p can move out. |
1057 | */ | 1057 | */ |
1058 | if (tsk_nr_cpus_allowed(rq->curr) == 1 || | 1058 | if (rq->curr->nr_cpus_allowed == 1 || |
1059 | cpudl_find(&rq->rd->cpudl, rq->curr, NULL) == -1) | 1059 | cpudl_find(&rq->rd->cpudl, rq->curr, NULL) == -1) |
1060 | return; | 1060 | return; |
1061 | 1061 | ||
@@ -1063,7 +1063,7 @@ static void check_preempt_equal_dl(struct rq *rq, struct task_struct *p) | |||
1063 | * p is migratable, so let's not schedule it and | 1063 | * p is migratable, so let's not schedule it and |
1064 | * see if it is pushed or pulled somewhere else. | 1064 | * see if it is pushed or pulled somewhere else. |
1065 | */ | 1065 | */ |
1066 | if (tsk_nr_cpus_allowed(p) != 1 && | 1066 | if (p->nr_cpus_allowed != 1 && |
1067 | cpudl_find(&rq->rd->cpudl, p, NULL) != -1) | 1067 | cpudl_find(&rq->rd->cpudl, p, NULL) != -1) |
1068 | return; | 1068 | return; |
1069 | 1069 | ||
@@ -1178,7 +1178,7 @@ static void put_prev_task_dl(struct rq *rq, struct task_struct *p) | |||
1178 | { | 1178 | { |
1179 | update_curr_dl(rq); | 1179 | update_curr_dl(rq); |
1180 | 1180 | ||
1181 | if (on_dl_rq(&p->dl) && tsk_nr_cpus_allowed(p) > 1) | 1181 | if (on_dl_rq(&p->dl) && p->nr_cpus_allowed > 1) |
1182 | enqueue_pushable_dl_task(rq, p); | 1182 | enqueue_pushable_dl_task(rq, p); |
1183 | } | 1183 | } |
1184 | 1184 | ||
@@ -1235,7 +1235,7 @@ static void set_curr_task_dl(struct rq *rq) | |||
1235 | static int pick_dl_task(struct rq *rq, struct task_struct *p, int cpu) | 1235 | static int pick_dl_task(struct rq *rq, struct task_struct *p, int cpu) |
1236 | { | 1236 | { |
1237 | if (!task_running(rq, p) && | 1237 | if (!task_running(rq, p) && |
1238 | cpumask_test_cpu(cpu, tsk_cpus_allowed(p))) | 1238 | cpumask_test_cpu(cpu, &p->cpus_allowed)) |
1239 | return 1; | 1239 | return 1; |
1240 | return 0; | 1240 | return 0; |
1241 | } | 1241 | } |
@@ -1279,7 +1279,7 @@ static int find_later_rq(struct task_struct *task) | |||
1279 | if (unlikely(!later_mask)) | 1279 | if (unlikely(!later_mask)) |
1280 | return -1; | 1280 | return -1; |
1281 | 1281 | ||
1282 | if (tsk_nr_cpus_allowed(task) == 1) | 1282 | if (task->nr_cpus_allowed == 1) |
1283 | return -1; | 1283 | return -1; |
1284 | 1284 | ||
1285 | /* | 1285 | /* |
@@ -1384,8 +1384,7 @@ static struct rq *find_lock_later_rq(struct task_struct *task, struct rq *rq) | |||
1384 | /* Retry if something changed. */ | 1384 | /* Retry if something changed. */ |
1385 | if (double_lock_balance(rq, later_rq)) { | 1385 | if (double_lock_balance(rq, later_rq)) { |
1386 | if (unlikely(task_rq(task) != rq || | 1386 | if (unlikely(task_rq(task) != rq || |
1387 | !cpumask_test_cpu(later_rq->cpu, | 1387 | !cpumask_test_cpu(later_rq->cpu, &task->cpus_allowed) || |
1388 | tsk_cpus_allowed(task)) || | ||
1389 | task_running(rq, task) || | 1388 | task_running(rq, task) || |
1390 | !dl_task(task) || | 1389 | !dl_task(task) || |
1391 | !task_on_rq_queued(task))) { | 1390 | !task_on_rq_queued(task))) { |
@@ -1425,7 +1424,7 @@ static struct task_struct *pick_next_pushable_dl_task(struct rq *rq) | |||
1425 | 1424 | ||
1426 | BUG_ON(rq->cpu != task_cpu(p)); | 1425 | BUG_ON(rq->cpu != task_cpu(p)); |
1427 | BUG_ON(task_current(rq, p)); | 1426 | BUG_ON(task_current(rq, p)); |
1428 | BUG_ON(tsk_nr_cpus_allowed(p) <= 1); | 1427 | BUG_ON(p->nr_cpus_allowed <= 1); |
1429 | 1428 | ||
1430 | BUG_ON(!task_on_rq_queued(p)); | 1429 | BUG_ON(!task_on_rq_queued(p)); |
1431 | BUG_ON(!dl_task(p)); | 1430 | BUG_ON(!dl_task(p)); |
@@ -1464,7 +1463,7 @@ retry: | |||
1464 | */ | 1463 | */ |
1465 | if (dl_task(rq->curr) && | 1464 | if (dl_task(rq->curr) && |
1466 | dl_time_before(next_task->dl.deadline, rq->curr->dl.deadline) && | 1465 | dl_time_before(next_task->dl.deadline, rq->curr->dl.deadline) && |
1467 | tsk_nr_cpus_allowed(rq->curr) > 1) { | 1466 | rq->curr->nr_cpus_allowed > 1) { |
1468 | resched_curr(rq); | 1467 | resched_curr(rq); |
1469 | return 0; | 1468 | return 0; |
1470 | } | 1469 | } |
@@ -1611,9 +1610,9 @@ static void task_woken_dl(struct rq *rq, struct task_struct *p) | |||
1611 | { | 1610 | { |
1612 | if (!task_running(rq, p) && | 1611 | if (!task_running(rq, p) && |
1613 | !test_tsk_need_resched(rq->curr) && | 1612 | !test_tsk_need_resched(rq->curr) && |
1614 | tsk_nr_cpus_allowed(p) > 1 && | 1613 | p->nr_cpus_allowed > 1 && |
1615 | dl_task(rq->curr) && | 1614 | dl_task(rq->curr) && |
1616 | (tsk_nr_cpus_allowed(rq->curr) < 2 || | 1615 | (rq->curr->nr_cpus_allowed < 2 || |
1617 | !dl_entity_preempt(&p->dl, &rq->curr->dl))) { | 1616 | !dl_entity_preempt(&p->dl, &rq->curr->dl))) { |
1618 | push_dl_tasks(rq); | 1617 | push_dl_tasks(rq); |
1619 | } | 1618 | } |
@@ -1727,7 +1726,7 @@ static void switched_to_dl(struct rq *rq, struct task_struct *p) | |||
1727 | 1726 | ||
1728 | if (rq->curr != p) { | 1727 | if (rq->curr != p) { |
1729 | #ifdef CONFIG_SMP | 1728 | #ifdef CONFIG_SMP |
1730 | if (tsk_nr_cpus_allowed(p) > 1 && rq->dl.overloaded) | 1729 | if (p->nr_cpus_allowed > 1 && rq->dl.overloaded) |
1731 | queue_push_tasks(rq); | 1730 | queue_push_tasks(rq); |
1732 | #endif | 1731 | #endif |
1733 | if (dl_task(rq->curr)) | 1732 | if (dl_task(rq->curr)) |
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index 109adc0e9cb9..38f019324f1a 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c | |||
@@ -11,7 +11,8 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/proc_fs.h> | 13 | #include <linux/proc_fs.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched/mm.h> |
15 | #include <linux/sched/task.h> | ||
15 | #include <linux/seq_file.h> | 16 | #include <linux/seq_file.h> |
16 | #include <linux/kallsyms.h> | 17 | #include <linux/kallsyms.h> |
17 | #include <linux/utsname.h> | 18 | #include <linux/utsname.h> |
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 274c747a01ce..3e88b35ac157 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c | |||
@@ -20,7 +20,9 @@ | |||
20 | * Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra | 20 | * Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/sched.h> | 23 | #include <linux/sched/mm.h> |
24 | #include <linux/sched/topology.h> | ||
25 | |||
24 | #include <linux/latencytop.h> | 26 | #include <linux/latencytop.h> |
25 | #include <linux/cpumask.h> | 27 | #include <linux/cpumask.h> |
26 | #include <linux/cpuidle.h> | 28 | #include <linux/cpuidle.h> |
@@ -1551,7 +1553,7 @@ static void task_numa_compare(struct task_numa_env *env, | |||
1551 | */ | 1553 | */ |
1552 | if (cur) { | 1554 | if (cur) { |
1553 | /* Skip this swap candidate if cannot move to the source cpu */ | 1555 | /* Skip this swap candidate if cannot move to the source cpu */ |
1554 | if (!cpumask_test_cpu(env->src_cpu, tsk_cpus_allowed(cur))) | 1556 | if (!cpumask_test_cpu(env->src_cpu, &cur->cpus_allowed)) |
1555 | goto unlock; | 1557 | goto unlock; |
1556 | 1558 | ||
1557 | /* | 1559 | /* |
@@ -1661,7 +1663,7 @@ static void task_numa_find_cpu(struct task_numa_env *env, | |||
1661 | 1663 | ||
1662 | for_each_cpu(cpu, cpumask_of_node(env->dst_nid)) { | 1664 | for_each_cpu(cpu, cpumask_of_node(env->dst_nid)) { |
1663 | /* Skip this CPU if the source task cannot migrate */ | 1665 | /* Skip this CPU if the source task cannot migrate */ |
1664 | if (!cpumask_test_cpu(cpu, tsk_cpus_allowed(env->p))) | 1666 | if (!cpumask_test_cpu(cpu, &env->p->cpus_allowed)) |
1665 | continue; | 1667 | continue; |
1666 | 1668 | ||
1667 | env->dst_cpu = cpu; | 1669 | env->dst_cpu = cpu; |
@@ -5458,7 +5460,7 @@ find_idlest_group(struct sched_domain *sd, struct task_struct *p, | |||
5458 | 5460 | ||
5459 | /* Skip over this group if it has no CPUs allowed */ | 5461 | /* Skip over this group if it has no CPUs allowed */ |
5460 | if (!cpumask_intersects(sched_group_cpus(group), | 5462 | if (!cpumask_intersects(sched_group_cpus(group), |
5461 | tsk_cpus_allowed(p))) | 5463 | &p->cpus_allowed)) |
5462 | continue; | 5464 | continue; |
5463 | 5465 | ||
5464 | local_group = cpumask_test_cpu(this_cpu, | 5466 | local_group = cpumask_test_cpu(this_cpu, |
@@ -5578,7 +5580,7 @@ find_idlest_cpu(struct sched_group *group, struct task_struct *p, int this_cpu) | |||
5578 | return cpumask_first(sched_group_cpus(group)); | 5580 | return cpumask_first(sched_group_cpus(group)); |
5579 | 5581 | ||
5580 | /* Traverse only the allowed CPUs */ | 5582 | /* Traverse only the allowed CPUs */ |
5581 | for_each_cpu_and(i, sched_group_cpus(group), tsk_cpus_allowed(p)) { | 5583 | for_each_cpu_and(i, sched_group_cpus(group), &p->cpus_allowed) { |
5582 | if (idle_cpu(i)) { | 5584 | if (idle_cpu(i)) { |
5583 | struct rq *rq = cpu_rq(i); | 5585 | struct rq *rq = cpu_rq(i); |
5584 | struct cpuidle_state *idle = idle_get_state(rq); | 5586 | struct cpuidle_state *idle = idle_get_state(rq); |
@@ -5717,7 +5719,7 @@ static int select_idle_core(struct task_struct *p, struct sched_domain *sd, int | |||
5717 | if (!test_idle_cores(target, false)) | 5719 | if (!test_idle_cores(target, false)) |
5718 | return -1; | 5720 | return -1; |
5719 | 5721 | ||
5720 | cpumask_and(cpus, sched_domain_span(sd), tsk_cpus_allowed(p)); | 5722 | cpumask_and(cpus, sched_domain_span(sd), &p->cpus_allowed); |
5721 | 5723 | ||
5722 | for_each_cpu_wrap(core, cpus, target, wrap) { | 5724 | for_each_cpu_wrap(core, cpus, target, wrap) { |
5723 | bool idle = true; | 5725 | bool idle = true; |
@@ -5751,7 +5753,7 @@ static int select_idle_smt(struct task_struct *p, struct sched_domain *sd, int t | |||
5751 | return -1; | 5753 | return -1; |
5752 | 5754 | ||
5753 | for_each_cpu(cpu, cpu_smt_mask(target)) { | 5755 | for_each_cpu(cpu, cpu_smt_mask(target)) { |
5754 | if (!cpumask_test_cpu(cpu, tsk_cpus_allowed(p))) | 5756 | if (!cpumask_test_cpu(cpu, &p->cpus_allowed)) |
5755 | continue; | 5757 | continue; |
5756 | if (idle_cpu(cpu)) | 5758 | if (idle_cpu(cpu)) |
5757 | return cpu; | 5759 | return cpu; |
@@ -5803,7 +5805,7 @@ static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, int t | |||
5803 | time = local_clock(); | 5805 | time = local_clock(); |
5804 | 5806 | ||
5805 | for_each_cpu_wrap(cpu, sched_domain_span(sd), target, wrap) { | 5807 | for_each_cpu_wrap(cpu, sched_domain_span(sd), target, wrap) { |
5806 | if (!cpumask_test_cpu(cpu, tsk_cpus_allowed(p))) | 5808 | if (!cpumask_test_cpu(cpu, &p->cpus_allowed)) |
5807 | continue; | 5809 | continue; |
5808 | if (idle_cpu(cpu)) | 5810 | if (idle_cpu(cpu)) |
5809 | break; | 5811 | break; |
@@ -5958,7 +5960,7 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_f | |||
5958 | if (sd_flag & SD_BALANCE_WAKE) { | 5960 | if (sd_flag & SD_BALANCE_WAKE) { |
5959 | record_wakee(p); | 5961 | record_wakee(p); |
5960 | want_affine = !wake_wide(p) && !wake_cap(p, cpu, prev_cpu) | 5962 | want_affine = !wake_wide(p) && !wake_cap(p, cpu, prev_cpu) |
5961 | && cpumask_test_cpu(cpu, tsk_cpus_allowed(p)); | 5963 | && cpumask_test_cpu(cpu, &p->cpus_allowed); |
5962 | } | 5964 | } |
5963 | 5965 | ||
5964 | rcu_read_lock(); | 5966 | rcu_read_lock(); |
@@ -6698,7 +6700,7 @@ int can_migrate_task(struct task_struct *p, struct lb_env *env) | |||
6698 | if (throttled_lb_pair(task_group(p), env->src_cpu, env->dst_cpu)) | 6700 | if (throttled_lb_pair(task_group(p), env->src_cpu, env->dst_cpu)) |
6699 | return 0; | 6701 | return 0; |
6700 | 6702 | ||
6701 | if (!cpumask_test_cpu(env->dst_cpu, tsk_cpus_allowed(p))) { | 6703 | if (!cpumask_test_cpu(env->dst_cpu, &p->cpus_allowed)) { |
6702 | int cpu; | 6704 | int cpu; |
6703 | 6705 | ||
6704 | schedstat_inc(p->se.statistics.nr_failed_migrations_affine); | 6706 | schedstat_inc(p->se.statistics.nr_failed_migrations_affine); |
@@ -6718,7 +6720,7 @@ int can_migrate_task(struct task_struct *p, struct lb_env *env) | |||
6718 | 6720 | ||
6719 | /* Prevent to re-select dst_cpu via env's cpus */ | 6721 | /* Prevent to re-select dst_cpu via env's cpus */ |
6720 | for_each_cpu_and(cpu, env->dst_grpmask, env->cpus) { | 6722 | for_each_cpu_and(cpu, env->dst_grpmask, env->cpus) { |
6721 | if (cpumask_test_cpu(cpu, tsk_cpus_allowed(p))) { | 6723 | if (cpumask_test_cpu(cpu, &p->cpus_allowed)) { |
6722 | env->flags |= LBF_DST_PINNED; | 6724 | env->flags |= LBF_DST_PINNED; |
6723 | env->new_dst_cpu = cpu; | 6725 | env->new_dst_cpu = cpu; |
6724 | break; | 6726 | break; |
@@ -7252,7 +7254,7 @@ check_cpu_capacity(struct rq *rq, struct sched_domain *sd) | |||
7252 | 7254 | ||
7253 | /* | 7255 | /* |
7254 | * Group imbalance indicates (and tries to solve) the problem where balancing | 7256 | * Group imbalance indicates (and tries to solve) the problem where balancing |
7255 | * groups is inadequate due to tsk_cpus_allowed() constraints. | 7257 | * groups is inadequate due to ->cpus_allowed constraints. |
7256 | * | 7258 | * |
7257 | * Imagine a situation of two groups of 4 cpus each and 4 tasks each with a | 7259 | * Imagine a situation of two groups of 4 cpus each and 4 tasks each with a |
7258 | * cpumask covering 1 cpu of the first group and 3 cpus of the second group. | 7260 | * cpumask covering 1 cpu of the first group and 3 cpus of the second group. |
@@ -8211,8 +8213,7 @@ more_balance: | |||
8211 | * if the curr task on busiest cpu can't be | 8213 | * if the curr task on busiest cpu can't be |
8212 | * moved to this_cpu | 8214 | * moved to this_cpu |
8213 | */ | 8215 | */ |
8214 | if (!cpumask_test_cpu(this_cpu, | 8216 | if (!cpumask_test_cpu(this_cpu, &busiest->curr->cpus_allowed)) { |
8215 | tsk_cpus_allowed(busiest->curr))) { | ||
8216 | raw_spin_unlock_irqrestore(&busiest->lock, | 8217 | raw_spin_unlock_irqrestore(&busiest->lock, |
8217 | flags); | 8218 | flags); |
8218 | env.flags |= LBF_ALL_PINNED; | 8219 | env.flags |= LBF_ALL_PINNED; |
diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c index 6a4bae0a649d..ac6d5176463d 100644 --- a/kernel/sched/idle.c +++ b/kernel/sched/idle.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * Generic entry point for the idle threads | 2 | * Generic entry point for the idle threads |
3 | */ | 3 | */ |
4 | #include <linux/sched.h> | 4 | #include <linux/sched.h> |
5 | #include <linux/sched/idle.h> | ||
5 | #include <linux/cpu.h> | 6 | #include <linux/cpu.h> |
6 | #include <linux/cpuidle.h> | 7 | #include <linux/cpuidle.h> |
7 | #include <linux/cpuhotplug.h> | 8 | #include <linux/cpuhotplug.h> |
diff --git a/kernel/sched/loadavg.c b/kernel/sched/loadavg.c index a2d6eb71f06b..7296b7308eca 100644 --- a/kernel/sched/loadavg.c +++ b/kernel/sched/loadavg.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/export.h> | 9 | #include <linux/export.h> |
10 | #include <linux/sched/loadavg.h> | ||
10 | 11 | ||
11 | #include "sched.h" | 12 | #include "sched.h" |
12 | 13 | ||
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index e8836cfc4cdb..9f3e40226dec 100644 --- a/kernel/sched/rt.c +++ b/kernel/sched/rt.c | |||
@@ -335,7 +335,7 @@ static void inc_rt_migration(struct sched_rt_entity *rt_se, struct rt_rq *rt_rq) | |||
335 | rt_rq = &rq_of_rt_rq(rt_rq)->rt; | 335 | rt_rq = &rq_of_rt_rq(rt_rq)->rt; |
336 | 336 | ||
337 | rt_rq->rt_nr_total++; | 337 | rt_rq->rt_nr_total++; |
338 | if (tsk_nr_cpus_allowed(p) > 1) | 338 | if (p->nr_cpus_allowed > 1) |
339 | rt_rq->rt_nr_migratory++; | 339 | rt_rq->rt_nr_migratory++; |
340 | 340 | ||
341 | update_rt_migration(rt_rq); | 341 | update_rt_migration(rt_rq); |
@@ -352,7 +352,7 @@ static void dec_rt_migration(struct sched_rt_entity *rt_se, struct rt_rq *rt_rq) | |||
352 | rt_rq = &rq_of_rt_rq(rt_rq)->rt; | 352 | rt_rq = &rq_of_rt_rq(rt_rq)->rt; |
353 | 353 | ||
354 | rt_rq->rt_nr_total--; | 354 | rt_rq->rt_nr_total--; |
355 | if (tsk_nr_cpus_allowed(p) > 1) | 355 | if (p->nr_cpus_allowed > 1) |
356 | rt_rq->rt_nr_migratory--; | 356 | rt_rq->rt_nr_migratory--; |
357 | 357 | ||
358 | update_rt_migration(rt_rq); | 358 | update_rt_migration(rt_rq); |
@@ -1324,7 +1324,7 @@ enqueue_task_rt(struct rq *rq, struct task_struct *p, int flags) | |||
1324 | 1324 | ||
1325 | enqueue_rt_entity(rt_se, flags); | 1325 | enqueue_rt_entity(rt_se, flags); |
1326 | 1326 | ||
1327 | if (!task_current(rq, p) && tsk_nr_cpus_allowed(p) > 1) | 1327 | if (!task_current(rq, p) && p->nr_cpus_allowed > 1) |
1328 | enqueue_pushable_task(rq, p); | 1328 | enqueue_pushable_task(rq, p); |
1329 | } | 1329 | } |
1330 | 1330 | ||
@@ -1413,7 +1413,7 @@ select_task_rq_rt(struct task_struct *p, int cpu, int sd_flag, int flags) | |||
1413 | * will have to sort it out. | 1413 | * will have to sort it out. |
1414 | */ | 1414 | */ |
1415 | if (curr && unlikely(rt_task(curr)) && | 1415 | if (curr && unlikely(rt_task(curr)) && |
1416 | (tsk_nr_cpus_allowed(curr) < 2 || | 1416 | (curr->nr_cpus_allowed < 2 || |
1417 | curr->prio <= p->prio)) { | 1417 | curr->prio <= p->prio)) { |
1418 | int target = find_lowest_rq(p); | 1418 | int target = find_lowest_rq(p); |
1419 | 1419 | ||
@@ -1437,7 +1437,7 @@ static void check_preempt_equal_prio(struct rq *rq, struct task_struct *p) | |||
1437 | * Current can't be migrated, useless to reschedule, | 1437 | * Current can't be migrated, useless to reschedule, |
1438 | * let's hope p can move out. | 1438 | * let's hope p can move out. |
1439 | */ | 1439 | */ |
1440 | if (tsk_nr_cpus_allowed(rq->curr) == 1 || | 1440 | if (rq->curr->nr_cpus_allowed == 1 || |
1441 | !cpupri_find(&rq->rd->cpupri, rq->curr, NULL)) | 1441 | !cpupri_find(&rq->rd->cpupri, rq->curr, NULL)) |
1442 | return; | 1442 | return; |
1443 | 1443 | ||
@@ -1445,7 +1445,7 @@ static void check_preempt_equal_prio(struct rq *rq, struct task_struct *p) | |||
1445 | * p is migratable, so let's not schedule it and | 1445 | * p is migratable, so let's not schedule it and |
1446 | * see if it is pushed or pulled somewhere else. | 1446 | * see if it is pushed or pulled somewhere else. |
1447 | */ | 1447 | */ |
1448 | if (tsk_nr_cpus_allowed(p) != 1 | 1448 | if (p->nr_cpus_allowed != 1 |
1449 | && cpupri_find(&rq->rd->cpupri, p, NULL)) | 1449 | && cpupri_find(&rq->rd->cpupri, p, NULL)) |
1450 | return; | 1450 | return; |
1451 | 1451 | ||
@@ -1579,7 +1579,7 @@ static void put_prev_task_rt(struct rq *rq, struct task_struct *p) | |||
1579 | * The previous task needs to be made eligible for pushing | 1579 | * The previous task needs to be made eligible for pushing |
1580 | * if it is still active | 1580 | * if it is still active |
1581 | */ | 1581 | */ |
1582 | if (on_rt_rq(&p->rt) && tsk_nr_cpus_allowed(p) > 1) | 1582 | if (on_rt_rq(&p->rt) && p->nr_cpus_allowed > 1) |
1583 | enqueue_pushable_task(rq, p); | 1583 | enqueue_pushable_task(rq, p); |
1584 | } | 1584 | } |
1585 | 1585 | ||
@@ -1591,7 +1591,7 @@ static void put_prev_task_rt(struct rq *rq, struct task_struct *p) | |||
1591 | static int pick_rt_task(struct rq *rq, struct task_struct *p, int cpu) | 1591 | static int pick_rt_task(struct rq *rq, struct task_struct *p, int cpu) |
1592 | { | 1592 | { |
1593 | if (!task_running(rq, p) && | 1593 | if (!task_running(rq, p) && |
1594 | cpumask_test_cpu(cpu, tsk_cpus_allowed(p))) | 1594 | cpumask_test_cpu(cpu, &p->cpus_allowed)) |
1595 | return 1; | 1595 | return 1; |
1596 | return 0; | 1596 | return 0; |
1597 | } | 1597 | } |
@@ -1629,7 +1629,7 @@ static int find_lowest_rq(struct task_struct *task) | |||
1629 | if (unlikely(!lowest_mask)) | 1629 | if (unlikely(!lowest_mask)) |
1630 | return -1; | 1630 | return -1; |
1631 | 1631 | ||
1632 | if (tsk_nr_cpus_allowed(task) == 1) | 1632 | if (task->nr_cpus_allowed == 1) |
1633 | return -1; /* No other targets possible */ | 1633 | return -1; /* No other targets possible */ |
1634 | 1634 | ||
1635 | if (!cpupri_find(&task_rq(task)->rd->cpupri, task, lowest_mask)) | 1635 | if (!cpupri_find(&task_rq(task)->rd->cpupri, task, lowest_mask)) |
@@ -1726,8 +1726,7 @@ static struct rq *find_lock_lowest_rq(struct task_struct *task, struct rq *rq) | |||
1726 | * Also make sure that it wasn't scheduled on its rq. | 1726 | * Also make sure that it wasn't scheduled on its rq. |
1727 | */ | 1727 | */ |
1728 | if (unlikely(task_rq(task) != rq || | 1728 | if (unlikely(task_rq(task) != rq || |
1729 | !cpumask_test_cpu(lowest_rq->cpu, | 1729 | !cpumask_test_cpu(lowest_rq->cpu, &task->cpus_allowed) || |
1730 | tsk_cpus_allowed(task)) || | ||
1731 | task_running(rq, task) || | 1730 | task_running(rq, task) || |
1732 | !rt_task(task) || | 1731 | !rt_task(task) || |
1733 | !task_on_rq_queued(task))) { | 1732 | !task_on_rq_queued(task))) { |
@@ -1762,7 +1761,7 @@ static struct task_struct *pick_next_pushable_task(struct rq *rq) | |||
1762 | 1761 | ||
1763 | BUG_ON(rq->cpu != task_cpu(p)); | 1762 | BUG_ON(rq->cpu != task_cpu(p)); |
1764 | BUG_ON(task_current(rq, p)); | 1763 | BUG_ON(task_current(rq, p)); |
1765 | BUG_ON(tsk_nr_cpus_allowed(p) <= 1); | 1764 | BUG_ON(p->nr_cpus_allowed <= 1); |
1766 | 1765 | ||
1767 | BUG_ON(!task_on_rq_queued(p)); | 1766 | BUG_ON(!task_on_rq_queued(p)); |
1768 | BUG_ON(!rt_task(p)); | 1767 | BUG_ON(!rt_task(p)); |
@@ -2122,9 +2121,9 @@ static void task_woken_rt(struct rq *rq, struct task_struct *p) | |||
2122 | { | 2121 | { |
2123 | if (!task_running(rq, p) && | 2122 | if (!task_running(rq, p) && |
2124 | !test_tsk_need_resched(rq->curr) && | 2123 | !test_tsk_need_resched(rq->curr) && |
2125 | tsk_nr_cpus_allowed(p) > 1 && | 2124 | p->nr_cpus_allowed > 1 && |
2126 | (dl_task(rq->curr) || rt_task(rq->curr)) && | 2125 | (dl_task(rq->curr) || rt_task(rq->curr)) && |
2127 | (tsk_nr_cpus_allowed(rq->curr) < 2 || | 2126 | (rq->curr->nr_cpus_allowed < 2 || |
2128 | rq->curr->prio <= p->prio)) | 2127 | rq->curr->prio <= p->prio)) |
2129 | push_rt_tasks(rq); | 2128 | push_rt_tasks(rq); |
2130 | } | 2129 | } |
@@ -2197,7 +2196,7 @@ static void switched_to_rt(struct rq *rq, struct task_struct *p) | |||
2197 | */ | 2196 | */ |
2198 | if (task_on_rq_queued(p) && rq->curr != p) { | 2197 | if (task_on_rq_queued(p) && rq->curr != p) { |
2199 | #ifdef CONFIG_SMP | 2198 | #ifdef CONFIG_SMP |
2200 | if (tsk_nr_cpus_allowed(p) > 1 && rq->rt.overloaded) | 2199 | if (p->nr_cpus_allowed > 1 && rq->rt.overloaded) |
2201 | queue_push_tasks(rq); | 2200 | queue_push_tasks(rq); |
2202 | #endif /* CONFIG_SMP */ | 2201 | #endif /* CONFIG_SMP */ |
2203 | if (p->prio < rq->curr->prio) | 2202 | if (p->prio < rq->curr->prio) |
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 71b10a9b73cf..5cbf92214ad8 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h | |||
@@ -1,9 +1,26 @@ | |||
1 | 1 | ||
2 | #include <linux/sched.h> | 2 | #include <linux/sched.h> |
3 | #include <linux/sched/autogroup.h> | ||
3 | #include <linux/sched/sysctl.h> | 4 | #include <linux/sched/sysctl.h> |
5 | #include <linux/sched/topology.h> | ||
4 | #include <linux/sched/rt.h> | 6 | #include <linux/sched/rt.h> |
5 | #include <linux/u64_stats_sync.h> | ||
6 | #include <linux/sched/deadline.h> | 7 | #include <linux/sched/deadline.h> |
8 | #include <linux/sched/clock.h> | ||
9 | #include <linux/sched/wake_q.h> | ||
10 | #include <linux/sched/signal.h> | ||
11 | #include <linux/sched/numa_balancing.h> | ||
12 | #include <linux/sched/mm.h> | ||
13 | #include <linux/sched/cpufreq.h> | ||
14 | #include <linux/sched/stat.h> | ||
15 | #include <linux/sched/nohz.h> | ||
16 | #include <linux/sched/debug.h> | ||
17 | #include <linux/sched/hotplug.h> | ||
18 | #include <linux/sched/task.h> | ||
19 | #include <linux/sched/task_stack.h> | ||
20 | #include <linux/sched/cputime.h> | ||
21 | #include <linux/sched/init.h> | ||
22 | |||
23 | #include <linux/u64_stats_sync.h> | ||
7 | #include <linux/kernel_stat.h> | 24 | #include <linux/kernel_stat.h> |
8 | #include <linux/binfmts.h> | 25 | #include <linux/binfmts.h> |
9 | #include <linux/mutex.h> | 26 | #include <linux/mutex.h> |
@@ -13,6 +30,10 @@ | |||
13 | #include <linux/tick.h> | 30 | #include <linux/tick.h> |
14 | #include <linux/slab.h> | 31 | #include <linux/slab.h> |
15 | 32 | ||
33 | #ifdef CONFIG_PARAVIRT | ||
34 | #include <asm/paravirt.h> | ||
35 | #endif | ||
36 | |||
16 | #include "cpupri.h" | 37 | #include "cpupri.h" |
17 | #include "cpudeadline.h" | 38 | #include "cpudeadline.h" |
18 | #include "cpuacct.h" | 39 | #include "cpuacct.h" |
@@ -1817,7 +1838,6 @@ extern void print_rt_stats(struct seq_file *m, int cpu); | |||
1817 | extern void print_dl_stats(struct seq_file *m, int cpu); | 1838 | extern void print_dl_stats(struct seq_file *m, int cpu); |
1818 | extern void | 1839 | extern void |
1819 | print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq); | 1840 | print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq); |
1820 | |||
1821 | #ifdef CONFIG_NUMA_BALANCING | 1841 | #ifdef CONFIG_NUMA_BALANCING |
1822 | extern void | 1842 | extern void |
1823 | show_numa_stats(struct task_struct *p, struct seq_file *m); | 1843 | show_numa_stats(struct task_struct *p, struct seq_file *m); |
diff --git a/kernel/sched/stats.h b/kernel/sched/stats.h index bf0da0aa0a14..d5710651043b 100644 --- a/kernel/sched/stats.h +++ b/kernel/sched/stats.h | |||
@@ -164,114 +164,3 @@ sched_info_switch(struct rq *rq, | |||
164 | #define sched_info_arrive(rq, next) do { } while (0) | 164 | #define sched_info_arrive(rq, next) do { } while (0) |
165 | #define sched_info_switch(rq, t, next) do { } while (0) | 165 | #define sched_info_switch(rq, t, next) do { } while (0) |
166 | #endif /* CONFIG_SCHED_INFO */ | 166 | #endif /* CONFIG_SCHED_INFO */ |
167 | |||
168 | /* | ||
169 | * The following are functions that support scheduler-internal time accounting. | ||
170 | * These functions are generally called at the timer tick. None of this depends | ||
171 | * on CONFIG_SCHEDSTATS. | ||
172 | */ | ||
173 | |||
174 | /** | ||
175 | * get_running_cputimer - return &tsk->signal->cputimer if cputimer is running | ||
176 | * | ||
177 | * @tsk: Pointer to target task. | ||
178 | */ | ||
179 | #ifdef CONFIG_POSIX_TIMERS | ||
180 | static inline | ||
181 | struct thread_group_cputimer *get_running_cputimer(struct task_struct *tsk) | ||
182 | { | ||
183 | struct thread_group_cputimer *cputimer = &tsk->signal->cputimer; | ||
184 | |||
185 | /* Check if cputimer isn't running. This is accessed without locking. */ | ||
186 | if (!READ_ONCE(cputimer->running)) | ||
187 | return NULL; | ||
188 | |||
189 | /* | ||
190 | * After we flush the task's sum_exec_runtime to sig->sum_sched_runtime | ||
191 | * in __exit_signal(), we won't account to the signal struct further | ||
192 | * cputime consumed by that task, even though the task can still be | ||
193 | * ticking after __exit_signal(). | ||
194 | * | ||
195 | * In order to keep a consistent behaviour between thread group cputime | ||
196 | * and thread group cputimer accounting, lets also ignore the cputime | ||
197 | * elapsing after __exit_signal() in any thread group timer running. | ||
198 | * | ||
199 | * This makes sure that POSIX CPU clocks and timers are synchronized, so | ||
200 | * that a POSIX CPU timer won't expire while the corresponding POSIX CPU | ||
201 | * clock delta is behind the expiring timer value. | ||
202 | */ | ||
203 | if (unlikely(!tsk->sighand)) | ||
204 | return NULL; | ||
205 | |||
206 | return cputimer; | ||
207 | } | ||
208 | #else | ||
209 | static inline | ||
210 | struct thread_group_cputimer *get_running_cputimer(struct task_struct *tsk) | ||
211 | { | ||
212 | return NULL; | ||
213 | } | ||
214 | #endif | ||
215 | |||
216 | /** | ||
217 | * account_group_user_time - Maintain utime for a thread group. | ||
218 | * | ||
219 | * @tsk: Pointer to task structure. | ||
220 | * @cputime: Time value by which to increment the utime field of the | ||
221 | * thread_group_cputime structure. | ||
222 | * | ||
223 | * If thread group time is being maintained, get the structure for the | ||
224 | * running CPU and update the utime field there. | ||
225 | */ | ||
226 | static inline void account_group_user_time(struct task_struct *tsk, | ||
227 | u64 cputime) | ||
228 | { | ||
229 | struct thread_group_cputimer *cputimer = get_running_cputimer(tsk); | ||
230 | |||
231 | if (!cputimer) | ||
232 | return; | ||
233 | |||
234 | atomic64_add(cputime, &cputimer->cputime_atomic.utime); | ||
235 | } | ||
236 | |||
237 | /** | ||
238 | * account_group_system_time - Maintain stime for a thread group. | ||
239 | * | ||
240 | * @tsk: Pointer to task structure. | ||
241 | * @cputime: Time value by which to increment the stime field of the | ||
242 | * thread_group_cputime structure. | ||
243 | * | ||
244 | * If thread group time is being maintained, get the structure for the | ||
245 | * running CPU and update the stime field there. | ||
246 | */ | ||
247 | static inline void account_group_system_time(struct task_struct *tsk, | ||
248 | u64 cputime) | ||
249 | { | ||
250 | struct thread_group_cputimer *cputimer = get_running_cputimer(tsk); | ||
251 | |||
252 | if (!cputimer) | ||
253 | return; | ||
254 | |||
255 | atomic64_add(cputime, &cputimer->cputime_atomic.stime); | ||
256 | } | ||
257 | |||
258 | /** | ||
259 | * account_group_exec_runtime - Maintain exec runtime for a thread group. | ||
260 | * | ||
261 | * @tsk: Pointer to task structure. | ||
262 | * @ns: Time value by which to increment the sum_exec_runtime field | ||
263 | * of the thread_group_cputime structure. | ||
264 | * | ||
265 | * If thread group time is being maintained, get the structure for the | ||
266 | * running CPU and update the sum_exec_runtime field there. | ||
267 | */ | ||
268 | static inline void account_group_exec_runtime(struct task_struct *tsk, | ||
269 | unsigned long long ns) | ||
270 | { | ||
271 | struct thread_group_cputimer *cputimer = get_running_cputimer(tsk); | ||
272 | |||
273 | if (!cputimer) | ||
274 | return; | ||
275 | |||
276 | atomic64_add(ns, &cputimer->cputime_atomic.sum_exec_runtime); | ||
277 | } | ||
diff --git a/kernel/sched/swait.c b/kernel/sched/swait.c index 82f0dff90030..3d5610dcce11 100644 --- a/kernel/sched/swait.c +++ b/kernel/sched/swait.c | |||
@@ -1,4 +1,4 @@ | |||
1 | #include <linux/sched.h> | 1 | #include <linux/sched/signal.h> |
2 | #include <linux/swait.h> | 2 | #include <linux/swait.h> |
3 | 3 | ||
4 | void __init_swait_queue_head(struct swait_queue_head *q, const char *name, | 4 | void __init_swait_queue_head(struct swait_queue_head *q, const char *name, |
diff --git a/kernel/sched/wait.c b/kernel/sched/wait.c index 9453efe9b25a..4d2ea6f25568 100644 --- a/kernel/sched/wait.c +++ b/kernel/sched/wait.c | |||
@@ -5,7 +5,8 @@ | |||
5 | */ | 5 | */ |
6 | #include <linux/init.h> | 6 | #include <linux/init.h> |
7 | #include <linux/export.h> | 7 | #include <linux/export.h> |
8 | #include <linux/sched.h> | 8 | #include <linux/sched/signal.h> |
9 | #include <linux/sched/debug.h> | ||
9 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
10 | #include <linux/wait.h> | 11 | #include <linux/wait.h> |
11 | #include <linux/hash.h> | 12 | #include <linux/hash.h> |
diff --git a/kernel/seccomp.c b/kernel/seccomp.c index e15185c28de5..65f61077ad50 100644 --- a/kernel/seccomp.c +++ b/kernel/seccomp.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/compat.h> | 18 | #include <linux/compat.h> |
19 | #include <linux/coredump.h> | 19 | #include <linux/coredump.h> |
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/sched/task_stack.h> | ||
21 | #include <linux/seccomp.h> | 22 | #include <linux/seccomp.h> |
22 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
23 | #include <linux/syscalls.h> | 24 | #include <linux/syscalls.h> |
diff --git a/kernel/signal.c b/kernel/signal.c index 214a8feeb771..7e59ebc2c25e 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -13,7 +13,12 @@ | |||
13 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
14 | #include <linux/export.h> | 14 | #include <linux/export.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched/mm.h> |
17 | #include <linux/sched/user.h> | ||
18 | #include <linux/sched/debug.h> | ||
19 | #include <linux/sched/task.h> | ||
20 | #include <linux/sched/task_stack.h> | ||
21 | #include <linux/sched/cputime.h> | ||
17 | #include <linux/fs.h> | 22 | #include <linux/fs.h> |
18 | #include <linux/tty.h> | 23 | #include <linux/tty.h> |
19 | #include <linux/binfmts.h> | 24 | #include <linux/binfmts.h> |
@@ -2395,11 +2400,11 @@ void exit_signals(struct task_struct *tsk) | |||
2395 | * @tsk is about to have PF_EXITING set - lock out users which | 2400 | * @tsk is about to have PF_EXITING set - lock out users which |
2396 | * expect stable threadgroup. | 2401 | * expect stable threadgroup. |
2397 | */ | 2402 | */ |
2398 | threadgroup_change_begin(tsk); | 2403 | cgroup_threadgroup_change_begin(tsk); |
2399 | 2404 | ||
2400 | if (thread_group_empty(tsk) || signal_group_exit(tsk->signal)) { | 2405 | if (thread_group_empty(tsk) || signal_group_exit(tsk->signal)) { |
2401 | tsk->flags |= PF_EXITING; | 2406 | tsk->flags |= PF_EXITING; |
2402 | threadgroup_change_end(tsk); | 2407 | cgroup_threadgroup_change_end(tsk); |
2403 | return; | 2408 | return; |
2404 | } | 2409 | } |
2405 | 2410 | ||
@@ -2410,7 +2415,7 @@ void exit_signals(struct task_struct *tsk) | |||
2410 | */ | 2415 | */ |
2411 | tsk->flags |= PF_EXITING; | 2416 | tsk->flags |= PF_EXITING; |
2412 | 2417 | ||
2413 | threadgroup_change_end(tsk); | 2418 | cgroup_threadgroup_change_end(tsk); |
2414 | 2419 | ||
2415 | if (!signal_pending(tsk)) | 2420 | if (!signal_pending(tsk)) |
2416 | goto out; | 2421 | goto out; |
diff --git a/kernel/smp.c b/kernel/smp.c index 77fcdb9f2775..a817769b53c0 100644 --- a/kernel/smp.c +++ b/kernel/smp.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/smp.h> | 17 | #include <linux/smp.h> |
18 | #include <linux/cpu.h> | 18 | #include <linux/cpu.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/sched/idle.h> | ||
20 | #include <linux/hypervisor.h> | 21 | #include <linux/hypervisor.h> |
21 | 22 | ||
22 | #include "smpboot.h" | 23 | #include "smpboot.h" |
diff --git a/kernel/smpboot.c b/kernel/smpboot.c index 4a5c6e73ecd4..1d71c051a951 100644 --- a/kernel/smpboot.c +++ b/kernel/smpboot.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/list.h> | 9 | #include <linux/list.h> |
10 | #include <linux/slab.h> | 10 | #include <linux/slab.h> |
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <linux/sched/task.h> | ||
12 | #include <linux/export.h> | 13 | #include <linux/export.h> |
13 | #include <linux/percpu.h> | 14 | #include <linux/percpu.h> |
14 | #include <linux/kthread.h> | 15 | #include <linux/kthread.h> |
diff --git a/kernel/sys.c b/kernel/sys.c index b07adca97ea3..7ff6d1b10cec 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -49,6 +49,13 @@ | |||
49 | #include <linux/binfmts.h> | 49 | #include <linux/binfmts.h> |
50 | 50 | ||
51 | #include <linux/sched.h> | 51 | #include <linux/sched.h> |
52 | #include <linux/sched/autogroup.h> | ||
53 | #include <linux/sched/loadavg.h> | ||
54 | #include <linux/sched/stat.h> | ||
55 | #include <linux/sched/mm.h> | ||
56 | #include <linux/sched/coredump.h> | ||
57 | #include <linux/sched/task.h> | ||
58 | #include <linux/sched/cputime.h> | ||
52 | #include <linux/rcupdate.h> | 59 | #include <linux/rcupdate.h> |
53 | #include <linux/uidgid.h> | 60 | #include <linux/uidgid.h> |
54 | #include <linux/cred.h> | 61 | #include <linux/cred.h> |
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index bb260ceb3718..acf0a5a06da7 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -63,6 +63,7 @@ | |||
63 | #include <linux/capability.h> | 63 | #include <linux/capability.h> |
64 | #include <linux/binfmts.h> | 64 | #include <linux/binfmts.h> |
65 | #include <linux/sched/sysctl.h> | 65 | #include <linux/sched/sysctl.h> |
66 | #include <linux/sched/coredump.h> | ||
66 | #include <linux/kexec.h> | 67 | #include <linux/kexec.h> |
67 | #include <linux/bpf.h> | 68 | #include <linux/bpf.h> |
68 | #include <linux/mount.h> | 69 | #include <linux/mount.h> |
diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c index e6dc9a538efa..ce3a31e8eb36 100644 --- a/kernel/time/alarmtimer.c +++ b/kernel/time/alarmtimer.c | |||
@@ -19,6 +19,8 @@ | |||
19 | #include <linux/hrtimer.h> | 19 | #include <linux/hrtimer.h> |
20 | #include <linux/timerqueue.h> | 20 | #include <linux/timerqueue.h> |
21 | #include <linux/rtc.h> | 21 | #include <linux/rtc.h> |
22 | #include <linux/sched/signal.h> | ||
23 | #include <linux/sched/debug.h> | ||
22 | #include <linux/alarmtimer.h> | 24 | #include <linux/alarmtimer.h> |
23 | #include <linux/mutex.h> | 25 | #include <linux/mutex.h> |
24 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index 8e11d8d9f419..ec08f527d7ee 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c | |||
@@ -43,10 +43,12 @@ | |||
43 | #include <linux/seq_file.h> | 43 | #include <linux/seq_file.h> |
44 | #include <linux/err.h> | 44 | #include <linux/err.h> |
45 | #include <linux/debugobjects.h> | 45 | #include <linux/debugobjects.h> |
46 | #include <linux/sched.h> | 46 | #include <linux/sched/signal.h> |
47 | #include <linux/sched/sysctl.h> | 47 | #include <linux/sched/sysctl.h> |
48 | #include <linux/sched/rt.h> | 48 | #include <linux/sched/rt.h> |
49 | #include <linux/sched/deadline.h> | 49 | #include <linux/sched/deadline.h> |
50 | #include <linux/sched/nohz.h> | ||
51 | #include <linux/sched/debug.h> | ||
50 | #include <linux/timer.h> | 52 | #include <linux/timer.h> |
51 | #include <linux/freezer.h> | 53 | #include <linux/freezer.h> |
52 | 54 | ||
diff --git a/kernel/time/itimer.c b/kernel/time/itimer.c index a95f13c31464..087d6a1279b8 100644 --- a/kernel/time/itimer.c +++ b/kernel/time/itimer.c | |||
@@ -10,6 +10,8 @@ | |||
10 | #include <linux/interrupt.h> | 10 | #include <linux/interrupt.h> |
11 | #include <linux/syscalls.h> | 11 | #include <linux/syscalls.h> |
12 | #include <linux/time.h> | 12 | #include <linux/time.h> |
13 | #include <linux/sched/signal.h> | ||
14 | #include <linux/sched/cputime.h> | ||
13 | #include <linux/posix-timers.h> | 15 | #include <linux/posix-timers.h> |
14 | #include <linux/hrtimer.h> | 16 | #include <linux/hrtimer.h> |
15 | #include <trace/events/timer.h> | 17 | #include <trace/events/timer.h> |
diff --git a/kernel/time/posix-cpu-timers.c b/kernel/time/posix-cpu-timers.c index b4377a5e4269..4513ad16a253 100644 --- a/kernel/time/posix-cpu-timers.c +++ b/kernel/time/posix-cpu-timers.c | |||
@@ -2,7 +2,8 @@ | |||
2 | * Implement CPU time clocks for the POSIX clock interface. | 2 | * Implement CPU time clocks for the POSIX clock interface. |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <linux/sched.h> | 5 | #include <linux/sched/signal.h> |
6 | #include <linux/sched/cputime.h> | ||
6 | #include <linux/posix-timers.h> | 7 | #include <linux/posix-timers.h> |
7 | #include <linux/errno.h> | 8 | #include <linux/errno.h> |
8 | #include <linux/math64.h> | 9 | #include <linux/math64.h> |
diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c index 1e6623d76750..50a6a47020de 100644 --- a/kernel/time/posix-timers.c +++ b/kernel/time/posix-timers.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/slab.h> | 35 | #include <linux/slab.h> |
36 | #include <linux/time.h> | 36 | #include <linux/time.h> |
37 | #include <linux/mutex.h> | 37 | #include <linux/mutex.h> |
38 | #include <linux/sched/task.h> | ||
38 | 39 | ||
39 | #include <linux/uaccess.h> | 40 | #include <linux/uaccess.h> |
40 | #include <linux/list.h> | 41 | #include <linux/list.h> |
diff --git a/kernel/time/sched_clock.c b/kernel/time/sched_clock.c index a26036d37a38..ea6b610c4c57 100644 --- a/kernel/time/sched_clock.c +++ b/kernel/time/sched_clock.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/moduleparam.h> | 14 | #include <linux/moduleparam.h> |
15 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
16 | #include <linux/sched/clock.h> | ||
16 | #include <linux/syscore_ops.h> | 17 | #include <linux/syscore_ops.h> |
17 | #include <linux/hrtimer.h> | 18 | #include <linux/hrtimer.h> |
18 | #include <linux/sched_clock.h> | 19 | #include <linux/sched_clock.h> |
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 2c115fdab397..7fe53be86077 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c | |||
@@ -17,8 +17,12 @@ | |||
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/kernel_stat.h> | 18 | #include <linux/kernel_stat.h> |
19 | #include <linux/percpu.h> | 19 | #include <linux/percpu.h> |
20 | #include <linux/nmi.h> | ||
20 | #include <linux/profile.h> | 21 | #include <linux/profile.h> |
21 | #include <linux/sched.h> | 22 | #include <linux/sched/signal.h> |
23 | #include <linux/sched/clock.h> | ||
24 | #include <linux/sched/stat.h> | ||
25 | #include <linux/sched/nohz.h> | ||
22 | #include <linux/module.h> | 26 | #include <linux/module.h> |
23 | #include <linux/irq_work.h> | 27 | #include <linux/irq_work.h> |
24 | #include <linux/posix-timers.h> | 28 | #include <linux/posix-timers.h> |
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 95b258dd75db..5b63a2102c29 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c | |||
@@ -14,7 +14,9 @@ | |||
14 | #include <linux/percpu.h> | 14 | #include <linux/percpu.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
17 | #include <linux/nmi.h> | ||
17 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
19 | #include <linux/sched/loadavg.h> | ||
18 | #include <linux/syscore_ops.h> | 20 | #include <linux/syscore_ops.h> |
19 | #include <linux/clocksource.h> | 21 | #include <linux/clocksource.h> |
20 | #include <linux/jiffies.h> | 22 | #include <linux/jiffies.h> |
diff --git a/kernel/time/timer.c b/kernel/time/timer.c index 82a6bfa0c307..1dc0256bfb6e 100644 --- a/kernel/time/timer.c +++ b/kernel/time/timer.c | |||
@@ -38,8 +38,10 @@ | |||
38 | #include <linux/tick.h> | 38 | #include <linux/tick.h> |
39 | #include <linux/kallsyms.h> | 39 | #include <linux/kallsyms.h> |
40 | #include <linux/irq_work.h> | 40 | #include <linux/irq_work.h> |
41 | #include <linux/sched.h> | 41 | #include <linux/sched/signal.h> |
42 | #include <linux/sched/sysctl.h> | 42 | #include <linux/sched/sysctl.h> |
43 | #include <linux/sched/nohz.h> | ||
44 | #include <linux/sched/debug.h> | ||
43 | #include <linux/slab.h> | 45 | #include <linux/slab.h> |
44 | #include <linux/compat.h> | 46 | #include <linux/compat.h> |
45 | 47 | ||
diff --git a/kernel/torture.c b/kernel/torture.c index 01a99976f072..55de96529287 100644 --- a/kernel/torture.c +++ b/kernel/torture.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/smp.h> | 30 | #include <linux/smp.h> |
31 | #include <linux/interrupt.h> | 31 | #include <linux/interrupt.h> |
32 | #include <linux/sched.h> | 32 | #include <linux/sched.h> |
33 | #include <linux/sched/clock.h> | ||
33 | #include <linux/atomic.h> | 34 | #include <linux/atomic.h> |
34 | #include <linux/bitops.h> | 35 | #include <linux/bitops.h> |
35 | #include <linux/completion.h> | 36 | #include <linux/completion.h> |
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 0c0609326391..0d1597c9ee30 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #include <linux/stop_machine.h> | 16 | #include <linux/stop_machine.h> |
17 | #include <linux/clocksource.h> | 17 | #include <linux/clocksource.h> |
18 | #include <linux/sched/task.h> | ||
18 | #include <linux/kallsyms.h> | 19 | #include <linux/kallsyms.h> |
19 | #include <linux/seq_file.h> | 20 | #include <linux/seq_file.h> |
20 | #include <linux/suspend.h> | 21 | #include <linux/suspend.h> |
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index a85739efcc30..96fc3c043ad6 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/trace_events.h> | 6 | #include <linux/trace_events.h> |
7 | #include <linux/ring_buffer.h> | 7 | #include <linux/ring_buffer.h> |
8 | #include <linux/trace_clock.h> | 8 | #include <linux/trace_clock.h> |
9 | #include <linux/sched/clock.h> | ||
9 | #include <linux/trace_seq.h> | 10 | #include <linux/trace_seq.h> |
10 | #include <linux/spinlock.h> | 11 | #include <linux/spinlock.h> |
11 | #include <linux/irq_work.h> | 12 | #include <linux/irq_work.h> |
diff --git a/kernel/trace/ring_buffer_benchmark.c b/kernel/trace/ring_buffer_benchmark.c index 6df9a83e20d7..c190a4d5013c 100644 --- a/kernel/trace/ring_buffer_benchmark.c +++ b/kernel/trace/ring_buffer_benchmark.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/ring_buffer.h> | 6 | #include <linux/ring_buffer.h> |
7 | #include <linux/completion.h> | 7 | #include <linux/completion.h> |
8 | #include <linux/kthread.h> | 8 | #include <linux/kthread.h> |
9 | #include <uapi/linux/sched/types.h> | ||
9 | #include <linux/module.h> | 10 | #include <linux/module.h> |
10 | #include <linux/ktime.h> | 11 | #include <linux/ktime.h> |
11 | #include <asm/local.h> | 12 | #include <asm/local.h> |
diff --git a/kernel/trace/trace_clock.c b/kernel/trace/trace_clock.c index 0f06532a755b..5fdc779f411d 100644 --- a/kernel/trace/trace_clock.c +++ b/kernel/trace/trace_clock.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/percpu.h> | 19 | #include <linux/percpu.h> |
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/sched/clock.h> | ||
21 | #include <linux/ktime.h> | 22 | #include <linux/ktime.h> |
22 | #include <linux/trace_clock.h> | 23 | #include <linux/trace_clock.h> |
23 | 24 | ||
diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c index f3a960ed75a1..1c21d0e2a145 100644 --- a/kernel/trace/trace_events_hist.c +++ b/kernel/trace/trace_events_hist.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/mutex.h> | 19 | #include <linux/mutex.h> |
20 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
21 | #include <linux/stacktrace.h> | 21 | #include <linux/stacktrace.h> |
22 | #include <linux/rculist.h> | ||
22 | 23 | ||
23 | #include "tracing_map.h" | 24 | #include "tracing_map.h" |
24 | #include "trace.h" | 25 | #include "trace.h" |
diff --git a/kernel/trace/trace_events_trigger.c b/kernel/trace/trace_events_trigger.c index 6721a1e89f39..f2ac9d44f6c4 100644 --- a/kernel/trace/trace_events_trigger.c +++ b/kernel/trace/trace_events_trigger.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/ctype.h> | 22 | #include <linux/ctype.h> |
23 | #include <linux/mutex.h> | 23 | #include <linux/mutex.h> |
24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
25 | #include <linux/rculist.h> | ||
25 | 26 | ||
26 | #include "trace.h" | 27 | #include "trace.h" |
27 | 28 | ||
diff --git a/kernel/trace/trace_hwlat.c b/kernel/trace/trace_hwlat.c index edfacd954e1b..21ea6ae77d93 100644 --- a/kernel/trace/trace_hwlat.c +++ b/kernel/trace/trace_hwlat.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/uaccess.h> | 44 | #include <linux/uaccess.h> |
45 | #include <linux/cpumask.h> | 45 | #include <linux/cpumask.h> |
46 | #include <linux/delay.h> | 46 | #include <linux/delay.h> |
47 | #include <linux/sched/clock.h> | ||
47 | #include "trace.h" | 48 | #include "trace.h" |
48 | 49 | ||
49 | static struct trace_array *hwlat_trace; | 50 | static struct trace_array *hwlat_trace; |
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c index eadd96ef772f..5f688cc724f0 100644 --- a/kernel/trace/trace_kprobe.c +++ b/kernel/trace/trace_kprobe.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/uaccess.h> | 22 | #include <linux/uaccess.h> |
23 | #include <linux/rculist.h> | ||
23 | 24 | ||
24 | #include "trace_probe.h" | 25 | #include "trace_probe.h" |
25 | 26 | ||
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c index 070866c32eb9..02a4aeb22c47 100644 --- a/kernel/trace/trace_output.c +++ b/kernel/trace/trace_output.c | |||
@@ -8,6 +8,8 @@ | |||
8 | #include <linux/module.h> | 8 | #include <linux/module.h> |
9 | #include <linux/mutex.h> | 9 | #include <linux/mutex.h> |
10 | #include <linux/ftrace.h> | 10 | #include <linux/ftrace.h> |
11 | #include <linux/sched/clock.h> | ||
12 | #include <linux/sched/mm.h> | ||
11 | 13 | ||
12 | #include "trace_output.h" | 14 | #include "trace_output.h" |
13 | 15 | ||
diff --git a/kernel/trace/trace_selftest.c b/kernel/trace/trace_selftest.c index b0f86ea77881..cb917cebae29 100644 --- a/kernel/trace/trace_selftest.c +++ b/kernel/trace/trace_selftest.c | |||
@@ -1,5 +1,6 @@ | |||
1 | /* Include in trace.c */ | 1 | /* Include in trace.c */ |
2 | 2 | ||
3 | #include <uapi/linux/sched/types.h> | ||
3 | #include <linux/stringify.h> | 4 | #include <linux/stringify.h> |
4 | #include <linux/kthread.h> | 5 | #include <linux/kthread.h> |
5 | #include <linux/delay.h> | 6 | #include <linux/delay.h> |
diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c index 2a1abbaca10e..1d68b5b7ad41 100644 --- a/kernel/trace/trace_stack.c +++ b/kernel/trace/trace_stack.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * Copyright (C) 2008 Steven Rostedt <srostedt@redhat.com> | 2 | * Copyright (C) 2008 Steven Rostedt <srostedt@redhat.com> |
3 | * | 3 | * |
4 | */ | 4 | */ |
5 | #include <linux/sched/task_stack.h> | ||
5 | #include <linux/stacktrace.h> | 6 | #include <linux/stacktrace.h> |
6 | #include <linux/kallsyms.h> | 7 | #include <linux/kallsyms.h> |
7 | #include <linux/seq_file.h> | 8 | #include <linux/seq_file.h> |
diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c index f4379e772171..a7581fec9681 100644 --- a/kernel/trace/trace_uprobe.c +++ b/kernel/trace/trace_uprobe.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/uprobes.h> | 24 | #include <linux/uprobes.h> |
25 | #include <linux/namei.h> | 25 | #include <linux/namei.h> |
26 | #include <linux/string.h> | 26 | #include <linux/string.h> |
27 | #include <linux/rculist.h> | ||
27 | 28 | ||
28 | #include "trace_probe.h" | 29 | #include "trace_probe.h" |
29 | 30 | ||
diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c index 1f9a31f934a4..685c50ae6300 100644 --- a/kernel/tracepoint.c +++ b/kernel/tracepoint.c | |||
@@ -24,7 +24,8 @@ | |||
24 | #include <linux/tracepoint.h> | 24 | #include <linux/tracepoint.h> |
25 | #include <linux/err.h> | 25 | #include <linux/err.h> |
26 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
27 | #include <linux/sched.h> | 27 | #include <linux/sched/signal.h> |
28 | #include <linux/sched/task.h> | ||
28 | #include <linux/static_key.h> | 29 | #include <linux/static_key.h> |
29 | 30 | ||
30 | extern struct tracepoint * const __start___tracepoints_ptrs[]; | 31 | extern struct tracepoint * const __start___tracepoints_ptrs[]; |
diff --git a/kernel/tsacct.c b/kernel/tsacct.c index 5c21f0535056..370724b45391 100644 --- a/kernel/tsacct.c +++ b/kernel/tsacct.c | |||
@@ -17,7 +17,9 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/sched.h> | 20 | #include <linux/sched/signal.h> |
21 | #include <linux/sched/mm.h> | ||
22 | #include <linux/sched/cputime.h> | ||
21 | #include <linux/tsacct_kern.h> | 23 | #include <linux/tsacct_kern.h> |
22 | #include <linux/acct.h> | 24 | #include <linux/acct.h> |
23 | #include <linux/jiffies.h> | 25 | #include <linux/jiffies.h> |
diff --git a/kernel/ucount.c b/kernel/ucount.c index 8a11fc0cb459..62630a40ab3a 100644 --- a/kernel/ucount.c +++ b/kernel/ucount.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/stat.h> | 8 | #include <linux/stat.h> |
9 | #include <linux/sysctl.h> | 9 | #include <linux/sysctl.h> |
10 | #include <linux/slab.h> | 10 | #include <linux/slab.h> |
11 | #include <linux/cred.h> | ||
11 | #include <linux/hash.h> | 12 | #include <linux/hash.h> |
12 | #include <linux/user_namespace.h> | 13 | #include <linux/user_namespace.h> |
13 | 14 | ||
diff --git a/kernel/uid16.c b/kernel/uid16.c index 71645ae9303a..5c2dc5b2bf4f 100644 --- a/kernel/uid16.c +++ b/kernel/uid16.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/highuid.h> | 13 | #include <linux/highuid.h> |
14 | #include <linux/security.h> | 14 | #include <linux/security.h> |
15 | #include <linux/cred.h> | ||
15 | #include <linux/syscalls.h> | 16 | #include <linux/syscalls.h> |
16 | 17 | ||
17 | #include <linux/uaccess.h> | 18 | #include <linux/uaccess.h> |
diff --git a/kernel/user.c b/kernel/user.c index b069ccbfb0b0..00281add65b2 100644 --- a/kernel/user.c +++ b/kernel/user.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
14 | #include <linux/bitops.h> | 14 | #include <linux/bitops.h> |
15 | #include <linux/key.h> | 15 | #include <linux/key.h> |
16 | #include <linux/sched/user.h> | ||
16 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
17 | #include <linux/export.h> | 18 | #include <linux/export.h> |
18 | #include <linux/user_namespace.h> | 19 | #include <linux/user_namespace.h> |
diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c index 86b7854fec8e..2f735cbe05e8 100644 --- a/kernel/user_namespace.c +++ b/kernel/user_namespace.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/export.h> | 8 | #include <linux/export.h> |
9 | #include <linux/nsproxy.h> | 9 | #include <linux/nsproxy.h> |
10 | #include <linux/slab.h> | 10 | #include <linux/slab.h> |
11 | #include <linux/sched/signal.h> | ||
11 | #include <linux/user_namespace.h> | 12 | #include <linux/user_namespace.h> |
12 | #include <linux/proc_ns.h> | 13 | #include <linux/proc_ns.h> |
13 | #include <linux/highuid.h> | 14 | #include <linux/highuid.h> |
diff --git a/kernel/utsname.c b/kernel/utsname.c index 6976cd47dcf6..913fe4336d2b 100644 --- a/kernel/utsname.c +++ b/kernel/utsname.c | |||
@@ -14,8 +14,10 @@ | |||
14 | #include <linux/utsname.h> | 14 | #include <linux/utsname.h> |
15 | #include <linux/err.h> | 15 | #include <linux/err.h> |
16 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
17 | #include <linux/cred.h> | ||
17 | #include <linux/user_namespace.h> | 18 | #include <linux/user_namespace.h> |
18 | #include <linux/proc_ns.h> | 19 | #include <linux/proc_ns.h> |
20 | #include <linux/sched/task.h> | ||
19 | 21 | ||
20 | static struct ucounts *inc_uts_namespaces(struct user_namespace *ns) | 22 | static struct ucounts *inc_uts_namespaces(struct user_namespace *ns) |
21 | { | 23 | { |
diff --git a/kernel/utsname_sysctl.c b/kernel/utsname_sysctl.c index c8eac43267e9..233cd8fc6910 100644 --- a/kernel/utsname_sysctl.c +++ b/kernel/utsname_sysctl.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/utsname.h> | 14 | #include <linux/utsname.h> |
15 | #include <linux/sysctl.h> | 15 | #include <linux/sysctl.h> |
16 | #include <linux/wait.h> | 16 | #include <linux/wait.h> |
17 | #include <linux/rwsem.h> | ||
17 | 18 | ||
18 | #ifdef CONFIG_PROC_SYSCTL | 19 | #ifdef CONFIG_PROC_SYSCTL |
19 | 20 | ||
diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 63177be0159e..03e0b69bb5bf 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c | |||
@@ -19,8 +19,11 @@ | |||
19 | #include <linux/sysctl.h> | 19 | #include <linux/sysctl.h> |
20 | #include <linux/smpboot.h> | 20 | #include <linux/smpboot.h> |
21 | #include <linux/sched/rt.h> | 21 | #include <linux/sched/rt.h> |
22 | #include <uapi/linux/sched/types.h> | ||
22 | #include <linux/tick.h> | 23 | #include <linux/tick.h> |
23 | #include <linux/workqueue.h> | 24 | #include <linux/workqueue.h> |
25 | #include <linux/sched/clock.h> | ||
26 | #include <linux/sched/debug.h> | ||
24 | 27 | ||
25 | #include <asm/irq_regs.h> | 28 | #include <asm/irq_regs.h> |
26 | #include <linux/kvm_para.h> | 29 | #include <linux/kvm_para.h> |
diff --git a/kernel/watchdog_hld.c b/kernel/watchdog_hld.c index b5de262a9eb9..54a427d1f344 100644 --- a/kernel/watchdog_hld.c +++ b/kernel/watchdog_hld.c | |||
@@ -13,6 +13,8 @@ | |||
13 | 13 | ||
14 | #include <linux/nmi.h> | 14 | #include <linux/nmi.h> |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/sched/debug.h> | ||
17 | |||
16 | #include <asm/irq_regs.h> | 18 | #include <asm/irq_regs.h> |
17 | #include <linux/perf_event.h> | 19 | #include <linux/perf_event.h> |
18 | 20 | ||
@@ -45,6 +45,7 @@ | |||
45 | #include <linux/kernel.h> | 45 | #include <linux/kernel.h> |
46 | #include <linux/bug.h> | 46 | #include <linux/bug.h> |
47 | #include <linux/sched.h> | 47 | #include <linux/sched.h> |
48 | #include <linux/rculist.h> | ||
48 | 49 | ||
49 | extern const struct bug_entry __start___bug_table[], __stop___bug_table[]; | 50 | extern const struct bug_entry __start___bug_table[], __stop___bug_table[]; |
50 | 51 | ||
diff --git a/lib/debugobjects.c b/lib/debugobjects.c index 8c28cbd7e104..17afb0430161 100644 --- a/lib/debugobjects.c +++ b/lib/debugobjects.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/debugobjects.h> | 13 | #include <linux/debugobjects.h> |
14 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
15 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
16 | #include <linux/sched/task_stack.h> | ||
16 | #include <linux/seq_file.h> | 17 | #include <linux/seq_file.h> |
17 | #include <linux/debugfs.h> | 18 | #include <linux/debugfs.h> |
18 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
diff --git a/lib/dma-debug.c b/lib/dma-debug.c index 60c57ec936db..b157b46cc9a6 100644 --- a/lib/dma-debug.c +++ b/lib/dma-debug.c | |||
@@ -17,8 +17,10 @@ | |||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/sched/task_stack.h> | ||
20 | #include <linux/scatterlist.h> | 21 | #include <linux/scatterlist.h> |
21 | #include <linux/dma-mapping.h> | 22 | #include <linux/dma-mapping.h> |
23 | #include <linux/sched/task.h> | ||
22 | #include <linux/stacktrace.h> | 24 | #include <linux/stacktrace.h> |
23 | #include <linux/dma-debug.h> | 25 | #include <linux/dma-debug.h> |
24 | #include <linux/spinlock.h> | 26 | #include <linux/spinlock.h> |
diff --git a/lib/dump_stack.c b/lib/dump_stack.c index c30d07e99dba..625375e7f11f 100644 --- a/lib/dump_stack.c +++ b/lib/dump_stack.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
7 | #include <linux/export.h> | 7 | #include <linux/export.h> |
8 | #include <linux/sched.h> | 8 | #include <linux/sched.h> |
9 | #include <linux/sched/debug.h> | ||
9 | #include <linux/smp.h> | 10 | #include <linux/smp.h> |
10 | #include <linux/atomic.h> | 11 | #include <linux/atomic.h> |
11 | 12 | ||
diff --git a/lib/is_single_threaded.c b/lib/is_single_threaded.c index 391fd23976a2..9c7d89df40ed 100644 --- a/lib/is_single_threaded.c +++ b/lib/is_single_threaded.c | |||
@@ -9,8 +9,9 @@ | |||
9 | * as published by the Free Software Foundation; either version | 9 | * as published by the Free Software Foundation; either version |
10 | * 2 of the Licence, or (at your option) any later version. | 10 | * 2 of the Licence, or (at your option) any later version. |
11 | */ | 11 | */ |
12 | 12 | #include <linux/sched/signal.h> | |
13 | #include <linux/sched.h> | 13 | #include <linux/sched/task.h> |
14 | #include <linux/sched/mm.h> | ||
14 | 15 | ||
15 | /* | 16 | /* |
16 | * Returns true if the task does not share ->mm with another thread/process. | 17 | * Returns true if the task does not share ->mm with another thread/process. |
diff --git a/lib/nmi_backtrace.c b/lib/nmi_backtrace.c index 5f7999eacad5..4e8a30d1c22f 100644 --- a/lib/nmi_backtrace.c +++ b/lib/nmi_backtrace.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/kprobes.h> | 17 | #include <linux/kprobes.h> |
18 | #include <linux/nmi.h> | 18 | #include <linux/nmi.h> |
19 | #include <linux/cpu.h> | 19 | #include <linux/cpu.h> |
20 | #include <linux/sched/debug.h> | ||
20 | 21 | ||
21 | #ifdef arch_trigger_cpumask_backtrace | 22 | #ifdef arch_trigger_cpumask_backtrace |
22 | /* For reliability, we're prepared to waste bits here. */ | 23 | /* For reliability, we're prepared to waste bits here. */ |
diff --git a/lib/percpu_ida.c b/lib/percpu_ida.c index 6d40944960de..6016f1deb1f5 100644 --- a/lib/percpu_ida.c +++ b/lib/percpu_ida.c | |||
@@ -14,6 +14,7 @@ | |||
14 | * General Public License for more details. | 14 | * General Public License for more details. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/mm.h> | ||
17 | #include <linux/bitmap.h> | 18 | #include <linux/bitmap.h> |
18 | #include <linux/bitops.h> | 19 | #include <linux/bitops.h> |
19 | #include <linux/bug.h> | 20 | #include <linux/bug.h> |
@@ -22,7 +23,7 @@ | |||
22 | #include <linux/init.h> | 23 | #include <linux/init.h> |
23 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
24 | #include <linux/percpu.h> | 25 | #include <linux/percpu.h> |
25 | #include <linux/sched.h> | 26 | #include <linux/sched/signal.h> |
26 | #include <linux/string.h> | 27 | #include <linux/string.h> |
27 | #include <linux/spinlock.h> | 28 | #include <linux/spinlock.h> |
28 | #include <linux/percpu_ida.h> | 29 | #include <linux/percpu_ida.h> |
diff --git a/lib/plist.c b/lib/plist.c index 3a30c53db061..199408f91057 100644 --- a/lib/plist.c +++ b/lib/plist.c | |||
@@ -175,6 +175,7 @@ void plist_requeue(struct plist_node *node, struct plist_head *head) | |||
175 | 175 | ||
176 | #ifdef CONFIG_DEBUG_PI_LIST | 176 | #ifdef CONFIG_DEBUG_PI_LIST |
177 | #include <linux/sched.h> | 177 | #include <linux/sched.h> |
178 | #include <linux/sched/clock.h> | ||
178 | #include <linux/module.h> | 179 | #include <linux/module.h> |
179 | #include <linux/init.h> | 180 | #include <linux/init.h> |
180 | 181 | ||
diff --git a/lib/rhashtable.c b/lib/rhashtable.c index c5b9b9351cec..f8635fd57442 100644 --- a/lib/rhashtable.c +++ b/lib/rhashtable.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/log2.h> | 20 | #include <linux/log2.h> |
21 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
22 | #include <linux/rculist.h> | ||
22 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
23 | #include <linux/vmalloc.h> | 24 | #include <linux/vmalloc.h> |
24 | #include <linux/mm.h> | 25 | #include <linux/mm.h> |
diff --git a/lib/sbitmap.c b/lib/sbitmap.c index 55e11c4b2f3b..60e800e0b5a0 100644 --- a/lib/sbitmap.c +++ b/lib/sbitmap.c | |||
@@ -15,6 +15,7 @@ | |||
15 | * along with this program. If not, see <https://www.gnu.org/licenses/>. | 15 | * along with this program. If not, see <https://www.gnu.org/licenses/>. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/sched.h> | ||
18 | #include <linux/random.h> | 19 | #include <linux/random.h> |
19 | #include <linux/sbitmap.h> | 20 | #include <linux/sbitmap.h> |
20 | #include <linux/seq_file.h> | 21 | #include <linux/seq_file.h> |
diff --git a/lib/smp_processor_id.c b/lib/smp_processor_id.c index 1afec32de6f2..690d75b132fa 100644 --- a/lib/smp_processor_id.c +++ b/lib/smp_processor_id.c | |||
@@ -22,7 +22,7 @@ notrace static unsigned int check_preemption_disabled(const char *what1, | |||
22 | * Kernel threads bound to a single CPU can safely use | 22 | * Kernel threads bound to a single CPU can safely use |
23 | * smp_processor_id(): | 23 | * smp_processor_id(): |
24 | */ | 24 | */ |
25 | if (cpumask_equal(tsk_cpus_allowed(current), cpumask_of(this_cpu))) | 25 | if (cpumask_equal(¤t->cpus_allowed, cpumask_of(this_cpu))) |
26 | goto out; | 26 | goto out; |
27 | 27 | ||
28 | /* | 28 | /* |
diff --git a/lib/syscall.c b/lib/syscall.c index 63239e097b13..17d5ff5fa6a3 100644 --- a/lib/syscall.c +++ b/lib/syscall.c | |||
@@ -1,5 +1,6 @@ | |||
1 | #include <linux/ptrace.h> | 1 | #include <linux/ptrace.h> |
2 | #include <linux/sched.h> | 2 | #include <linux/sched.h> |
3 | #include <linux/sched/task_stack.h> | ||
3 | #include <linux/export.h> | 4 | #include <linux/export.h> |
4 | #include <asm/syscall.h> | 5 | #include <asm/syscall.h> |
5 | 6 | ||
diff --git a/mm/compaction.c b/mm/compaction.c index 0fdfde016ee2..81e1eaa2a2cf 100644 --- a/mm/compaction.c +++ b/mm/compaction.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/migrate.h> | 12 | #include <linux/migrate.h> |
13 | #include <linux/compaction.h> | 13 | #include <linux/compaction.h> |
14 | #include <linux/mm_inline.h> | 14 | #include <linux/mm_inline.h> |
15 | #include <linux/sched/signal.h> | ||
15 | #include <linux/backing-dev.h> | 16 | #include <linux/backing-dev.h> |
16 | #include <linux/sysctl.h> | 17 | #include <linux/sysctl.h> |
17 | #include <linux/sysfs.h> | 18 | #include <linux/sysfs.h> |
diff --git a/mm/filemap.c b/mm/filemap.c index 1944c631e3e6..1694623a6289 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/compiler.h> | 13 | #include <linux/compiler.h> |
14 | #include <linux/dax.h> | 14 | #include <linux/dax.h> |
15 | #include <linux/fs.h> | 15 | #include <linux/fs.h> |
16 | #include <linux/sched/signal.h> | ||
16 | #include <linux/uaccess.h> | 17 | #include <linux/uaccess.h> |
17 | #include <linux/capability.h> | 18 | #include <linux/capability.h> |
18 | #include <linux/kernel_stat.h> | 19 | #include <linux/kernel_stat.h> |
@@ -10,7 +10,7 @@ | |||
10 | #include <linux/swap.h> | 10 | #include <linux/swap.h> |
11 | #include <linux/swapops.h> | 11 | #include <linux/swapops.h> |
12 | 12 | ||
13 | #include <linux/sched.h> | 13 | #include <linux/sched/signal.h> |
14 | #include <linux/rwsem.h> | 14 | #include <linux/rwsem.h> |
15 | #include <linux/hugetlb.h> | 15 | #include <linux/hugetlb.h> |
16 | 16 | ||
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 71e3dede95b4..d36b2af4d1bf 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c | |||
@@ -9,6 +9,8 @@ | |||
9 | 9 | ||
10 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <linux/sched/coredump.h> | ||
13 | #include <linux/sched/numa_balancing.h> | ||
12 | #include <linux/highmem.h> | 14 | #include <linux/highmem.h> |
13 | #include <linux/hugetlb.h> | 15 | #include <linux/hugetlb.h> |
14 | #include <linux/mmu_notifier.h> | 16 | #include <linux/mmu_notifier.h> |
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 2e0e8159ce8e..a7aa811b7d14 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/bootmem.h> | 18 | #include <linux/bootmem.h> |
19 | #include <linux/sysfs.h> | 19 | #include <linux/sysfs.h> |
20 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
21 | #include <linux/sched/signal.h> | ||
21 | #include <linux/rmap.h> | 22 | #include <linux/rmap.h> |
22 | #include <linux/swap.h> | 23 | #include <linux/swap.h> |
23 | #include <linux/swapops.h> | 24 | #include <linux/swapops.h> |
diff --git a/mm/kasan/kasan.c b/mm/kasan/kasan.c index 25f0e6521f36..98b27195e38b 100644 --- a/mm/kasan/kasan.c +++ b/mm/kasan/kasan.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/printk.h> | 30 | #include <linux/printk.h> |
31 | #include <linux/sched.h> | 31 | #include <linux/sched.h> |
32 | #include <linux/sched/task_stack.h> | ||
32 | #include <linux/slab.h> | 33 | #include <linux/slab.h> |
33 | #include <linux/stacktrace.h> | 34 | #include <linux/stacktrace.h> |
34 | #include <linux/string.h> | 35 | #include <linux/string.h> |
@@ -39,6 +40,16 @@ | |||
39 | #include "kasan.h" | 40 | #include "kasan.h" |
40 | #include "../slab.h" | 41 | #include "../slab.h" |
41 | 42 | ||
43 | void kasan_enable_current(void) | ||
44 | { | ||
45 | current->kasan_depth++; | ||
46 | } | ||
47 | |||
48 | void kasan_disable_current(void) | ||
49 | { | ||
50 | current->kasan_depth--; | ||
51 | } | ||
52 | |||
42 | /* | 53 | /* |
43 | * Poisons the shadow memory for 'size' bytes starting from 'addr'. | 54 | * Poisons the shadow memory for 'size' bytes starting from 'addr'. |
44 | * Memory addresses should be aligned to KASAN_SHADOW_SCALE_SIZE. | 55 | * Memory addresses should be aligned to KASAN_SHADOW_SCALE_SIZE. |
diff --git a/mm/khugepaged.c b/mm/khugepaged.c index 34bce5c308e3..ba40b7f673f4 100644 --- a/mm/khugepaged.c +++ b/mm/khugepaged.c | |||
@@ -2,6 +2,8 @@ | |||
2 | 2 | ||
3 | #include <linux/mm.h> | 3 | #include <linux/mm.h> |
4 | #include <linux/sched.h> | 4 | #include <linux/sched.h> |
5 | #include <linux/sched/mm.h> | ||
6 | #include <linux/sched/coredump.h> | ||
5 | #include <linux/mmu_notifier.h> | 7 | #include <linux/mmu_notifier.h> |
6 | #include <linux/rmap.h> | 8 | #include <linux/rmap.h> |
7 | #include <linux/swap.h> | 9 | #include <linux/swap.h> |
diff --git a/mm/kmemleak.c b/mm/kmemleak.c index da3436953022..26c874e90b12 100644 --- a/mm/kmemleak.c +++ b/mm/kmemleak.c | |||
@@ -73,7 +73,9 @@ | |||
73 | #include <linux/init.h> | 73 | #include <linux/init.h> |
74 | #include <linux/kernel.h> | 74 | #include <linux/kernel.h> |
75 | #include <linux/list.h> | 75 | #include <linux/list.h> |
76 | #include <linux/sched.h> | 76 | #include <linux/sched/signal.h> |
77 | #include <linux/sched/task.h> | ||
78 | #include <linux/sched/task_stack.h> | ||
77 | #include <linux/jiffies.h> | 79 | #include <linux/jiffies.h> |
78 | #include <linux/delay.h> | 80 | #include <linux/delay.h> |
79 | #include <linux/export.h> | 81 | #include <linux/export.h> |
@@ -19,6 +19,8 @@ | |||
19 | #include <linux/fs.h> | 19 | #include <linux/fs.h> |
20 | #include <linux/mman.h> | 20 | #include <linux/mman.h> |
21 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
22 | #include <linux/sched/mm.h> | ||
23 | #include <linux/sched/coredump.h> | ||
22 | #include <linux/rwsem.h> | 24 | #include <linux/rwsem.h> |
23 | #include <linux/pagemap.h> | 25 | #include <linux/pagemap.h> |
24 | #include <linux/rmap.h> | 26 | #include <linux/rmap.h> |
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 45867e439d31..c52ec893e241 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/memcontrol.h> | 35 | #include <linux/memcontrol.h> |
36 | #include <linux/cgroup.h> | 36 | #include <linux/cgroup.h> |
37 | #include <linux/mm.h> | 37 | #include <linux/mm.h> |
38 | #include <linux/sched/mm.h> | ||
38 | #include <linux/shmem_fs.h> | 39 | #include <linux/shmem_fs.h> |
39 | #include <linux/hugetlb.h> | 40 | #include <linux/hugetlb.h> |
40 | #include <linux/pagemap.h> | 41 | #include <linux/pagemap.h> |
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 3d0f2fd4bf73..27f7210e7fab 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c | |||
@@ -40,7 +40,8 @@ | |||
40 | #include <linux/mm.h> | 40 | #include <linux/mm.h> |
41 | #include <linux/page-flags.h> | 41 | #include <linux/page-flags.h> |
42 | #include <linux/kernel-page-flags.h> | 42 | #include <linux/kernel-page-flags.h> |
43 | #include <linux/sched.h> | 43 | #include <linux/sched/signal.h> |
44 | #include <linux/sched/task.h> | ||
44 | #include <linux/ksm.h> | 45 | #include <linux/ksm.h> |
45 | #include <linux/rmap.h> | 46 | #include <linux/rmap.h> |
46 | #include <linux/export.h> | 47 | #include <linux/export.h> |
diff --git a/mm/memory.c b/mm/memory.c index 14fc0b40f0bb..a97a4cec2e1f 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -40,6 +40,10 @@ | |||
40 | 40 | ||
41 | #include <linux/kernel_stat.h> | 41 | #include <linux/kernel_stat.h> |
42 | #include <linux/mm.h> | 42 | #include <linux/mm.h> |
43 | #include <linux/sched/mm.h> | ||
44 | #include <linux/sched/coredump.h> | ||
45 | #include <linux/sched/numa_balancing.h> | ||
46 | #include <linux/sched/task.h> | ||
43 | #include <linux/hugetlb.h> | 47 | #include <linux/hugetlb.h> |
44 | #include <linux/mman.h> | 48 | #include <linux/mman.h> |
45 | #include <linux/swap.h> | 49 | #include <linux/swap.h> |
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 1d3ed58f92ab..295479b792ec 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c | |||
@@ -6,6 +6,7 @@ | |||
6 | 6 | ||
7 | #include <linux/stddef.h> | 7 | #include <linux/stddef.h> |
8 | #include <linux/mm.h> | 8 | #include <linux/mm.h> |
9 | #include <linux/sched/signal.h> | ||
9 | #include <linux/swap.h> | 10 | #include <linux/swap.h> |
10 | #include <linux/interrupt.h> | 11 | #include <linux/interrupt.h> |
11 | #include <linux/pagemap.h> | 12 | #include <linux/pagemap.h> |
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 1e7873e40c9a..75b2745bac41 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c | |||
@@ -73,6 +73,9 @@ | |||
73 | #include <linux/hugetlb.h> | 73 | #include <linux/hugetlb.h> |
74 | #include <linux/kernel.h> | 74 | #include <linux/kernel.h> |
75 | #include <linux/sched.h> | 75 | #include <linux/sched.h> |
76 | #include <linux/sched/mm.h> | ||
77 | #include <linux/sched/numa_balancing.h> | ||
78 | #include <linux/sched/task.h> | ||
76 | #include <linux/nodemask.h> | 79 | #include <linux/nodemask.h> |
77 | #include <linux/cpuset.h> | 80 | #include <linux/cpuset.h> |
78 | #include <linux/slab.h> | 81 | #include <linux/slab.h> |
diff --git a/mm/migrate.c b/mm/migrate.c index 2c63ac06791b..9a0897a14d37 100644 --- a/mm/migrate.c +++ b/mm/migrate.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/mmu_notifier.h> | 40 | #include <linux/mmu_notifier.h> |
41 | #include <linux/page_idle.h> | 41 | #include <linux/page_idle.h> |
42 | #include <linux/page_owner.h> | 42 | #include <linux/page_owner.h> |
43 | #include <linux/sched/mm.h> | ||
43 | 44 | ||
44 | #include <asm/tlbflush.h> | 45 | #include <asm/tlbflush.h> |
45 | 46 | ||
diff --git a/mm/mlock.c b/mm/mlock.c index cdbed8aaa426..1050511f8b2b 100644 --- a/mm/mlock.c +++ b/mm/mlock.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/capability.h> | 8 | #include <linux/capability.h> |
9 | #include <linux/mman.h> | 9 | #include <linux/mman.h> |
10 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
11 | #include <linux/sched/user.h> | ||
11 | #include <linux/swap.h> | 12 | #include <linux/swap.h> |
12 | #include <linux/swapops.h> | 13 | #include <linux/swapops.h> |
13 | #include <linux/pagemap.h> | 14 | #include <linux/pagemap.h> |
diff --git a/mm/mmu_context.c b/mm/mmu_context.c index daf67bb02b4a..3e612ae748e9 100644 --- a/mm/mmu_context.c +++ b/mm/mmu_context.c | |||
@@ -5,6 +5,8 @@ | |||
5 | 5 | ||
6 | #include <linux/mm.h> | 6 | #include <linux/mm.h> |
7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
8 | #include <linux/sched/mm.h> | ||
9 | #include <linux/sched/task.h> | ||
8 | #include <linux/mmu_context.h> | 10 | #include <linux/mmu_context.h> |
9 | #include <linux/export.h> | 11 | #include <linux/export.h> |
10 | 12 | ||
diff --git a/mm/mmu_notifier.c b/mm/mmu_notifier.c index 32bc9f2ff7eb..a7652acd2ab9 100644 --- a/mm/mmu_notifier.c +++ b/mm/mmu_notifier.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/srcu.h> | 17 | #include <linux/srcu.h> |
18 | #include <linux/rcupdate.h> | 18 | #include <linux/rcupdate.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/sched/mm.h> | ||
20 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
21 | 22 | ||
22 | /* global SRCU for all MMs */ | 23 | /* global SRCU for all MMs */ |
diff --git a/mm/nommu.c b/mm/nommu.c index 5bbef9cb89eb..2d131b97a851 100644 --- a/mm/nommu.c +++ b/mm/nommu.c | |||
@@ -17,6 +17,7 @@ | |||
17 | 17 | ||
18 | #include <linux/export.h> | 18 | #include <linux/export.h> |
19 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
20 | #include <linux/sched/mm.h> | ||
20 | #include <linux/vmacache.h> | 21 | #include <linux/vmacache.h> |
21 | #include <linux/mman.h> | 22 | #include <linux/mman.h> |
22 | #include <linux/swap.h> | 23 | #include <linux/swap.h> |
@@ -757,7 +758,7 @@ static void delete_vma_from_mm(struct vm_area_struct *vma) | |||
757 | mm->map_count--; | 758 | mm->map_count--; |
758 | for (i = 0; i < VMACACHE_SIZE; i++) { | 759 | for (i = 0; i < VMACACHE_SIZE; i++) { |
759 | /* if the vma is cached, invalidate the entire cache */ | 760 | /* if the vma is cached, invalidate the entire cache */ |
760 | if (curr->vmacache[i] == vma) { | 761 | if (curr->vmacache.vmas[i] == vma) { |
761 | vmacache_invalidate(mm); | 762 | vmacache_invalidate(mm); |
762 | break; | 763 | break; |
763 | } | 764 | } |
diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 51c091849dcb..d083714a2bb9 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c | |||
@@ -22,6 +22,9 @@ | |||
22 | #include <linux/err.h> | 22 | #include <linux/err.h> |
23 | #include <linux/gfp.h> | 23 | #include <linux/gfp.h> |
24 | #include <linux/sched.h> | 24 | #include <linux/sched.h> |
25 | #include <linux/sched/mm.h> | ||
26 | #include <linux/sched/coredump.h> | ||
27 | #include <linux/sched/task.h> | ||
25 | #include <linux/swap.h> | 28 | #include <linux/swap.h> |
26 | #include <linux/timex.h> | 29 | #include <linux/timex.h> |
27 | #include <linux/jiffies.h> | 30 | #include <linux/jiffies.h> |
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 26a60818a8fc..d8ac2a7fb9e7 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/pagevec.h> | 36 | #include <linux/pagevec.h> |
37 | #include <linux/timer.h> | 37 | #include <linux/timer.h> |
38 | #include <linux/sched/rt.h> | 38 | #include <linux/sched/rt.h> |
39 | #include <linux/sched/signal.h> | ||
39 | #include <linux/mm_inline.h> | 40 | #include <linux/mm_inline.h> |
40 | #include <trace/events/writeback.h> | 41 | #include <trace/events/writeback.h> |
41 | 42 | ||
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index a7a6aac95a6d..eaa64d2ffdc5 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -61,6 +61,7 @@ | |||
61 | #include <linux/migrate.h> | 61 | #include <linux/migrate.h> |
62 | #include <linux/hugetlb.h> | 62 | #include <linux/hugetlb.h> |
63 | #include <linux/sched/rt.h> | 63 | #include <linux/sched/rt.h> |
64 | #include <linux/sched/mm.h> | ||
64 | #include <linux/page_owner.h> | 65 | #include <linux/page_owner.h> |
65 | #include <linux/kthread.h> | 66 | #include <linux/kthread.h> |
66 | #include <linux/memcontrol.h> | 67 | #include <linux/memcontrol.h> |
diff --git a/mm/process_vm_access.c b/mm/process_vm_access.c index 84d0c7eada2b..8973cd231ece 100644 --- a/mm/process_vm_access.c +++ b/mm/process_vm_access.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
13 | #include <linux/uio.h> | 13 | #include <linux/uio.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
15 | #include <linux/sched/mm.h> | ||
15 | #include <linux/highmem.h> | 16 | #include <linux/highmem.h> |
16 | #include <linux/ptrace.h> | 17 | #include <linux/ptrace.h> |
17 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
@@ -46,6 +46,8 @@ | |||
46 | */ | 46 | */ |
47 | 47 | ||
48 | #include <linux/mm.h> | 48 | #include <linux/mm.h> |
49 | #include <linux/sched/mm.h> | ||
50 | #include <linux/sched/task.h> | ||
49 | #include <linux/pagemap.h> | 51 | #include <linux/pagemap.h> |
50 | #include <linux/swap.h> | 52 | #include <linux/swap.h> |
51 | #include <linux/swapops.h> | 53 | #include <linux/swapops.h> |
diff --git a/mm/shmem.c b/mm/shmem.c index a26649a6633f..de8cdef4ef9b 100644 --- a/mm/shmem.c +++ b/mm/shmem.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/pagemap.h> | 29 | #include <linux/pagemap.h> |
30 | #include <linux/file.h> | 30 | #include <linux/file.h> |
31 | #include <linux/mm.h> | 31 | #include <linux/mm.h> |
32 | #include <linux/sched/signal.h> | ||
32 | #include <linux/export.h> | 33 | #include <linux/export.h> |
33 | #include <linux/swap.h> | 34 | #include <linux/swap.h> |
34 | #include <linux/uio.h> | 35 | #include <linux/uio.h> |
@@ -116,6 +116,7 @@ | |||
116 | #include <linux/kmemcheck.h> | 116 | #include <linux/kmemcheck.h> |
117 | #include <linux/memory.h> | 117 | #include <linux/memory.h> |
118 | #include <linux/prefetch.h> | 118 | #include <linux/prefetch.h> |
119 | #include <linux/sched/task_stack.h> | ||
119 | 120 | ||
120 | #include <net/sock.h> | 121 | #include <net/sock.h> |
121 | 122 | ||
diff --git a/mm/swapfile.c b/mm/swapfile.c index fadc6a1c0da0..521ef9b6064f 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c | |||
@@ -6,6 +6,8 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/mm.h> | 8 | #include <linux/mm.h> |
9 | #include <linux/sched/mm.h> | ||
10 | #include <linux/sched/task.h> | ||
9 | #include <linux/hugetlb.h> | 11 | #include <linux/hugetlb.h> |
10 | #include <linux/mman.h> | 12 | #include <linux/mman.h> |
11 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
diff --git a/mm/usercopy.c b/mm/usercopy.c index 8345299e3e3b..d155e12563b1 100644 --- a/mm/usercopy.c +++ b/mm/usercopy.c | |||
@@ -16,6 +16,9 @@ | |||
16 | 16 | ||
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
19 | #include <linux/sched.h> | ||
20 | #include <linux/sched/task.h> | ||
21 | #include <linux/sched/task_stack.h> | ||
19 | #include <asm/sections.h> | 22 | #include <asm/sections.h> |
20 | 23 | ||
21 | enum { | 24 | enum { |
diff --git a/mm/userfaultfd.c b/mm/userfaultfd.c index 9f0ad2a4f102..479e631d43c2 100644 --- a/mm/userfaultfd.c +++ b/mm/userfaultfd.c | |||
@@ -8,6 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
11 | #include <linux/sched/signal.h> | ||
11 | #include <linux/pagemap.h> | 12 | #include <linux/pagemap.h> |
12 | #include <linux/rmap.h> | 13 | #include <linux/rmap.h> |
13 | #include <linux/swap.h> | 14 | #include <linux/swap.h> |
@@ -5,6 +5,8 @@ | |||
5 | #include <linux/export.h> | 5 | #include <linux/export.h> |
6 | #include <linux/err.h> | 6 | #include <linux/err.h> |
7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
8 | #include <linux/sched/mm.h> | ||
9 | #include <linux/sched/task_stack.h> | ||
8 | #include <linux/security.h> | 10 | #include <linux/security.h> |
9 | #include <linux/swap.h> | 11 | #include <linux/swap.h> |
10 | #include <linux/swapops.h> | 12 | #include <linux/swapops.h> |
diff --git a/mm/vmacache.c b/mm/vmacache.c index 035fdeb35b43..7ffa0ee341b5 100644 --- a/mm/vmacache.c +++ b/mm/vmacache.c | |||
@@ -1,7 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2014 Davidlohr Bueso. | 2 | * Copyright (C) 2014 Davidlohr Bueso. |
3 | */ | 3 | */ |
4 | #include <linux/sched.h> | 4 | #include <linux/sched/signal.h> |
5 | #include <linux/sched/task.h> | ||
5 | #include <linux/mm.h> | 6 | #include <linux/mm.h> |
6 | #include <linux/vmacache.h> | 7 | #include <linux/vmacache.h> |
7 | 8 | ||
@@ -60,7 +61,7 @@ static inline bool vmacache_valid_mm(struct mm_struct *mm) | |||
60 | void vmacache_update(unsigned long addr, struct vm_area_struct *newvma) | 61 | void vmacache_update(unsigned long addr, struct vm_area_struct *newvma) |
61 | { | 62 | { |
62 | if (vmacache_valid_mm(newvma->vm_mm)) | 63 | if (vmacache_valid_mm(newvma->vm_mm)) |
63 | current->vmacache[VMACACHE_HASH(addr)] = newvma; | 64 | current->vmacache.vmas[VMACACHE_HASH(addr)] = newvma; |
64 | } | 65 | } |
65 | 66 | ||
66 | static bool vmacache_valid(struct mm_struct *mm) | 67 | static bool vmacache_valid(struct mm_struct *mm) |
@@ -71,12 +72,12 @@ static bool vmacache_valid(struct mm_struct *mm) | |||
71 | return false; | 72 | return false; |
72 | 73 | ||
73 | curr = current; | 74 | curr = current; |
74 | if (mm->vmacache_seqnum != curr->vmacache_seqnum) { | 75 | if (mm->vmacache_seqnum != curr->vmacache.seqnum) { |
75 | /* | 76 | /* |
76 | * First attempt will always be invalid, initialize | 77 | * First attempt will always be invalid, initialize |
77 | * the new cache for this task here. | 78 | * the new cache for this task here. |
78 | */ | 79 | */ |
79 | curr->vmacache_seqnum = mm->vmacache_seqnum; | 80 | curr->vmacache.seqnum = mm->vmacache_seqnum; |
80 | vmacache_flush(curr); | 81 | vmacache_flush(curr); |
81 | return false; | 82 | return false; |
82 | } | 83 | } |
@@ -93,7 +94,7 @@ struct vm_area_struct *vmacache_find(struct mm_struct *mm, unsigned long addr) | |||
93 | return NULL; | 94 | return NULL; |
94 | 95 | ||
95 | for (i = 0; i < VMACACHE_SIZE; i++) { | 96 | for (i = 0; i < VMACACHE_SIZE; i++) { |
96 | struct vm_area_struct *vma = current->vmacache[i]; | 97 | struct vm_area_struct *vma = current->vmacache.vmas[i]; |
97 | 98 | ||
98 | if (!vma) | 99 | if (!vma) |
99 | continue; | 100 | continue; |
@@ -121,7 +122,7 @@ struct vm_area_struct *vmacache_find_exact(struct mm_struct *mm, | |||
121 | return NULL; | 122 | return NULL; |
122 | 123 | ||
123 | for (i = 0; i < VMACACHE_SIZE; i++) { | 124 | for (i = 0; i < VMACACHE_SIZE; i++) { |
124 | struct vm_area_struct *vma = current->vmacache[i]; | 125 | struct vm_area_struct *vma = current->vmacache.vmas[i]; |
125 | 126 | ||
126 | if (vma && vma->vm_start == start && vma->vm_end == end) { | 127 | if (vma && vma->vm_start == start && vma->vm_end == end) { |
127 | count_vm_vmacache_event(VMACACHE_FIND_HITS); | 128 | count_vm_vmacache_event(VMACACHE_FIND_HITS); |
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index be93949b4885..b4024d688f38 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/highmem.h> | 14 | #include <linux/highmem.h> |
15 | #include <linux/sched.h> | 15 | #include <linux/sched/signal.h> |
16 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
17 | #include <linux/spinlock.h> | 17 | #include <linux/spinlock.h> |
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
diff --git a/mm/vmscan.c b/mm/vmscan.c index 70aa739c6b68..bc8031ef994d 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | 14 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
15 | 15 | ||
16 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
17 | #include <linux/sched/mm.h> | ||
17 | #include <linux/module.h> | 18 | #include <linux/module.h> |
18 | #include <linux/gfp.h> | 19 | #include <linux/gfp.h> |
19 | #include <linux/kernel_stat.h> | 20 | #include <linux/kernel_stat.h> |
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index b7b1fb6c8c21..b7ee9c34dbd6 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/module.h> | 33 | #include <linux/module.h> |
34 | #include <linux/kernel.h> | 34 | #include <linux/kernel.h> |
35 | #include <linux/sched.h> | 35 | #include <linux/sched.h> |
36 | #include <linux/magic.h> | ||
36 | #include <linux/bitops.h> | 37 | #include <linux/bitops.h> |
37 | #include <linux/errno.h> | 38 | #include <linux/errno.h> |
38 | #include <linux/highmem.h> | 39 | #include <linux/highmem.h> |
diff --git a/net/9p/client.c b/net/9p/client.c index 3fc94a49ccd5..25cfd8a4bc36 100644 --- a/net/9p/client.c +++ b/net/9p/client.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #include <linux/idr.h> | 32 | #include <linux/idr.h> |
33 | #include <linux/mutex.h> | 33 | #include <linux/mutex.h> |
34 | #include <linux/slab.h> | 34 | #include <linux/slab.h> |
35 | #include <linux/sched.h> | 35 | #include <linux/sched/signal.h> |
36 | #include <linux/uaccess.h> | 36 | #include <linux/uaccess.h> |
37 | #include <linux/uio.h> | 37 | #include <linux/uio.h> |
38 | #include <net/9p/9p.h> | 38 | #include <net/9p/9p.h> |
diff --git a/net/atm/common.c b/net/atm/common.c index a3ca922d307b..9613381f5db0 100644 --- a/net/atm/common.c +++ b/net/atm/common.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <linux/errno.h> /* error codes */ | 13 | #include <linux/errno.h> /* error codes */ |
14 | #include <linux/capability.h> | 14 | #include <linux/capability.h> |
15 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched/signal.h> |
17 | #include <linux/time.h> /* struct timeval */ | 17 | #include <linux/time.h> /* struct timeval */ |
18 | #include <linux/skbuff.h> | 18 | #include <linux/skbuff.h> |
19 | #include <linux/bitops.h> | 19 | #include <linux/bitops.h> |
diff --git a/net/atm/svc.c b/net/atm/svc.c index 878563a8354d..db9794ec61d8 100644 --- a/net/atm/svc.c +++ b/net/atm/svc.c | |||
@@ -10,7 +10,7 @@ | |||
10 | #include <linux/kernel.h> /* printk */ | 10 | #include <linux/kernel.h> /* printk */ |
11 | #include <linux/skbuff.h> | 11 | #include <linux/skbuff.h> |
12 | #include <linux/wait.h> | 12 | #include <linux/wait.h> |
13 | #include <linux/sched.h> /* jiffies and HZ */ | 13 | #include <linux/sched/signal.h> |
14 | #include <linux/fcntl.h> /* O_NONBLOCK */ | 14 | #include <linux/fcntl.h> /* O_NONBLOCK */ |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/atm.h> /* ATM stuff */ | 16 | #include <linux/atm.h> /* ATM stuff */ |
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index 90fcf5fc2e0a..a8e42cedf1db 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/socket.h> | 20 | #include <linux/socket.h> |
21 | #include <linux/in.h> | 21 | #include <linux/in.h> |
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/sched.h> | 23 | #include <linux/sched/signal.h> |
24 | #include <linux/timer.h> | 24 | #include <linux/timer.h> |
25 | #include <linux/string.h> | 25 | #include <linux/string.h> |
26 | #include <linux/sockios.h> | 26 | #include <linux/sockios.h> |
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c index cfb2faba46de..69e1f7d362a8 100644 --- a/net/bluetooth/af_bluetooth.c +++ b/net/bluetooth/af_bluetooth.c | |||
@@ -27,6 +27,8 @@ | |||
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/debugfs.h> | 28 | #include <linux/debugfs.h> |
29 | #include <linux/stringify.h> | 29 | #include <linux/stringify.h> |
30 | #include <linux/sched/signal.h> | ||
31 | |||
30 | #include <asm/ioctls.h> | 32 | #include <asm/ioctls.h> |
31 | 33 | ||
32 | #include <net/bluetooth/bluetooth.h> | 34 | #include <net/bluetooth/bluetooth.h> |
diff --git a/net/bluetooth/cmtp/capi.c b/net/bluetooth/cmtp/capi.c index 46ac686c8911..bb308224099c 100644 --- a/net/bluetooth/cmtp/capi.c +++ b/net/bluetooth/cmtp/capi.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <linux/types.h> | 26 | #include <linux/types.h> |
27 | #include <linux/errno.h> | 27 | #include <linux/errno.h> |
28 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
29 | #include <linux/sched.h> | 29 | #include <linux/sched/signal.h> |
30 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
31 | #include <linux/poll.h> | 31 | #include <linux/poll.h> |
32 | #include <linux/fcntl.h> | 32 | #include <linux/fcntl.h> |
diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c index 1015d9c8d97d..b5faff458d8b 100644 --- a/net/bluetooth/hci_request.c +++ b/net/bluetooth/hci_request.c | |||
@@ -21,6 +21,8 @@ | |||
21 | SOFTWARE IS DISCLAIMED. | 21 | SOFTWARE IS DISCLAIMED. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/sched/signal.h> | ||
25 | |||
24 | #include <net/bluetooth/bluetooth.h> | 26 | #include <net/bluetooth/bluetooth.h> |
25 | #include <net/bluetooth/hci_core.h> | 27 | #include <net/bluetooth/hci_core.h> |
26 | #include <net/bluetooth/mgmt.h> | 28 | #include <net/bluetooth/mgmt.h> |
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c index a8ba752732c9..f307b145ea54 100644 --- a/net/bluetooth/l2cap_sock.c +++ b/net/bluetooth/l2cap_sock.c | |||
@@ -29,6 +29,7 @@ | |||
29 | 29 | ||
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/export.h> | 31 | #include <linux/export.h> |
32 | #include <linux/sched/signal.h> | ||
32 | 33 | ||
33 | #include <net/bluetooth/bluetooth.h> | 34 | #include <net/bluetooth/bluetooth.h> |
34 | #include <net/bluetooth/hci_core.h> | 35 | #include <net/bluetooth/hci_core.h> |
diff --git a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c index 7511df72347f..aa1a814ceddc 100644 --- a/net/bluetooth/rfcomm/sock.c +++ b/net/bluetooth/rfcomm/sock.c | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | #include <linux/export.h> | 28 | #include <linux/export.h> |
29 | #include <linux/debugfs.h> | 29 | #include <linux/debugfs.h> |
30 | #include <linux/sched/signal.h> | ||
30 | 31 | ||
31 | #include <net/bluetooth/bluetooth.h> | 32 | #include <net/bluetooth/bluetooth.h> |
32 | #include <net/bluetooth/hci_core.h> | 33 | #include <net/bluetooth/hci_core.h> |
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c index 3125ce670c2f..e4e9a2da1e7e 100644 --- a/net/bluetooth/sco.c +++ b/net/bluetooth/sco.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/debugfs.h> | 28 | #include <linux/debugfs.h> |
29 | #include <linux/seq_file.h> | 29 | #include <linux/seq_file.h> |
30 | #include <linux/sched/signal.h> | ||
30 | 31 | ||
31 | #include <net/bluetooth/bluetooth.h> | 32 | #include <net/bluetooth/bluetooth.h> |
32 | #include <net/bluetooth/hci_core.h> | 33 | #include <net/bluetooth/hci_core.h> |
diff --git a/net/bridge/br_sysfs_br.c b/net/bridge/br_sysfs_br.c index 0f4034934d56..0b5dd607444c 100644 --- a/net/bridge/br_sysfs_br.c +++ b/net/bridge/br_sysfs_br.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/rtnetlink.h> | 19 | #include <linux/rtnetlink.h> |
20 | #include <linux/spinlock.h> | 20 | #include <linux/spinlock.h> |
21 | #include <linux/times.h> | 21 | #include <linux/times.h> |
22 | #include <linux/sched/signal.h> | ||
22 | 23 | ||
23 | #include "br_private.h" | 24 | #include "br_private.h" |
24 | 25 | ||
diff --git a/net/bridge/br_sysfs_if.c b/net/bridge/br_sysfs_if.c index 05e8946ccc03..79aee759aba5 100644 --- a/net/bridge/br_sysfs_if.c +++ b/net/bridge/br_sysfs_if.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/if_bridge.h> | 17 | #include <linux/if_bridge.h> |
18 | #include <linux/rtnetlink.h> | 18 | #include <linux/rtnetlink.h> |
19 | #include <linux/spinlock.h> | 19 | #include <linux/spinlock.h> |
20 | #include <linux/sched/signal.h> | ||
20 | 21 | ||
21 | #include "br_private.h" | 22 | #include "br_private.h" |
22 | 23 | ||
diff --git a/net/caif/caif_socket.c b/net/caif/caif_socket.c index 92cbbd2afddb..adcad344c843 100644 --- a/net/caif/caif_socket.c +++ b/net/caif/caif_socket.c | |||
@@ -9,7 +9,7 @@ | |||
9 | #include <linux/fs.h> | 9 | #include <linux/fs.h> |
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/sched.h> | 12 | #include <linux/sched/signal.h> |
13 | #include <linux/spinlock.h> | 13 | #include <linux/spinlock.h> |
14 | #include <linux/mutex.h> | 14 | #include <linux/mutex.h> |
15 | #include <linux/list.h> | 15 | #include <linux/list.h> |
diff --git a/net/ceph/crypto.c b/net/ceph/crypto.c index 85747b7f91a9..46008d5ac504 100644 --- a/net/ceph/crypto.c +++ b/net/ceph/crypto.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <crypto/aes.h> | 8 | #include <crypto/aes.h> |
9 | #include <crypto/skcipher.h> | 9 | #include <crypto/skcipher.h> |
10 | #include <linux/key-type.h> | 10 | #include <linux/key-type.h> |
11 | #include <linux/sched/mm.h> | ||
11 | 12 | ||
12 | #include <keys/ceph-type.h> | 13 | #include <keys/ceph-type.h> |
13 | #include <keys/user-type.h> | 14 | #include <keys/user-type.h> |
diff --git a/net/core/ethtool.c b/net/core/ethtool.c index be7bab1adcde..aecb2c7241b6 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include <linux/vmalloc.h> | 24 | #include <linux/vmalloc.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/rtnetlink.h> | 26 | #include <linux/rtnetlink.h> |
27 | #include <linux/sched.h> | 27 | #include <linux/sched/signal.h> |
28 | #include <linux/net.h> | 28 | #include <linux/net.h> |
29 | 29 | ||
30 | /* | 30 | /* |
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index b0c04cf4851d..3945821e9c1f 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <net/switchdev.h> | 15 | #include <net/switchdev.h> |
16 | #include <linux/if_arp.h> | 16 | #include <linux/if_arp.h> |
17 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
18 | #include <linux/sched/signal.h> | ||
18 | #include <linux/nsproxy.h> | 19 | #include <linux/nsproxy.h> |
19 | #include <net/sock.h> | 20 | #include <net/sock.h> |
20 | #include <net/net_namespace.h> | 21 | #include <net/net_namespace.h> |
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index 3c4bbec39713..652468ff65b7 100644 --- a/net/core/net_namespace.c +++ b/net/core/net_namespace.c | |||
@@ -16,6 +16,8 @@ | |||
16 | #include <linux/export.h> | 16 | #include <linux/export.h> |
17 | #include <linux/user_namespace.h> | 17 | #include <linux/user_namespace.h> |
18 | #include <linux/net_namespace.h> | 18 | #include <linux/net_namespace.h> |
19 | #include <linux/sched/task.h> | ||
20 | |||
19 | #include <net/sock.h> | 21 | #include <net/sock.h> |
20 | #include <net/netlink.h> | 22 | #include <net/netlink.h> |
21 | #include <net/net_namespace.h> | 23 | #include <net/net_namespace.h> |
diff --git a/net/core/netclassid_cgroup.c b/net/core/netclassid_cgroup.c index 11fce17274f6..6ae56037bb13 100644 --- a/net/core/netclassid_cgroup.c +++ b/net/core/netclassid_cgroup.c | |||
@@ -12,6 +12,8 @@ | |||
12 | #include <linux/slab.h> | 12 | #include <linux/slab.h> |
13 | #include <linux/cgroup.h> | 13 | #include <linux/cgroup.h> |
14 | #include <linux/fdtable.h> | 14 | #include <linux/fdtable.h> |
15 | #include <linux/sched/task.h> | ||
16 | |||
15 | #include <net/cls_cgroup.h> | 17 | #include <net/cls_cgroup.h> |
16 | #include <net/sock.h> | 18 | #include <net/sock.h> |
17 | 19 | ||
diff --git a/net/core/netprio_cgroup.c b/net/core/netprio_cgroup.c index 756637dc7a57..0f9275ee5595 100644 --- a/net/core/netprio_cgroup.c +++ b/net/core/netprio_cgroup.c | |||
@@ -20,6 +20,8 @@ | |||
20 | #include <linux/cgroup.h> | 20 | #include <linux/cgroup.h> |
21 | #include <linux/rcupdate.h> | 21 | #include <linux/rcupdate.h> |
22 | #include <linux/atomic.h> | 22 | #include <linux/atomic.h> |
23 | #include <linux/sched/task.h> | ||
24 | |||
23 | #include <net/rtnetlink.h> | 25 | #include <net/rtnetlink.h> |
24 | #include <net/pkt_cls.h> | 26 | #include <net/pkt_cls.h> |
25 | #include <net/sock.h> | 27 | #include <net/sock.h> |
diff --git a/net/core/scm.c b/net/core/scm.c index b6d83686e149..b1ff8a441748 100644 --- a/net/core/scm.c +++ b/net/core/scm.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/capability.h> | 14 | #include <linux/capability.h> |
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/sched/user.h> | ||
17 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
18 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
19 | #include <linux/stat.h> | 20 | #include <linux/stat.h> |
diff --git a/net/core/stream.c b/net/core/stream.c index f575bcf64af2..20231dbb1da0 100644 --- a/net/core/stream.c +++ b/net/core/stream.c | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/sched/signal.h> | ||
16 | #include <linux/net.h> | 17 | #include <linux/net.h> |
17 | #include <linux/signal.h> | 18 | #include <linux/signal.h> |
18 | #include <linux/tcp.h> | 19 | #include <linux/tcp.h> |
diff --git a/net/dccp/output.c b/net/dccp/output.c index b66c84db0766..91a15b3c4915 100644 --- a/net/dccp/output.c +++ b/net/dccp/output.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/skbuff.h> | 15 | #include <linux/skbuff.h> |
16 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
17 | #include <linux/sched/signal.h> | ||
17 | 18 | ||
18 | #include <net/inet_sock.h> | 19 | #include <net/inet_sock.h> |
19 | #include <net/sock.h> | 20 | #include <net/sock.h> |
diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c index a90ed67027b0..e6e79eda9763 100644 --- a/net/decnet/af_decnet.c +++ b/net/decnet/af_decnet.c | |||
@@ -106,7 +106,7 @@ Version 0.0.6 2.1.110 07-aug-98 Eduardo Marcelo Serrat | |||
106 | #include <linux/socket.h> | 106 | #include <linux/socket.h> |
107 | #include <linux/in.h> | 107 | #include <linux/in.h> |
108 | #include <linux/kernel.h> | 108 | #include <linux/kernel.h> |
109 | #include <linux/sched.h> | 109 | #include <linux/sched/signal.h> |
110 | #include <linux/timer.h> | 110 | #include <linux/timer.h> |
111 | #include <linux/string.h> | 111 | #include <linux/string.h> |
112 | #include <linux/sockios.h> | 112 | #include <linux/sockios.h> |
diff --git a/net/dns_resolver/dns_query.c b/net/dns_resolver/dns_query.c index d502c94b1a82..af781010753b 100644 --- a/net/dns_resolver/dns_query.c +++ b/net/dns_resolver/dns_query.c | |||
@@ -37,8 +37,10 @@ | |||
37 | 37 | ||
38 | #include <linux/module.h> | 38 | #include <linux/module.h> |
39 | #include <linux/slab.h> | 39 | #include <linux/slab.h> |
40 | #include <linux/cred.h> | ||
40 | #include <linux/dns_resolver.h> | 41 | #include <linux/dns_resolver.h> |
41 | #include <linux/err.h> | 42 | #include <linux/err.h> |
43 | |||
42 | #include <keys/dns_resolver-type.h> | 44 | #include <keys/dns_resolver-type.h> |
43 | #include <keys/user-type.h> | 45 | #include <keys/user-type.h> |
44 | 46 | ||
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 5d367b7ff542..cebedd545e5e 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/module.h> | 32 | #include <linux/module.h> |
33 | #include <linux/types.h> | 33 | #include <linux/types.h> |
34 | #include <linux/kernel.h> | 34 | #include <linux/kernel.h> |
35 | #include <linux/sched/signal.h> | ||
35 | #include <linux/string.h> | 36 | #include <linux/string.h> |
36 | #include <linux/mm.h> | 37 | #include <linux/mm.h> |
37 | #include <linux/socket.h> | 38 | #include <linux/socket.h> |
diff --git a/net/ipv4/tcp_cdg.c b/net/ipv4/tcp_cdg.c index 35b280361cb2..50a0f3e51d5b 100644 --- a/net/ipv4/tcp_cdg.c +++ b/net/ipv4/tcp_cdg.c | |||
@@ -27,6 +27,8 @@ | |||
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/random.h> | 28 | #include <linux/random.h> |
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/sched/clock.h> | ||
31 | |||
30 | #include <net/tcp.h> | 32 | #include <net/tcp.h> |
31 | 33 | ||
32 | #define HYSTART_ACK_TRAIN 1 | 34 | #define HYSTART_ACK_TRAIN 1 |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 3a2025f5bf2c..77362b88a661 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <linux/errno.h> | 43 | #include <linux/errno.h> |
44 | #include <linux/types.h> | 44 | #include <linux/types.h> |
45 | #include <linux/kernel.h> | 45 | #include <linux/kernel.h> |
46 | #include <linux/sched/signal.h> | ||
46 | #include <linux/socket.h> | 47 | #include <linux/socket.h> |
47 | #include <linux/sockios.h> | 48 | #include <linux/sockios.h> |
48 | #include <linux/net.h> | 49 | #include <linux/net.h> |
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c index ab254041dab7..81adc29a448d 100644 --- a/net/irda/af_irda.c +++ b/net/irda/af_irda.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <linux/socket.h> | 46 | #include <linux/socket.h> |
47 | #include <linux/sockios.h> | 47 | #include <linux/sockios.h> |
48 | #include <linux/slab.h> | 48 | #include <linux/slab.h> |
49 | #include <linux/sched/signal.h> | ||
49 | #include <linux/init.h> | 50 | #include <linux/init.h> |
50 | #include <linux/net.h> | 51 | #include <linux/net.h> |
51 | #include <linux/irda.h> | 52 | #include <linux/irda.h> |
diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c index 817b1b186aff..f6061c4bb0a8 100644 --- a/net/irda/ircomm/ircomm_tty.c +++ b/net/irda/ircomm/ircomm_tty.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #include <linux/module.h> | 32 | #include <linux/module.h> |
33 | #include <linux/fs.h> | 33 | #include <linux/fs.h> |
34 | #include <linux/slab.h> | 34 | #include <linux/slab.h> |
35 | #include <linux/sched.h> | 35 | #include <linux/sched/signal.h> |
36 | #include <linux/seq_file.h> | 36 | #include <linux/seq_file.h> |
37 | #include <linux/termios.h> | 37 | #include <linux/termios.h> |
38 | #include <linux/tty.h> | 38 | #include <linux/tty.h> |
diff --git a/net/irda/irnet/irnet_ppp.c b/net/irda/irnet/irnet_ppp.c index 35dbf3dc3d28..7025dcb853d0 100644 --- a/net/irda/irnet/irnet_ppp.c +++ b/net/irda/irnet/irnet_ppp.c | |||
@@ -13,8 +13,9 @@ | |||
13 | * 2) as a control channel (write commands, read events) | 13 | * 2) as a control channel (write commands, read events) |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/sched.h> | 16 | #include <linux/sched/signal.h> |
17 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
18 | |||
18 | #include "irnet_ppp.h" /* Private header */ | 19 | #include "irnet_ppp.h" /* Private header */ |
19 | /* Please put other headers in irnet.h - Thanks */ | 20 | /* Please put other headers in irnet.h - Thanks */ |
20 | 21 | ||
diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c index 13190b38f22e..89bbde1081ce 100644 --- a/net/iucv/af_iucv.c +++ b/net/iucv/af_iucv.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/list.h> | 17 | #include <linux/list.h> |
18 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/sched.h> | 20 | #include <linux/sched/signal.h> |
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | #include <linux/skbuff.h> | 22 | #include <linux/skbuff.h> |
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
diff --git a/net/kcm/kcmsock.c b/net/kcm/kcmsock.c index a646f3481240..309062f3debe 100644 --- a/net/kcm/kcmsock.c +++ b/net/kcm/kcmsock.c | |||
@@ -24,6 +24,8 @@ | |||
24 | #include <linux/uaccess.h> | 24 | #include <linux/uaccess.h> |
25 | #include <linux/workqueue.h> | 25 | #include <linux/workqueue.h> |
26 | #include <linux/syscalls.h> | 26 | #include <linux/syscalls.h> |
27 | #include <linux/sched/signal.h> | ||
28 | |||
27 | #include <net/kcm.h> | 29 | #include <net/kcm.h> |
28 | #include <net/netns/generic.h> | 30 | #include <net/netns/generic.h> |
29 | #include <net/sock.h> | 31 | #include <net/sock.h> |
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c index 5e9296382420..06186d608a27 100644 --- a/net/llc/af_llc.c +++ b/net/llc/af_llc.c | |||
@@ -26,6 +26,8 @@ | |||
26 | #include <linux/rtnetlink.h> | 26 | #include <linux/rtnetlink.h> |
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/slab.h> | 28 | #include <linux/slab.h> |
29 | #include <linux/sched/signal.h> | ||
30 | |||
29 | #include <net/llc.h> | 31 | #include <net/llc.h> |
30 | #include <net/llc_sap.h> | 32 | #include <net/llc_sap.h> |
31 | #include <net/llc_pdu.h> | 33 | #include <net/llc_pdu.h> |
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c index fcba70e57073..953d71e784a9 100644 --- a/net/mac80211/mesh_plink.c +++ b/net/mac80211/mesh_plink.c | |||
@@ -9,6 +9,8 @@ | |||
9 | #include <linux/gfp.h> | 9 | #include <linux/gfp.h> |
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/random.h> | 11 | #include <linux/random.h> |
12 | #include <linux/rculist.h> | ||
13 | |||
12 | #include "ieee80211_i.h" | 14 | #include "ieee80211_i.h" |
13 | #include "rate.h" | 15 | #include "rate.h" |
14 | #include "mesh.h" | 16 | #include "mesh.h" |
diff --git a/net/mac802154/llsec.c b/net/mac802154/llsec.c index 6a3e1c2181d3..1e1c9b20bab7 100644 --- a/net/mac802154/llsec.c +++ b/net/mac802154/llsec.c | |||
@@ -18,6 +18,8 @@ | |||
18 | #include <linux/bug.h> | 18 | #include <linux/bug.h> |
19 | #include <linux/completion.h> | 19 | #include <linux/completion.h> |
20 | #include <linux/ieee802154.h> | 20 | #include <linux/ieee802154.h> |
21 | #include <linux/rculist.h> | ||
22 | |||
21 | #include <crypto/aead.h> | 23 | #include <crypto/aead.h> |
22 | #include <crypto/skcipher.h> | 24 | #include <crypto/skcipher.h> |
23 | 25 | ||
diff --git a/net/netfilter/xt_owner.c b/net/netfilter/xt_owner.c index 16477df45b3b..3d705c688a27 100644 --- a/net/netfilter/xt_owner.c +++ b/net/netfilter/xt_owner.c | |||
@@ -13,6 +13,8 @@ | |||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/skbuff.h> | 14 | #include <linux/skbuff.h> |
15 | #include <linux/file.h> | 15 | #include <linux/file.h> |
16 | #include <linux/cred.h> | ||
17 | |||
16 | #include <net/sock.h> | 18 | #include <net/sock.h> |
17 | #include <net/inet_sock.h> | 19 | #include <net/inet_sock.h> |
18 | #include <linux/netfilter/x_tables.h> | 20 | #include <linux/netfilter/x_tables.h> |
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c index ed212ffc1d9d..4bbf4526b885 100644 --- a/net/netrom/af_netrom.c +++ b/net/netrom/af_netrom.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/in.h> | 17 | #include <linux/in.h> |
18 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/sched.h> | 20 | #include <linux/sched/signal.h> |
21 | #include <linux/timer.h> | 21 | #include <linux/timer.h> |
22 | #include <linux/string.h> | 22 | #include <linux/string.h> |
23 | #include <linux/sockios.h> | 23 | #include <linux/sockios.h> |
diff --git a/net/nfc/llcp_sock.c b/net/nfc/llcp_sock.c index b9edf5fae6ae..879885b31cce 100644 --- a/net/nfc/llcp_sock.c +++ b/net/nfc/llcp_sock.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/nfc.h> | 23 | #include <linux/nfc.h> |
24 | #include <linux/sched/signal.h> | ||
24 | 25 | ||
25 | #include "nfc.h" | 26 | #include "nfc.h" |
26 | #include "llcp.h" | 27 | #include "llcp.h" |
diff --git a/net/phonet/pep.c b/net/phonet/pep.c index 8bad5624a27a..222bedcd9575 100644 --- a/net/phonet/pep.c +++ b/net/phonet/pep.c | |||
@@ -23,6 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
26 | #include <linux/sched/signal.h> | ||
26 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
27 | #include <linux/socket.h> | 28 | #include <linux/socket.h> |
28 | #include <net/sock.h> | 29 | #include <net/sock.h> |
diff --git a/net/phonet/socket.c b/net/phonet/socket.c index ffd5f2297584..a6c8da3ee893 100644 --- a/net/phonet/socket.c +++ b/net/phonet/socket.c | |||
@@ -27,6 +27,8 @@ | |||
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/net.h> | 28 | #include <linux/net.h> |
29 | #include <linux/poll.h> | 29 | #include <linux/poll.h> |
30 | #include <linux/sched/signal.h> | ||
31 | |||
30 | #include <net/sock.h> | 32 | #include <net/sock.h> |
31 | #include <net/tcp_states.h> | 33 | #include <net/tcp_states.h> |
32 | 34 | ||
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c index 9ad301c46b88..b8a1df2c9785 100644 --- a/net/rose/af_rose.c +++ b/net/rose/af_rose.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/in.h> | 20 | #include <linux/in.h> |
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/sched.h> | 23 | #include <linux/sched/signal.h> |
24 | #include <linux/spinlock.h> | 24 | #include <linux/spinlock.h> |
25 | #include <linux/timer.h> | 25 | #include <linux/timer.h> |
26 | #include <linux/string.h> | 26 | #include <linux/string.h> |
diff --git a/net/rxrpc/conn_client.c b/net/rxrpc/conn_client.c index 40a1ef2adeb4..c3be03e8d098 100644 --- a/net/rxrpc/conn_client.c +++ b/net/rxrpc/conn_client.c | |||
@@ -76,6 +76,8 @@ | |||
76 | #include <linux/slab.h> | 76 | #include <linux/slab.h> |
77 | #include <linux/idr.h> | 77 | #include <linux/idr.h> |
78 | #include <linux/timer.h> | 78 | #include <linux/timer.h> |
79 | #include <linux/sched/signal.h> | ||
80 | |||
79 | #include "ar-internal.h" | 81 | #include "ar-internal.h" |
80 | 82 | ||
81 | __read_mostly unsigned int rxrpc_max_client_connections = 1000; | 83 | __read_mostly unsigned int rxrpc_max_client_connections = 1000; |
diff --git a/net/rxrpc/recvmsg.c b/net/rxrpc/recvmsg.c index f3a688e10843..28274a3c9831 100644 --- a/net/rxrpc/recvmsg.c +++ b/net/rxrpc/recvmsg.c | |||
@@ -14,6 +14,8 @@ | |||
14 | #include <linux/net.h> | 14 | #include <linux/net.h> |
15 | #include <linux/skbuff.h> | 15 | #include <linux/skbuff.h> |
16 | #include <linux/export.h> | 16 | #include <linux/export.h> |
17 | #include <linux/sched/signal.h> | ||
18 | |||
17 | #include <net/sock.h> | 19 | #include <net/sock.h> |
18 | #include <net/af_rxrpc.h> | 20 | #include <net/af_rxrpc.h> |
19 | #include "ar-internal.h" | 21 | #include "ar-internal.h" |
diff --git a/net/rxrpc/sendmsg.c b/net/rxrpc/sendmsg.c index 0a6ef217aa8a..19b36c60fb4c 100644 --- a/net/rxrpc/sendmsg.c +++ b/net/rxrpc/sendmsg.c | |||
@@ -15,6 +15,8 @@ | |||
15 | #include <linux/gfp.h> | 15 | #include <linux/gfp.h> |
16 | #include <linux/skbuff.h> | 16 | #include <linux/skbuff.h> |
17 | #include <linux/export.h> | 17 | #include <linux/export.h> |
18 | #include <linux/sched/signal.h> | ||
19 | |||
18 | #include <net/sock.h> | 20 | #include <net/sock.h> |
19 | #include <net/af_rxrpc.h> | 21 | #include <net/af_rxrpc.h> |
20 | #include "ar-internal.h" | 22 | #include "ar-internal.h" |
diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c index 41c80b6c3906..ae7e4f5b348b 100644 --- a/net/sched/em_meta.c +++ b/net/sched/em_meta.c | |||
@@ -63,6 +63,7 @@ | |||
63 | #include <linux/types.h> | 63 | #include <linux/types.h> |
64 | #include <linux/kernel.h> | 64 | #include <linux/kernel.h> |
65 | #include <linux/sched.h> | 65 | #include <linux/sched.h> |
66 | #include <linux/sched/loadavg.h> | ||
66 | #include <linux/string.h> | 67 | #include <linux/string.h> |
67 | #include <linux/skbuff.h> | 68 | #include <linux/skbuff.h> |
68 | #include <linux/random.h> | 69 | #include <linux/random.h> |
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 465a9c8464f9..6f0a9be50f50 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
@@ -57,6 +57,7 @@ | |||
57 | #include <linux/kernel.h> | 57 | #include <linux/kernel.h> |
58 | #include <linux/wait.h> | 58 | #include <linux/wait.h> |
59 | #include <linux/time.h> | 59 | #include <linux/time.h> |
60 | #include <linux/sched/signal.h> | ||
60 | #include <linux/ip.h> | 61 | #include <linux/ip.h> |
61 | #include <linux/capability.h> | 62 | #include <linux/capability.h> |
62 | #include <linux/fcntl.h> | 63 | #include <linux/fcntl.h> |
diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c index 5d4208ad029e..85837ab90e89 100644 --- a/net/smc/af_smc.c +++ b/net/smc/af_smc.c | |||
@@ -27,6 +27,8 @@ | |||
27 | #include <linux/inetdevice.h> | 27 | #include <linux/inetdevice.h> |
28 | #include <linux/workqueue.h> | 28 | #include <linux/workqueue.h> |
29 | #include <linux/in.h> | 29 | #include <linux/in.h> |
30 | #include <linux/sched/signal.h> | ||
31 | |||
30 | #include <net/sock.h> | 32 | #include <net/sock.h> |
31 | #include <net/tcp.h> | 33 | #include <net/tcp.h> |
32 | #include <net/smc.h> | 34 | #include <net/smc.h> |
diff --git a/net/smc/smc_clc.c b/net/smc/smc_clc.c index cc6b6f8651eb..e41f594a1e1d 100644 --- a/net/smc/smc_clc.c +++ b/net/smc/smc_clc.c | |||
@@ -11,6 +11,8 @@ | |||
11 | 11 | ||
12 | #include <linux/in.h> | 12 | #include <linux/in.h> |
13 | #include <linux/if_ether.h> | 13 | #include <linux/if_ether.h> |
14 | #include <linux/sched/signal.h> | ||
15 | |||
14 | #include <net/sock.h> | 16 | #include <net/sock.h> |
15 | #include <net/tcp.h> | 17 | #include <net/tcp.h> |
16 | 18 | ||
diff --git a/net/smc/smc_close.c b/net/smc/smc_close.c index 03dfcc6b7661..67a71d170bed 100644 --- a/net/smc/smc_close.c +++ b/net/smc/smc_close.c | |||
@@ -9,6 +9,8 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/workqueue.h> | 11 | #include <linux/workqueue.h> |
12 | #include <linux/sched/signal.h> | ||
13 | |||
12 | #include <net/sock.h> | 14 | #include <net/sock.h> |
13 | 15 | ||
14 | #include "smc.h" | 16 | #include "smc.h" |
diff --git a/net/smc/smc_rx.c b/net/smc/smc_rx.c index 5d1878732f46..c4ef9a4ec569 100644 --- a/net/smc/smc_rx.c +++ b/net/smc/smc_rx.c | |||
@@ -11,6 +11,8 @@ | |||
11 | 11 | ||
12 | #include <linux/net.h> | 12 | #include <linux/net.h> |
13 | #include <linux/rcupdate.h> | 13 | #include <linux/rcupdate.h> |
14 | #include <linux/sched/signal.h> | ||
15 | |||
14 | #include <net/sock.h> | 16 | #include <net/sock.h> |
15 | 17 | ||
16 | #include "smc.h" | 18 | #include "smc.h" |
diff --git a/net/smc/smc_tx.c b/net/smc/smc_tx.c index 6e73b28915ea..69a0013dd25c 100644 --- a/net/smc/smc_tx.c +++ b/net/smc/smc_tx.c | |||
@@ -15,6 +15,8 @@ | |||
15 | #include <linux/net.h> | 15 | #include <linux/net.h> |
16 | #include <linux/rcupdate.h> | 16 | #include <linux/rcupdate.h> |
17 | #include <linux/workqueue.h> | 17 | #include <linux/workqueue.h> |
18 | #include <linux/sched/signal.h> | ||
19 | |||
18 | #include <net/sock.h> | 20 | #include <net/sock.h> |
19 | 21 | ||
20 | #include "smc.h" | 22 | #include "smc.h" |
diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c index a1ee933e3029..d2623b9f23d6 100644 --- a/net/sunrpc/auth.c +++ b/net/sunrpc/auth.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
11 | #include <linux/cred.h> | ||
11 | #include <linux/module.h> | 12 | #include <linux/module.h> |
12 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
13 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index b94efd93d3e4..a08aeb56b8e4 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c | |||
@@ -11,7 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/linkage.h> | 13 | #include <linux/linkage.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched/signal.h> |
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #include <linux/net.h> | 16 | #include <linux/net.h> |
17 | #include <linux/in.h> | 17 | #include <linux/in.h> |
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 6b09a778cc71..43e4045e72bc 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c | |||
@@ -35,6 +35,8 @@ | |||
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include <linux/rhashtable.h> | 37 | #include <linux/rhashtable.h> |
38 | #include <linux/sched/signal.h> | ||
39 | |||
38 | #include "core.h" | 40 | #include "core.h" |
39 | #include "name_table.h" | 41 | #include "name_table.h" |
40 | #include "node.h" | 42 | #include "node.h" |
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index e2d18b9f910f..ee37b390260a 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c | |||
@@ -85,7 +85,7 @@ | |||
85 | #include <linux/module.h> | 85 | #include <linux/module.h> |
86 | #include <linux/kernel.h> | 86 | #include <linux/kernel.h> |
87 | #include <linux/signal.h> | 87 | #include <linux/signal.h> |
88 | #include <linux/sched.h> | 88 | #include <linux/sched/signal.h> |
89 | #include <linux/errno.h> | 89 | #include <linux/errno.h> |
90 | #include <linux/string.h> | 90 | #include <linux/string.h> |
91 | #include <linux/stat.h> | 91 | #include <linux/stat.h> |
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c index 8a398b3fb532..9192ead66751 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c | |||
@@ -90,6 +90,7 @@ | |||
90 | #include <linux/init.h> | 90 | #include <linux/init.h> |
91 | #include <linux/io.h> | 91 | #include <linux/io.h> |
92 | #include <linux/kernel.h> | 92 | #include <linux/kernel.h> |
93 | #include <linux/sched/signal.h> | ||
93 | #include <linux/kmod.h> | 94 | #include <linux/kmod.h> |
94 | #include <linux/list.h> | 95 | #include <linux/list.h> |
95 | #include <linux/miscdevice.h> | 96 | #include <linux/miscdevice.h> |
diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c index 849c4ad0411e..8d592a45b597 100644 --- a/net/vmw_vsock/virtio_transport_common.c +++ b/net/vmw_vsock/virtio_transport_common.c | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | #include <linux/spinlock.h> | 10 | #include <linux/spinlock.h> |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/sched/signal.h> | ||
12 | #include <linux/ctype.h> | 13 | #include <linux/ctype.h> |
13 | #include <linux/list.h> | 14 | #include <linux/list.h> |
14 | #include <linux/virtio.h> | 15 | #include <linux/virtio.h> |
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 079c883aa96e..fd28a49dbe8f 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c | |||
@@ -41,7 +41,7 @@ | |||
41 | #include <linux/capability.h> | 41 | #include <linux/capability.h> |
42 | #include <linux/errno.h> | 42 | #include <linux/errno.h> |
43 | #include <linux/kernel.h> | 43 | #include <linux/kernel.h> |
44 | #include <linux/sched.h> | 44 | #include <linux/sched/signal.h> |
45 | #include <linux/timer.h> | 45 | #include <linux/timer.h> |
46 | #include <linux/string.h> | 46 | #include <linux/string.h> |
47 | #include <linux/net.h> | 47 | #include <linux/net.h> |
diff --git a/samples/trace_events/trace-events-sample.c b/samples/trace_events/trace-events-sample.c index 30e282d33d4d..bc7fcf010a5b 100644 --- a/samples/trace_events/trace-events-sample.c +++ b/samples/trace_events/trace-events-sample.c | |||
@@ -33,7 +33,7 @@ static void simple_thread_func(int cnt) | |||
33 | 33 | ||
34 | /* Silly tracepoints */ | 34 | /* Silly tracepoints */ |
35 | trace_foo_bar("hello", cnt, array, random_strings[len], | 35 | trace_foo_bar("hello", cnt, array, random_strings[len], |
36 | tsk_cpus_allowed(current)); | 36 | ¤t->cpus_allowed); |
37 | 37 | ||
38 | trace_foo_with_template_simple("HELLO", cnt); | 38 | trace_foo_with_template_simple("HELLO", cnt); |
39 | 39 | ||
diff --git a/security/apparmor/policy.c b/security/apparmor/policy.c index f44312a19522..def1fbd6bdfd 100644 --- a/security/apparmor/policy.c +++ b/security/apparmor/policy.c | |||
@@ -76,6 +76,8 @@ | |||
76 | #include <linux/slab.h> | 76 | #include <linux/slab.h> |
77 | #include <linux/spinlock.h> | 77 | #include <linux/spinlock.h> |
78 | #include <linux/string.h> | 78 | #include <linux/string.h> |
79 | #include <linux/cred.h> | ||
80 | #include <linux/rculist.h> | ||
79 | #include <linux/user_namespace.h> | 81 | #include <linux/user_namespace.h> |
80 | 82 | ||
81 | #include "include/apparmor.h" | 83 | #include "include/apparmor.h" |
diff --git a/security/integrity/evm/evm_main.c b/security/integrity/evm/evm_main.c index e2ed498c0f5f..063d38aef64e 100644 --- a/security/integrity/evm/evm_main.c +++ b/security/integrity/evm/evm_main.c | |||
@@ -22,6 +22,8 @@ | |||
22 | #include <linux/xattr.h> | 22 | #include <linux/xattr.h> |
23 | #include <linux/integrity.h> | 23 | #include <linux/integrity.h> |
24 | #include <linux/evm.h> | 24 | #include <linux/evm.h> |
25 | #include <linux/magic.h> | ||
26 | |||
25 | #include <crypto/hash.h> | 27 | #include <crypto/hash.h> |
26 | #include <crypto/algapi.h> | 28 | #include <crypto/algapi.h> |
27 | #include "evm.h" | 29 | #include "evm.h" |
diff --git a/security/keys/internal.h b/security/keys/internal.h index a705a7d92ad7..a2f4c0abb8d8 100644 --- a/security/keys/internal.h +++ b/security/keys/internal.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #define _INTERNAL_H | 13 | #define _INTERNAL_H |
14 | 14 | ||
15 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
16 | #include <linux/cred.h> | ||
16 | #include <linux/key-type.h> | 17 | #include <linux/key-type.h> |
17 | #include <linux/task_work.h> | 18 | #include <linux/task_work.h> |
18 | #include <linux/keyctl.h> | 19 | #include <linux/keyctl.h> |
diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c index 04a764f71ec8..52c34532c785 100644 --- a/security/keys/keyctl.c +++ b/security/keys/keyctl.c | |||
@@ -12,12 +12,14 @@ | |||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
15 | #include <linux/sched/task.h> | ||
15 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
16 | #include <linux/syscalls.h> | 17 | #include <linux/syscalls.h> |
17 | #include <linux/key.h> | 18 | #include <linux/key.h> |
18 | #include <linux/keyctl.h> | 19 | #include <linux/keyctl.h> |
19 | #include <linux/fs.h> | 20 | #include <linux/fs.h> |
20 | #include <linux/capability.h> | 21 | #include <linux/capability.h> |
22 | #include <linux/cred.h> | ||
21 | #include <linux/string.h> | 23 | #include <linux/string.h> |
22 | #include <linux/err.h> | 24 | #include <linux/err.h> |
23 | #include <linux/vmalloc.h> | 25 | #include <linux/vmalloc.h> |
diff --git a/security/keys/persistent.c b/security/keys/persistent.c index 1edc1f0a0ce2..d0cb5b32eff7 100644 --- a/security/keys/persistent.c +++ b/security/keys/persistent.c | |||
@@ -10,6 +10,8 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/user_namespace.h> | 12 | #include <linux/user_namespace.h> |
13 | #include <linux/cred.h> | ||
14 | |||
13 | #include "internal.h" | 15 | #include "internal.h" |
14 | 16 | ||
15 | unsigned persistent_keyring_expiry = 3 * 24 * 3600; /* Expire after 3 days of non-use */ | 17 | unsigned persistent_keyring_expiry = 3 * 24 * 3600; /* Expire after 3 days of non-use */ |
diff --git a/security/keys/process_keys.c b/security/keys/process_keys.c index 918cddcd4516..b6fdd22205b1 100644 --- a/security/keys/process_keys.c +++ b/security/keys/process_keys.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
15 | #include <linux/sched/user.h> | ||
15 | #include <linux/keyctl.h> | 16 | #include <linux/keyctl.h> |
16 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
17 | #include <linux/err.h> | 18 | #include <linux/err.h> |
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 0a4b4b040e0a..0c2ac318aa7f 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -28,7 +28,8 @@ | |||
28 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
29 | #include <linux/tracehook.h> | 29 | #include <linux/tracehook.h> |
30 | #include <linux/errno.h> | 30 | #include <linux/errno.h> |
31 | #include <linux/sched.h> | 31 | #include <linux/sched/signal.h> |
32 | #include <linux/sched/task.h> | ||
32 | #include <linux/lsm_hooks.h> | 33 | #include <linux/lsm_hooks.h> |
33 | #include <linux/xattr.h> | 34 | #include <linux/xattr.h> |
34 | #include <linux/capability.h> | 35 | #include <linux/capability.h> |
diff --git a/security/tomoyo/domain.c b/security/tomoyo/domain.c index 838ffa78cfda..00d223e9fb37 100644 --- a/security/tomoyo/domain.c +++ b/security/tomoyo/domain.c | |||
@@ -5,8 +5,10 @@ | |||
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include "common.h" | 7 | #include "common.h" |
8 | |||
8 | #include <linux/binfmts.h> | 9 | #include <linux/binfmts.h> |
9 | #include <linux/slab.h> | 10 | #include <linux/slab.h> |
11 | #include <linux/rculist.h> | ||
10 | 12 | ||
11 | /* Variables definitions.*/ | 13 | /* Variables definitions.*/ |
12 | 14 | ||
diff --git a/security/tomoyo/group.c b/security/tomoyo/group.c index 50092534ec54..944ad77d8fba 100644 --- a/security/tomoyo/group.c +++ b/security/tomoyo/group.c | |||
@@ -5,6 +5,8 @@ | |||
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/slab.h> | 7 | #include <linux/slab.h> |
8 | #include <linux/rculist.h> | ||
9 | |||
8 | #include "common.h" | 10 | #include "common.h" |
9 | 11 | ||
10 | /** | 12 | /** |
diff --git a/security/tomoyo/util.c b/security/tomoyo/util.c index 5fe3679137ae..848317fea704 100644 --- a/security/tomoyo/util.c +++ b/security/tomoyo/util.c | |||
@@ -5,6 +5,8 @@ | |||
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/slab.h> | 7 | #include <linux/slab.h> |
8 | #include <linux/rculist.h> | ||
9 | |||
8 | #include "common.h" | 10 | #include "common.h" |
9 | 11 | ||
10 | /* Lock for protecting policy. */ | 12 | /* Lock for protecting policy. */ |
diff --git a/sound/core/control.c b/sound/core/control.c index fb096cb20a80..c109b82eef4b 100644 --- a/sound/core/control.c +++ b/sound/core/control.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/vmalloc.h> | 26 | #include <linux/vmalloc.h> |
27 | #include <linux/time.h> | 27 | #include <linux/time.h> |
28 | #include <linux/sched/signal.h> | ||
28 | #include <sound/core.h> | 29 | #include <sound/core.h> |
29 | #include <sound/minors.h> | 30 | #include <sound/minors.h> |
30 | #include <sound/info.h> | 31 | #include <sound/info.h> |
diff --git a/sound/core/hwdep.c b/sound/core/hwdep.c index 36d2416f90d9..9602a7e38d8a 100644 --- a/sound/core/hwdep.c +++ b/sound/core/hwdep.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/time.h> | 25 | #include <linux/time.h> |
26 | #include <linux/mutex.h> | 26 | #include <linux/mutex.h> |
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/sched/signal.h> | ||
28 | #include <sound/core.h> | 29 | #include <sound/core.h> |
29 | #include <sound/control.h> | 30 | #include <sound/control.h> |
30 | #include <sound/minors.h> | 31 | #include <sound/minors.h> |
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index 698a01419515..36baf962f9b0 100644 --- a/sound/core/oss/pcm_oss.c +++ b/sound/core/oss/pcm_oss.c | |||
@@ -28,6 +28,7 @@ | |||
28 | 28 | ||
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
31 | #include <linux/sched/signal.h> | ||
31 | #include <linux/time.h> | 32 | #include <linux/time.h> |
32 | #include <linux/vmalloc.h> | 33 | #include <linux/vmalloc.h> |
33 | #include <linux/module.h> | 34 | #include <linux/module.h> |
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index bb1261591a1f..5088d4b8db22 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c | |||
@@ -21,6 +21,7 @@ | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | #include <linux/sched/signal.h> | ||
24 | #include <linux/time.h> | 25 | #include <linux/time.h> |
25 | #include <linux/math64.h> | 26 | #include <linux/math64.h> |
26 | #include <linux/export.h> | 27 | #include <linux/export.h> |
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index aec9c92250fd..13dec5ec93f2 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/file.h> | 24 | #include <linux/file.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/sched/signal.h> | ||
26 | #include <linux/time.h> | 27 | #include <linux/time.h> |
27 | #include <linux/pm_qos.h> | 28 | #include <linux/pm_qos.h> |
28 | #include <linux/io.h> | 29 | #include <linux/io.h> |
diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c index 8da9cb245d01..ab890336175f 100644 --- a/sound/core/rawmidi.c +++ b/sound/core/rawmidi.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include <sound/core.h> | 22 | #include <sound/core.h> |
23 | #include <linux/major.h> | 23 | #include <linux/major.h> |
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/sched.h> | 25 | #include <linux/sched/signal.h> |
26 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
27 | #include <linux/time.h> | 27 | #include <linux/time.h> |
28 | #include <linux/wait.h> | 28 | #include <linux/wait.h> |
diff --git a/sound/core/seq/oss/seq_oss_device.h b/sound/core/seq/oss/seq_oss_device.h index d7b4d016b547..afa007c0cc2d 100644 --- a/sound/core/seq/oss/seq_oss_device.h +++ b/sound/core/seq/oss/seq_oss_device.h | |||
@@ -24,7 +24,7 @@ | |||
24 | #include <linux/time.h> | 24 | #include <linux/time.h> |
25 | #include <linux/wait.h> | 25 | #include <linux/wait.h> |
26 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
27 | #include <linux/sched.h> | 27 | #include <linux/sched/signal.h> |
28 | #include <sound/core.h> | 28 | #include <sound/core.h> |
29 | #include <sound/seq_oss.h> | 29 | #include <sound/seq_oss.h> |
30 | #include <sound/rawmidi.h> | 30 | #include <sound/rawmidi.h> |
diff --git a/sound/core/seq/oss/seq_oss_writeq.c b/sound/core/seq/oss/seq_oss_writeq.c index 1f6788a18444..5e04f4df10e4 100644 --- a/sound/core/seq/oss/seq_oss_writeq.c +++ b/sound/core/seq/oss/seq_oss_writeq.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include "../seq_clientmgr.h" | 28 | #include "../seq_clientmgr.h" |
29 | #include <linux/wait.h> | 29 | #include <linux/wait.h> |
30 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
31 | #include <linux/sched/signal.h> | ||
31 | 32 | ||
32 | 33 | ||
33 | /* | 34 | /* |
diff --git a/sound/core/seq/seq_fifo.c b/sound/core/seq/seq_fifo.c index 86240d02b530..448efd4e980e 100644 --- a/sound/core/seq/seq_fifo.c +++ b/sound/core/seq/seq_fifo.c | |||
@@ -21,6 +21,8 @@ | |||
21 | 21 | ||
22 | #include <sound/core.h> | 22 | #include <sound/core.h> |
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | #include <linux/sched/signal.h> | ||
25 | |||
24 | #include "seq_fifo.h" | 26 | #include "seq_fifo.h" |
25 | #include "seq_lock.h" | 27 | #include "seq_lock.h" |
26 | 28 | ||
diff --git a/sound/core/seq/seq_memory.c b/sound/core/seq/seq_memory.c index dfa5156f3585..1a1acf3ddda4 100644 --- a/sound/core/seq/seq_memory.c +++ b/sound/core/seq/seq_memory.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/export.h> | 24 | #include <linux/export.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/sched/signal.h> | ||
26 | #include <linux/vmalloc.h> | 27 | #include <linux/vmalloc.h> |
27 | #include <sound/core.h> | 28 | #include <sound/core.h> |
28 | 29 | ||
diff --git a/sound/core/timer.c b/sound/core/timer.c index ad153149b231..6d4fbc439246 100644 --- a/sound/core/timer.c +++ b/sound/core/timer.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/device.h> | 27 | #include <linux/device.h> |
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/string.h> | 29 | #include <linux/string.h> |
30 | #include <linux/sched/signal.h> | ||
30 | #include <sound/core.h> | 31 | #include <sound/core.h> |
31 | #include <sound/timer.h> | 32 | #include <sound/timer.h> |
32 | #include <sound/control.h> | 33 | #include <sound/control.h> |
diff --git a/sound/firewire/bebob/bebob.h b/sound/firewire/bebob/bebob.h index 175da875162d..17678d6ab5a2 100644 --- a/sound/firewire/bebob/bebob.h +++ b/sound/firewire/bebob/bebob.h | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/mod_devicetable.h> | 17 | #include <linux/mod_devicetable.h> |
18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | #include <linux/sched/signal.h> | ||
20 | 21 | ||
21 | #include <sound/core.h> | 22 | #include <sound/core.h> |
22 | #include <sound/initval.h> | 23 | #include <sound/initval.h> |
diff --git a/sound/firewire/dice/dice.h b/sound/firewire/dice/dice.h index e6c07857f475..da00e75e09d4 100644 --- a/sound/firewire/dice/dice.h +++ b/sound/firewire/dice/dice.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | #include <linux/spinlock.h> | 24 | #include <linux/spinlock.h> |
25 | #include <linux/wait.h> | 25 | #include <linux/wait.h> |
26 | #include <linux/sched/signal.h> | ||
26 | 27 | ||
27 | #include <sound/control.h> | 28 | #include <sound/control.h> |
28 | #include <sound/core.h> | 29 | #include <sound/core.h> |
diff --git a/sound/firewire/digi00x/digi00x.h b/sound/firewire/digi00x/digi00x.h index 2cd465c0caae..9dc761bdacca 100644 --- a/sound/firewire/digi00x/digi00x.h +++ b/sound/firewire/digi00x/digi00x.h | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/mod_devicetable.h> | 16 | #include <linux/mod_devicetable.h> |
17 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
18 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
19 | #include <linux/sched/signal.h> | ||
19 | 20 | ||
20 | #include <sound/core.h> | 21 | #include <sound/core.h> |
21 | #include <sound/initval.h> | 22 | #include <sound/initval.h> |
diff --git a/sound/firewire/fireworks/fireworks.h b/sound/firewire/fireworks/fireworks.h index d73c12b8753d..9b19c7f05d57 100644 --- a/sound/firewire/fireworks/fireworks.h +++ b/sound/firewire/fireworks/fireworks.h | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/mod_devicetable.h> | 17 | #include <linux/mod_devicetable.h> |
18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | #include <linux/sched/signal.h> | ||
20 | 21 | ||
21 | #include <sound/core.h> | 22 | #include <sound/core.h> |
22 | #include <sound/initval.h> | 23 | #include <sound/initval.h> |
diff --git a/sound/firewire/oxfw/oxfw.h b/sound/firewire/oxfw/oxfw.h index 2047dcb27625..d54d4a9ac4a1 100644 --- a/sound/firewire/oxfw/oxfw.h +++ b/sound/firewire/oxfw/oxfw.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/mutex.h> | 13 | #include <linux/mutex.h> |
14 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
15 | #include <linux/compat.h> | 15 | #include <linux/compat.h> |
16 | #include <linux/sched/signal.h> | ||
16 | 17 | ||
17 | #include <sound/control.h> | 18 | #include <sound/control.h> |
18 | #include <sound/core.h> | 19 | #include <sound/core.h> |
diff --git a/sound/firewire/tascam/tascam.h b/sound/firewire/tascam/tascam.h index 1f61011579a7..d3cd4065722b 100644 --- a/sound/firewire/tascam/tascam.h +++ b/sound/firewire/tascam/tascam.h | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/mutex.h> | 17 | #include <linux/mutex.h> |
18 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
19 | #include <linux/compat.h> | 19 | #include <linux/compat.h> |
20 | #include <linux/sched/signal.h> | ||
20 | 21 | ||
21 | #include <sound/core.h> | 22 | #include <sound/core.h> |
22 | #include <sound/initval.h> | 23 | #include <sound/initval.h> |
diff --git a/sound/isa/gus/gus_pcm.c b/sound/isa/gus/gus_pcm.c index 25f6788ccef3..06505999155f 100644 --- a/sound/isa/gus/gus_pcm.c +++ b/sound/isa/gus/gus_pcm.c | |||
@@ -27,6 +27,8 @@ | |||
27 | 27 | ||
28 | #include <asm/dma.h> | 28 | #include <asm/dma.h> |
29 | #include <linux/slab.h> | 29 | #include <linux/slab.h> |
30 | #include <linux/sched/signal.h> | ||
31 | |||
30 | #include <sound/core.h> | 32 | #include <sound/core.h> |
31 | #include <sound/control.h> | 33 | #include <sound/control.h> |
32 | #include <sound/gus.h> | 34 | #include <sound/gus.h> |
diff --git a/sound/isa/msnd/msnd.c b/sound/isa/msnd/msnd.c index 835d4aa26761..8109ab3d29d1 100644 --- a/sound/isa/msnd/msnd.c +++ b/sound/isa/msnd/msnd.c | |||
@@ -36,6 +36,7 @@ | |||
36 | ********************************************************************/ | 36 | ********************************************************************/ |
37 | 37 | ||
38 | #include <linux/kernel.h> | 38 | #include <linux/kernel.h> |
39 | #include <linux/sched/signal.h> | ||
39 | #include <linux/types.h> | 40 | #include <linux/types.h> |
40 | #include <linux/interrupt.h> | 41 | #include <linux/interrupt.h> |
41 | #include <linux/io.h> | 42 | #include <linux/io.h> |
diff --git a/sound/isa/sb/emu8000.c b/sound/isa/sb/emu8000.c index 94c411299e5a..ec180708f160 100644 --- a/sound/isa/sb/emu8000.c +++ b/sound/isa/sb/emu8000.c | |||
@@ -21,7 +21,7 @@ | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/wait.h> | 23 | #include <linux/wait.h> |
24 | #include <linux/sched.h> | 24 | #include <linux/sched/signal.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/ioport.h> | 26 | #include <linux/ioport.h> |
27 | #include <linux/export.h> | 27 | #include <linux/export.h> |
diff --git a/sound/isa/sb/emu8000_patch.c b/sound/isa/sb/emu8000_patch.c index 71d13c0bb746..c2e41d2762f7 100644 --- a/sound/isa/sb/emu8000_patch.c +++ b/sound/isa/sb/emu8000_patch.c | |||
@@ -20,6 +20,8 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include "emu8000_local.h" | 22 | #include "emu8000_local.h" |
23 | |||
24 | #include <linux/sched/signal.h> | ||
23 | #include <linux/uaccess.h> | 25 | #include <linux/uaccess.h> |
24 | #include <linux/moduleparam.h> | 26 | #include <linux/moduleparam.h> |
25 | 27 | ||
diff --git a/sound/isa/sb/emu8000_pcm.c b/sound/isa/sb/emu8000_pcm.c index 250fd0006b53..32f234f494e5 100644 --- a/sound/isa/sb/emu8000_pcm.c +++ b/sound/isa/sb/emu8000_pcm.c | |||
@@ -19,6 +19,8 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include "emu8000_local.h" | 21 | #include "emu8000_local.h" |
22 | |||
23 | #include <linux/sched/signal.h> | ||
22 | #include <linux/init.h> | 24 | #include <linux/init.h> |
23 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
24 | #include <sound/initval.h> | 26 | #include <sound/initval.h> |
diff --git a/sound/isa/wavefront/wavefront_synth.c b/sound/isa/wavefront/wavefront_synth.c index 718d5e3b7806..4dae9ff9ef5a 100644 --- a/sound/isa/wavefront/wavefront_synth.c +++ b/sound/isa/wavefront/wavefront_synth.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
27 | #include <linux/time.h> | 27 | #include <linux/time.h> |
28 | #include <linux/wait.h> | 28 | #include <linux/wait.h> |
29 | #include <linux/sched/signal.h> | ||
29 | #include <linux/firmware.h> | 30 | #include <linux/firmware.h> |
30 | #include <linux/moduleparam.h> | 31 | #include <linux/moduleparam.h> |
31 | #include <linux/slab.h> | 32 | #include <linux/slab.h> |
diff --git a/sound/oss/dmabuf.c b/sound/oss/dmabuf.c index e3f29132d3ac..c5dd396c66a2 100644 --- a/sound/oss/dmabuf.c +++ b/sound/oss/dmabuf.c | |||
@@ -27,6 +27,8 @@ | |||
27 | 27 | ||
28 | #include <linux/mm.h> | 28 | #include <linux/mm.h> |
29 | #include <linux/gfp.h> | 29 | #include <linux/gfp.h> |
30 | #include <linux/sched/signal.h> | ||
31 | |||
30 | #include "sound_config.h" | 32 | #include "sound_config.h" |
31 | #include "sleep.h" | 33 | #include "sleep.h" |
32 | 34 | ||
diff --git a/sound/oss/dmasound/dmasound_core.c b/sound/oss/dmasound/dmasound_core.c index 5f248fb41bea..fb3bbceb1fef 100644 --- a/sound/oss/dmasound/dmasound_core.c +++ b/sound/oss/dmasound/dmasound_core.c | |||
@@ -182,6 +182,7 @@ | |||
182 | #include <linux/soundcard.h> | 182 | #include <linux/soundcard.h> |
183 | #include <linux/poll.h> | 183 | #include <linux/poll.h> |
184 | #include <linux/mutex.h> | 184 | #include <linux/mutex.h> |
185 | #include <linux/sched/signal.h> | ||
185 | 186 | ||
186 | #include <linux/uaccess.h> | 187 | #include <linux/uaccess.h> |
187 | 188 | ||
diff --git a/sound/oss/midibuf.c b/sound/oss/midibuf.c index 8f45cd999965..701c7625c971 100644 --- a/sound/oss/midibuf.c +++ b/sound/oss/midibuf.c | |||
@@ -16,6 +16,8 @@ | |||
16 | #include <linux/stddef.h> | 16 | #include <linux/stddef.h> |
17 | #include <linux/kmod.h> | 17 | #include <linux/kmod.h> |
18 | #include <linux/spinlock.h> | 18 | #include <linux/spinlock.h> |
19 | #include <linux/sched/signal.h> | ||
20 | |||
19 | #define MIDIBUF_C | 21 | #define MIDIBUF_C |
20 | 22 | ||
21 | #include "sound_config.h" | 23 | #include "sound_config.h" |
diff --git a/sound/oss/msnd_pinnacle.c b/sound/oss/msnd_pinnacle.c index a8bb4a06ba6f..f34ec01d2239 100644 --- a/sound/oss/msnd_pinnacle.c +++ b/sound/oss/msnd_pinnacle.c | |||
@@ -41,6 +41,8 @@ | |||
41 | #include <linux/interrupt.h> | 41 | #include <linux/interrupt.h> |
42 | #include <linux/mutex.h> | 42 | #include <linux/mutex.h> |
43 | #include <linux/gfp.h> | 43 | #include <linux/gfp.h> |
44 | #include <linux/sched/signal.h> | ||
45 | |||
44 | #include <asm/irq.h> | 46 | #include <asm/irq.h> |
45 | #include <asm/io.h> | 47 | #include <asm/io.h> |
46 | #include "sound_config.h" | 48 | #include "sound_config.h" |
diff --git a/sound/oss/sound_config.h b/sound/oss/sound_config.h index f2554ab78f5e..5253b0a70437 100644 --- a/sound/oss/sound_config.h +++ b/sound/oss/sound_config.h | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
18 | #include <linux/sound.h> | 18 | #include <linux/sound.h> |
19 | #include <linux/sched/signal.h> | ||
19 | 20 | ||
20 | #include "os.h" | 21 | #include "os.h" |
21 | #include "soundvers.h" | 22 | #include "soundvers.h" |
diff --git a/sound/oss/swarm_cs4297a.c b/sound/oss/swarm_cs4297a.c index f3af63e58b36..97899352b15f 100644 --- a/sound/oss/swarm_cs4297a.c +++ b/sound/oss/swarm_cs4297a.c | |||
@@ -64,7 +64,7 @@ | |||
64 | #include <linux/module.h> | 64 | #include <linux/module.h> |
65 | #include <linux/string.h> | 65 | #include <linux/string.h> |
66 | #include <linux/ioport.h> | 66 | #include <linux/ioport.h> |
67 | #include <linux/sched.h> | 67 | #include <linux/sched/signal.h> |
68 | #include <linux/delay.h> | 68 | #include <linux/delay.h> |
69 | #include <linux/sound.h> | 69 | #include <linux/sound.h> |
70 | #include <linux/slab.h> | 70 | #include <linux/slab.h> |
diff --git a/virt/kvm/async_pf.c b/virt/kvm/async_pf.c index 2366177172f6..bb298a200cd3 100644 --- a/virt/kvm/async_pf.c +++ b/virt/kvm/async_pf.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/mmu_context.h> | 26 | #include <linux/mmu_context.h> |
27 | #include <linux/sched/mm.h> | ||
27 | 28 | ||
28 | #include "async_pf.h" | 29 | #include "async_pf.h" |
29 | #include <trace/events/kvm.h> | 30 | #include <trace/events/kvm.h> |
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 35f71409d9ee..799499417f5b 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -32,7 +32,9 @@ | |||
32 | #include <linux/file.h> | 32 | #include <linux/file.h> |
33 | #include <linux/syscore_ops.h> | 33 | #include <linux/syscore_ops.h> |
34 | #include <linux/cpu.h> | 34 | #include <linux/cpu.h> |
35 | #include <linux/sched.h> | 35 | #include <linux/sched/signal.h> |
36 | #include <linux/sched/mm.h> | ||
37 | #include <linux/sched/stat.h> | ||
36 | #include <linux/cpumask.h> | 38 | #include <linux/cpumask.h> |
37 | #include <linux/smp.h> | 39 | #include <linux/smp.h> |
38 | #include <linux/anon_inodes.h> | 40 | #include <linux/anon_inodes.h> |