Skip to content

Commit ac1ad16

Browse files
committed
um: simplify syscall header files
Since Thomas's recent commit 2af10530639b ("um/x86: Add system call table to header file") , we now have two extern declarations of the syscall table, one internal and one external, and they don't even match on 32-bit. Clean this up and remove all the extra code. Reviewed-by: Thomas Weißschuh <[email protected]> Link: https://patch.msgid.link/20250704141243.a68366f6acc3.If8587a4aafdb90644fc6d0b2f5e31a2d1887915f@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent 2a713f0 commit ac1ad16

File tree

5 files changed

+9
-62
lines changed

5 files changed

+9
-62
lines changed

arch/um/kernel/skas/syscall.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
#include <kern_util.h>
1010
#include <sysdep/ptrace.h>
1111
#include <sysdep/ptrace_user.h>
12-
#include <sysdep/syscalls.h>
1312
#include <linux/time-internal.h>
13+
#include <asm/syscall.h>
1414
#include <asm/unistd.h>
1515
#include <asm/delay.h>
1616

@@ -43,7 +43,14 @@ void handle_syscall(struct uml_pt_regs *r)
4343
tt_extra_sched_jiffies += 1;
4444

4545
if (syscall >= 0 && syscall < __NR_syscalls) {
46-
unsigned long ret = EXECUTE_SYSCALL(syscall, regs);
46+
unsigned long ret;
47+
48+
ret = (*sys_call_table[syscall])(UPT_SYSCALL_ARG1(&regs->regs),
49+
UPT_SYSCALL_ARG2(&regs->regs),
50+
UPT_SYSCALL_ARG3(&regs->regs),
51+
UPT_SYSCALL_ARG4(&regs->regs),
52+
UPT_SYSCALL_ARG5(&regs->regs),
53+
UPT_SYSCALL_ARG6(&regs->regs));
4754

4855
PT_REGS_SET_SYSCALL_RETURN(regs, ret);
4956

arch/x86/um/shared/sysdep/ptrace.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,6 @@
4444
#include "ptrace_64.h"
4545
#endif
4646

47-
struct syscall_args {
48-
unsigned long args[6];
49-
};
50-
51-
#define SYSCALL_ARGS(r) ((struct syscall_args) \
52-
{ .args = { UPT_SYSCALL_ARG1(r), \
53-
UPT_SYSCALL_ARG2(r), \
54-
UPT_SYSCALL_ARG3(r), \
55-
UPT_SYSCALL_ARG4(r), \
56-
UPT_SYSCALL_ARG5(r), \
57-
UPT_SYSCALL_ARG6(r) } } )
58-
5947
extern unsigned long host_fp_size;
6048

6149
struct uml_pt_regs {

arch/x86/um/shared/sysdep/syscalls.h

Lines changed: 0 additions & 6 deletions
This file was deleted.

arch/x86/um/shared/sysdep/syscalls_32.h

Lines changed: 0 additions & 14 deletions
This file was deleted.

arch/x86/um/shared/sysdep/syscalls_64.h

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)