summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'header_cleanup-2024-01-10' of https://evilpiepirate.org/git/bcachefsLinus Torvalds2024-01-11119-775/+1062
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull header cleanups from Kent Overstreet: "The goal is to get sched.h down to a type only header, so the main thing happening in this patchset is splitting out various _types.h headers and dependency fixups, as well as moving some things out of sched.h to better locations. This is prep work for the memory allocation profiling patchset which adds new sched.h interdepencencies" * tag 'header_cleanup-2024-01-10' of https://evilpiepirate.org/git/bcachefs: (51 commits) Kill sched.h dependency on rcupdate.h kill unnecessary thread_info.h include Kill unnecessary kernel.h include preempt.h: Kill dependency on list.h rseq: Split out rseq.h from sched.h LoongArch: signal.c: add header file to fix build error restart_block: Trim includes lockdep: move held_lock to lockdep_types.h sem: Split out sem_types.h uidgid: Split out uidgid_types.h seccomp: Split out seccomp_types.h refcount: Split out refcount_types.h uapi/linux/resource.h: fix include x86/signal: kill dependency on time.h syscall_user_dispatch.h: split out *_types.h mm_types_task.h: Trim dependencies Split out irqflags_types.h ipc: Kill bogus dependency on spinlock.h shm: Slim down dependencies workqueue: Split out workqueue_types.h ...
| * Kill sched.h dependency on rcupdate.hKent Overstreet2023-12-2714-10/+28
| | | | | | | | | | | | | | by moving cond_resched_rcu() to rcupdate_wait.h, we can kill another big sched.h dependency. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * kill unnecessary thread_info.h includeKent Overstreet2023-12-272-1/+2
| | | | | | | | Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * Kill unnecessary kernel.h includeKent Overstreet2023-12-272-1/+2
| | | | | | | | | | | | More trimming down unnecessary includes. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * preempt.h: Kill dependency on list.hKent Overstreet2023-12-271-2/+4
| | | | | | | | | | | | We really only need types.h, list.h is big. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * rseq: Split out rseq.h from sched.hKent Overstreet2023-12-2710-124/+140
| | | | | | | | | | | | | | | | | | We're trying to get sched.h down to more or less just types only, not code - rseq can live in its own header. This helps us kill the dependency on preempt.h in sched.h. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * LoongArch: signal.c: add header file to fix build errorRandy Dunlap2023-12-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | loongarch's signal.c uses rseq_signal_deliver() so it should pull in the appropriate header to prevent a build error: ../arch/loongarch/kernel/signal.c: In function 'handle_signal': ../arch/loongarch/kernel/signal.c:1034:9: error: implicit declaration of function 'rseq_signal_deliver' [-Werror=implicit-function-declaration] 1034 | rseq_signal_deliver(ksig, regs); | ^~~~~~~~~~~~~~~~~~~ Fixes: b74baf4ad05b ("LoongArch: Add signal handling support") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Huacai Chen <chenhuacai@kernel.org> Cc: WANG Xuerui <kernel@xen0n.name> Cc: loongarch@lists.linux.dev Cc: Kent Overstreet <kent.overstreet@linux.dev> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * restart_block: Trim includesKent Overstreet2023-12-212-1/+2
| | | | | | | | | | | | | | | | | | We don't actually use any timekeeping types, no need to pull in time64.h. Also, sched.h uses restart_block; add it as a direct dependency. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * lockdep: move held_lock to lockdep_types.hKent Overstreet2023-12-212-57/+57
| | | | | | | | | | | | | | | | held_lock is embedded in task_struct, and we don't want sched.h pulling in all of lockdep.h Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> Acked-by: Waiman Long <longman@redhat.com>
| * sem: Split out sem_types.hKent Overstreet2023-12-214-10/+18
| | | | | | | | | | | | More sched.h dependency pruning. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * uidgid: Split out uidgid_types.hKent Overstreet2023-12-213-10/+17
| | | | | | | | | | | | | | More sched.h dependency pruning. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> Reviewed-by: Christian Brauner <brauner@kernel.org>
| * seccomp: Split out seccomp_types.hKent Overstreet2023-12-213-22/+37
| | | | | | | | | | | | More pruning of sched.h dependencies. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * refcount: Split out refcount_types.hKent Overstreet2023-12-214-13/+22
| | | | | | | | | | | | More trimming of sched.h dependencies. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * uapi/linux/resource.h: fix includeKent Overstreet2023-12-211-1/+1
| | | | | | | | | | | | | | We should't be depending on time.h; we should only be pulling in other uapi headers. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * x86/signal: kill dependency on time.hKent Overstreet2023-12-211-1/+0
| | | | | | | | | | | | this is unecessary, and was pulling in printk.h from uapi headers Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * syscall_user_dispatch.h: split out *_types.hKent Overstreet2023-12-213-9/+24
| | | | | | | | | | | | | | thread_info.h pulls in a lot of junk that sched.h that we don't need; in particular, this helps to kill the printk.h dependency. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * mm_types_task.h: Trim dependenciesKent Overstreet2023-12-211-3/+2
| | | | | | | | | | | | more sched.h header dependency trimming Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * Split out irqflags_types.hKent Overstreet2023-12-213-14/+24
| | | | | | | | | | | | | | We're working on only pulling in type definitions to sched.h whenever possible. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * ipc: Kill bogus dependency on spinlock.hKent Overstreet2023-12-212-1/+3
| | | | | | | | | | | | | | pruning sched.h dependencies, headers shouldn't pull in more than they need. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * shm: Slim down dependenciesKent Overstreet2023-12-215-2/+6
| | | | | | | | | | | | list_head is in types.h, not list.h., and the uapi header wasn't needed. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * workqueue: Split out workqueue_types.hKent Overstreet2023-12-215-16/+29
| | | | | | | | | | | | | | More sched.h dependency culling - this lets us kill a rhashtable-types.h dependency on workqueue.h. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * timers: Split out timer_types.hKent Overstreet2023-12-212-15/+24
| | | | | | | | | | | | | | | | Cutting down on sched.h dependencies: this is going to be used in workqueue_types.h in the next patch, so we can kill the sched.h dependency on workqueue.h. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * signal: Kill bogus dependency on list.hKent Overstreet2023-12-212-1/+2
| | | | | | | | | | | | list_head is in types.h, not list.h. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * timerqueue: Split out timerqueue_types.hKent Overstreet2023-12-214-14/+20
| | | | | | | | | | | | | | | | Trimming down sched.h dependencies: timerqueue_types can include just rbtree_types.h instead of pulling in rbtree.h. Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * rslib: kill bogus dependency on list.hKent Overstreet2023-12-211-1/+0
| | | | | | | | | | | | | | list_head is defined in types.h, not list.h - this kills a sched.h dependency. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * wait: Remove uapi header file from main header fileMatthew Wilcox (Oracle)2023-12-213-2/+4
| | | | | | | | | | | | | | | | | | | | There's really no overlap between uapi/linux/wait.h and linux/wait.h. There are two files which rely on the uapi file being implcitly included, so explicitly include it there and remove it from the main header file. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> Reviewed-by: Christian Brauner <brauner@kernel.org>
| * plist: Split out plist_types.hKent Overstreet2023-12-218-12/+24
| | | | | | | | | | | | | | Trimming down sched.h dependencies: we don't want to include more than the base types. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * sched.h: move pid helpers to pid.hKent Overstreet2023-12-219-124/+134
| | | | | | | | | | | | | | This is needed for killing the sched.h dependency on rcupdate.h, and pid.h is a better place for this code anyways. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * pid: Split out pid_types.hKent Overstreet2023-12-215-14/+22
| | | | | | | | | | | | | | | | | | | | Trimming down sched.h dependencies: we dont't want to include more than the base types. Cc: Kees Cook <keescook@chromium.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Will Drewry <wad@chromium.org> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * locking/seqlock: Split out seqlock_types.hKent Overstreet2023-12-213-78/+96
| | | | | | | | | | | | | | | | | | | | | | | | Trimming down sched.h dependencies: we don't want to include more than the base types. Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Will Deacon <will@kernel.org> Cc: Waiman Long <longman@redhat.com> Cc: Boqun Feng <boqun.feng@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * posix-cpu-timers: Split out posix-timers_types.hKent Overstreet2023-12-213-67/+84
| | | | | | | | | | | | | | | | Trimming down sched.h dependencies: we don't want to include more than the base types. Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * locking/mutex: split out mutex_types.hKent Overstreet2023-12-213-52/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | Trimming down sched.h dependencies: we don't want to include more than the base types. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Will Deacon <will@kernel.org> Cc: Waiman Long <longman@redhat.com> Cc: Boqun Feng <boqun.feng@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * hrtimers: Split out hrtimer_types.hKent Overstreet2023-12-213-43/+53
| | | | | | | | | | | | | | | | We need to reduce the scope of what's included in sched.h: task_struct includes a hrtimer, so split out the core types into their own header. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> Cc: Thomas Gleixner <tglx@linutronix.de>
| * ktime.h: move ktime_t to types.hKent Overstreet2023-12-212-5/+6
| | | | | | | | | | | | | | ktime.h pulls in quite a few headers recursively (including printk.h) - this is going to help with trimming sched.h dependencies. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * sched.h: Move (spin|rwlock)_needbreak() to spinlock.hKent Overstreet2023-12-212-31/+31
| | | | | | | | | | | | This lets us kill the dependency on spinlock.h. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * kernel/numa.c: Move logging out of numa.hKent Overstreet2023-12-213-13/+33
| | | | | | | | | | | | | | Moving these stub functions to a .c file means we can kill a sched.h dependency on printk.h. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * arm64: Fix circular header dependencyKent Overstreet2023-12-211-2/+2
| | | | | | | | | | | | | | | | Replace linux/percpu.h include with asm/percpu.h to avoid circular dependency. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> Signed-off-by: Suren Baghdasaryan <surenb@google.com>
| * timekeeping: Kill percpu.h dependencyKent Overstreet2023-12-212-1/+3
| | | | | | | | | | | | | | Slimming down recursive header includes. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> Cc: Thomas Gleixner <tglx@linutronix.de>
| * prandom: Remove unused includeKent Overstreet2023-12-211-1/+0
| | | | | | | | | | | | | | prandom.h doesn't use percpu.h - this fixes some circular header issues. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> Signed-off-by: Suren Baghdasaryan <surenb@google.com>
| * nodemask: Split out include/linux/nodemask_types.hKent Overstreet2023-12-213-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sched.h, which defines task_struct, needs nodemask_t - but sched.h is a frequently used header and ideally shouldn't be pulling in any more code that it needs to. This splits out nodemask_types.h which has the definition sched.h needs, which will avoid a circular header dependency in the alloc tagging patch series, and as a bonus should speed up kernel build times. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> Signed-off-by: Suren Baghdasaryan <surenb@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org>
| * torture: add missing dependency on hrtimer.hKent Overstreet2023-12-211-0/+1
| | | | | | | | Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * PM: fix missing rculist.h dependencyKent Overstreet2023-12-211-0/+1
| | | | | | | | Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * time_namespace.h: fix missing includeKent Overstreet2023-12-211-0/+1
| | | | | | | | Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * kmsan: add missing types.h dependencyKent Overstreet2023-12-211-0/+2
| | | | | | | | | | | | more header dependency pruning/fixing Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * kernel/fork.c: add missing includeKent Overstreet2023-12-211-0/+1
| | | | | | | | Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * nsproxy.h: add missing includeKent Overstreet2023-12-211-0/+1
| | | | | | | | Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * task_stack.h: add missing includeKent Overstreet2023-12-211-0/+1
| | | | | | | | Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * microblaze: add missing forward declarationKent Overstreet2023-12-211-0/+1
| | | | | | | | Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * m68k: Fix missing includeKent Overstreet2023-12-201-0/+1
| | | | | | | | Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| * x86: fix missing includes/forward declarationsKent Overstreet2023-12-205-0/+9
| | | | | | | | Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>