Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

syscall_user_dispatch.h: split out *_types.h

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>

+24 -9
+1 -1
include/linux/sched.h
··· 28 28 #include <linux/sched/prio.h> 29 29 #include <linux/sched/types.h> 30 30 #include <linux/signal_types.h> 31 - #include <linux/syscall_user_dispatch.h> 31 + #include <linux/syscall_user_dispatch_types.h> 32 32 #include <linux/mm_types_task.h> 33 33 #include <linux/task_io_accounting.h> 34 34 #include <linux/posix-timers_types.h>
+1 -8
include/linux/syscall_user_dispatch.h
··· 6 6 #define _SYSCALL_USER_DISPATCH_H 7 7 8 8 #include <linux/thread_info.h> 9 + #include <linux/syscall_user_dispatch_types.h> 9 10 10 11 #ifdef CONFIG_GENERIC_ENTRY 11 - 12 - struct syscall_user_dispatch { 13 - char __user *selector; 14 - unsigned long offset; 15 - unsigned long len; 16 - bool on_dispatch; 17 - }; 18 12 19 13 int set_syscall_user_dispatch(unsigned long mode, unsigned long offset, 20 14 unsigned long len, char __user *selector); ··· 23 29 void __user *data); 24 30 25 31 #else 26 - struct syscall_user_dispatch {}; 27 32 28 33 static inline int set_syscall_user_dispatch(unsigned long mode, unsigned long offset, 29 34 unsigned long len, char __user *selector)
+22
include/linux/syscall_user_dispatch_types.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + #ifndef _SYSCALL_USER_DISPATCH_TYPES_H 3 + #define _SYSCALL_USER_DISPATCH_TYPES_H 4 + 5 + #include <linux/types.h> 6 + 7 + #ifdef CONFIG_GENERIC_ENTRY 8 + 9 + struct syscall_user_dispatch { 10 + char __user *selector; 11 + unsigned long offset; 12 + unsigned long len; 13 + bool on_dispatch; 14 + }; 15 + 16 + #else 17 + 18 + struct syscall_user_dispatch {}; 19 + 20 + #endif 21 + 22 + #endif /* _SYSCALL_USER_DISPATCH_TYPES_H */