diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2021-05-17 16:38:10 +0900 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2021-05-20 15:03:58 +0200 |
commit | 6218d0f6b8dece1f2e82f0a47a0e6b8ecb631ef6 (patch) | |
tree | 1910b09602125fb2b47a9243a2001b26a80b4f8e /arch/x86/entry/syscall_32.c | |
parent | 2e958a8a510d956ec8528f0bd20e309b5bb5156c (diff) |
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_32.c')
-rw-r--r-- | arch/x86/entry/syscall_32.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/x86/entry/syscall_32.c b/arch/x86/entry/syscall_32.c index 86eb0d89d46f..70bf46e73b1c 100644 --- a/arch/x86/entry/syscall_32.c +++ b/arch/x86/entry/syscall_32.c @@ -8,12 +8,18 @@ #include <asm/unistd.h> #include <asm/syscall.h> -#define __SYSCALL_I386(nr, sym) extern long __ia32_##sym(const struct pt_regs *); +#ifdef CONFIG_IA32_EMULATION +#define __SYSCALL_WITH_COMPAT(nr, native, compat) __SYSCALL(nr, compat) +#else +#define __SYSCALL_WITH_COMPAT(nr, native, compat) __SYSCALL(nr, native) +#endif + +#define __SYSCALL(nr, sym) extern long __ia32_##sym(const struct pt_regs *); #include <asm/syscalls_32.h> -#undef __SYSCALL_I386 +#undef __SYSCALL -#define __SYSCALL_I386(nr, sym) [nr] = __ia32_##sym, +#define __SYSCALL(nr, sym) [nr] = __ia32_##sym, __visible const sys_call_ptr_t ia32_sys_call_table[__NR_ia32_syscall_max+1] = { /* |