sched/headers: Standardize kernel/sched/sched.h header dependencies
authorIngo Molnar <mingo@kernel.org>
Sun, 13 Feb 2022 07:19:43 +0000 (08:19 +0100)
committerIngo Molnar <mingo@kernel.org>
Wed, 23 Feb 2022 09:58:33 +0000 (10:58 +0100)
commitb9e9c6ca6e54b5d58a57663f76c5cb33c12ea98f
tree8c22f2d79b3842254f6deb44f222e1583780655d
parentf96eca432015ddc1b621632488ebc345bca06791
sched/headers: Standardize kernel/sched/sched.h header dependencies

kernel/sched/sched.h is a weird mix of ad-hoc headers included
in the middle of the header.

Two of them rely on being included in the middle of kernel/sched/sched.h,
due to definitions they require:

 - "stat.h" needs the rq definitions.
 - "autogroup.h" needs the task_group definition.

Move the inclusion of these two files out of kernel/sched/sched.h, and
include them in all files that require them.

Move of the rest of the header dependencies to the top of the
kernel/sched/sched.h file.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Peter Zijlstra <peterz@infradead.org>
kernel/sched/build_policy.c
kernel/sched/build_utility.c
kernel/sched/core.c
kernel/sched/fair.c
kernel/sched/sched.h
kernel/sched/stats.h