mirror of
https://github.com/torvalds/linux.git
synced 2026-03-14 03:16:14 +01:00
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 <thomas.weissschuh@linutronix.de>
Link: https://patch.msgid.link/20250704141243.a68366f6acc3.If8587a4aafdb90644fc6d0b2f5e31a2d1887915f@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
2a713f04ed
commit
ac1ad16f10
5 changed files with 9 additions and 62 deletions
|
|
@ -9,8 +9,8 @@
|
|||
#include <kern_util.h>
|
||||
#include <sysdep/ptrace.h>
|
||||
#include <sysdep/ptrace_user.h>
|
||||
#include <sysdep/syscalls.h>
|
||||
#include <linux/time-internal.h>
|
||||
#include <asm/syscall.h>
|
||||
#include <asm/unistd.h>
|
||||
#include <asm/delay.h>
|
||||
|
||||
|
|
@ -43,7 +43,14 @@ void handle_syscall(struct uml_pt_regs *r)
|
|||
tt_extra_sched_jiffies += 1;
|
||||
|
||||
if (syscall >= 0 && syscall < __NR_syscalls) {
|
||||
unsigned long ret = EXECUTE_SYSCALL(syscall, regs);
|
||||
unsigned long ret;
|
||||
|
||||
ret = (*sys_call_table[syscall])(UPT_SYSCALL_ARG1(®s->regs),
|
||||
UPT_SYSCALL_ARG2(®s->regs),
|
||||
UPT_SYSCALL_ARG3(®s->regs),
|
||||
UPT_SYSCALL_ARG4(®s->regs),
|
||||
UPT_SYSCALL_ARG5(®s->regs),
|
||||
UPT_SYSCALL_ARG6(®s->regs));
|
||||
|
||||
PT_REGS_SET_SYSCALL_RETURN(regs, ret);
|
||||
|
||||
|
|
|
|||
|
|
@ -44,18 +44,6 @@
|
|||
#include "ptrace_64.h"
|
||||
#endif
|
||||
|
||||
struct syscall_args {
|
||||
unsigned long args[6];
|
||||
};
|
||||
|
||||
#define SYSCALL_ARGS(r) ((struct syscall_args) \
|
||||
{ .args = { UPT_SYSCALL_ARG1(r), \
|
||||
UPT_SYSCALL_ARG2(r), \
|
||||
UPT_SYSCALL_ARG3(r), \
|
||||
UPT_SYSCALL_ARG4(r), \
|
||||
UPT_SYSCALL_ARG5(r), \
|
||||
UPT_SYSCALL_ARG6(r) } } )
|
||||
|
||||
extern unsigned long host_fp_size;
|
||||
|
||||
struct uml_pt_regs {
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifdef __i386__
|
||||
#include "syscalls_32.h"
|
||||
#else
|
||||
#include "syscalls_64.h"
|
||||
#endif
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2000 - 2008 Jeff Dike (jdike@{addtoit,linux.intel}.com)
|
||||
* Licensed under the GPL
|
||||
*/
|
||||
|
||||
#include <asm/unistd.h>
|
||||
#include <sysdep/ptrace.h>
|
||||
|
||||
typedef long syscall_handler_t(struct syscall_args);
|
||||
|
||||
extern syscall_handler_t *sys_call_table[];
|
||||
|
||||
#define EXECUTE_SYSCALL(syscall, regs) \
|
||||
((*sys_call_table[syscall]))(SYSCALL_ARGS(®s->regs))
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
/*
|
||||
* Copyright 2003 PathScale, Inc.
|
||||
*
|
||||
* Licensed under the GPL
|
||||
*/
|
||||
|
||||
#ifndef __SYSDEP_X86_64_SYSCALLS_H__
|
||||
#define __SYSDEP_X86_64_SYSCALLS_H__
|
||||
|
||||
#include <linux/msg.h>
|
||||
#include <linux/shm.h>
|
||||
|
||||
typedef long syscall_handler_t(long, long, long, long, long, long);
|
||||
|
||||
extern syscall_handler_t *sys_call_table[];
|
||||
|
||||
#define EXECUTE_SYSCALL(syscall, regs) \
|
||||
(((*sys_call_table[syscall]))(UPT_SYSCALL_ARG1(®s->regs), \
|
||||
UPT_SYSCALL_ARG2(®s->regs), \
|
||||
UPT_SYSCALL_ARG3(®s->regs), \
|
||||
UPT_SYSCALL_ARG4(®s->regs), \
|
||||
UPT_SYSCALL_ARG5(®s->regs), \
|
||||
UPT_SYSCALL_ARG6(®s->regs)))
|
||||
|
||||
extern syscall_handler_t sys_modify_ldt;
|
||||
extern syscall_handler_t sys_arch_prctl;
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue