summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/syscall_64.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/syscall_64.c')
-rw-r--r--arch/x86/kernel/syscall_64.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/x86/kernel/syscall_64.c b/arch/x86/kernel/syscall_64.c
index de87d6008295..f5d5f6aac664 100644
--- a/arch/x86/kernel/syscall_64.c
+++ b/arch/x86/kernel/syscall_64.c
@@ -3,6 +3,7 @@
#include <linux/linkage.h>
#include <linux/sys.h>
#include <linux/cache.h>
+#include <linux/errno.h>
#include <asm/asm-offsets.h>
#define __NO_STUBS
@@ -27,3 +28,16 @@ const sys_call_ptr_t sys_call_table[__NR_syscall_max+1] = {
[0 ... __NR_syscall_max] = &sys_ni_syscall,
#include <asm/unistd_64.h>
};
+
+long arch_call_syscall(unsigned int nr, long arg0, long arg1, long arg2,
+ long arg3, long arg4, long arg5)
+{
+ typedef asmlinkage long (*syscall_fn_t)(long, long, long, long, long,
+ long);
+ syscall_fn_t *calls = (syscall_fn_t *)sys_call_table;
+
+ if (nr > __NR_syscall_max)
+ return -ENOSYS;
+
+ return calls[nr](arg0, arg1, arg2, arg3, arg4, arg5);
+}