aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/entry/syscall_x32.c
diff options
context:
space:
mode:
authorGravatar Masahiro Yamada <masahiroy@kernel.org> 2021-05-17 16:38:10 +0900
committerGravatar Thomas Gleixner <tglx@linutronix.de> 2021-05-20 15:03:58 +0200
commit6218d0f6b8dece1f2e82f0a47a0e6b8ecb631ef6 (patch)
tree1910b09602125fb2b47a9243a2001b26a80b4f8e /arch/x86/entry/syscall_x32.c
parentx86/entry/x32: Rename __x32_compat_sys_* to __x64_compat_sys_* (diff)
downloadlinux-6218d0f6b8dece1f2e82f0a47a0e6b8ecb631ef6.tar.gz
linux-6218d0f6b8dece1f2e82f0a47a0e6b8ecb631ef6.tar.bz2
linux-6218d0f6b8dece1f2e82f0a47a0e6b8ecb631ef6.zip
x86/syscalls: Switch to generic syscalltbl.sh
Many architectures duplicate similar shell scripts. Convert x86 and UML to use scripts/syscalltbl.sh. The generic script generates seperate headers for x86/64 and x86/x32 syscalls, while the x86 specific script coalesced them into one. Adjust the code accordingly. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20210517073815.97426-3-masahiroy@kernel.org
Diffstat (limited to 'arch/x86/entry/syscall_x32.c')
-rw-r--r--arch/x86/entry/syscall_x32.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/arch/x86/entry/syscall_x32.c b/arch/x86/entry/syscall_x32.c
index 3fea8fb9cd6a..6d2ef887d7b6 100644
--- a/arch/x86/entry/syscall_x32.c
+++ b/arch/x86/entry/syscall_x32.c
@@ -8,16 +8,11 @@
#include <asm/unistd.h>
#include <asm/syscall.h>
-#define __SYSCALL_64(nr, sym)
+#define __SYSCALL(nr, sym) extern long __x64_##sym(const struct pt_regs *);
+#include <asm/syscalls_x32.h>
+#undef __SYSCALL
-#define __SYSCALL_X32(nr, sym) extern long __x64_##sym(const struct pt_regs *);
-#define __SYSCALL_COMMON(nr, sym) extern long __x64_##sym(const struct pt_regs *);
-#include <asm/syscalls_64.h>
-#undef __SYSCALL_X32
-#undef __SYSCALL_COMMON
-
-#define __SYSCALL_X32(nr, sym) [nr] = __x64_##sym,
-#define __SYSCALL_COMMON(nr, sym) [nr] = __x64_##sym,
+#define __SYSCALL(nr, sym) [nr] = __x64_##sym,
asmlinkage const sys_call_ptr_t x32_sys_call_table[__NR_x32_syscall_max+1] = {
/*
@@ -25,5 +20,5 @@ asmlinkage const sys_call_ptr_t x32_sys_call_table[__NR_x32_syscall_max+1] = {
* when the & below is removed.
*/
[0 ... __NR_x32_syscall_max] = &__x64_sys_ni_syscall,
-#include <asm/syscalls_64.h>
+#include <asm/syscalls_x32.h>
};