Skip to content

Commit 55b899a

Browse files
author
Kent Overstreet
committed
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>
1 parent 959d8dc commit 55b899a

File tree

3 files changed

+24
-9
lines changed

3 files changed

+24
-9
lines changed

include/linux/sched.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include <linux/sched/prio.h>
2929
#include <linux/sched/types.h>
3030
#include <linux/signal_types.h>
31-
#include <linux/syscall_user_dispatch.h>
31+
#include <linux/syscall_user_dispatch_types.h>
3232
#include <linux/mm_types_task.h>
3333
#include <linux/task_io_accounting.h>
3434
#include <linux/posix-timers_types.h>

include/linux/syscall_user_dispatch.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,10 @@
66
#define _SYSCALL_USER_DISPATCH_H
77

88
#include <linux/thread_info.h>
9+
#include <linux/syscall_user_dispatch_types.h>
910

1011
#ifdef CONFIG_GENERIC_ENTRY
1112

12-
struct syscall_user_dispatch {
13-
char __user *selector;
14-
unsigned long offset;
15-
unsigned long len;
16-
bool on_dispatch;
17-
};
18-
1913
int set_syscall_user_dispatch(unsigned long mode, unsigned long offset,
2014
unsigned long len, char __user *selector);
2115

@@ -29,7 +23,6 @@ int syscall_user_dispatch_set_config(struct task_struct *task, unsigned long siz
2923
void __user *data);
3024

3125
#else
32-
struct syscall_user_dispatch {};
3326

3427
static inline int set_syscall_user_dispatch(unsigned long mode, unsigned long offset,
3528
unsigned long len, char __user *selector)
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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 */

0 commit comments

Comments
 (0)