diff options
author | Brian Gerst <brgerst@gmail.com> | 2020-03-13 15:51:34 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2020-03-21 16:03:21 +0100 |
commit | 0872098804b5f44bab91f80b6df55df32894fee3 (patch) | |
tree | 1cfe6e6c1d6a4d5c9c083b288780af56364ca0bb /arch/x86/um/user-offsets.c | |
parent | 2e487c357917b98adc6a6dafa612c435cad1af41 (diff) | |
download | linux-0872098804b5f44bab91f80b6df55df32894fee3.tar.gz linux-0872098804b5f44bab91f80b6df55df32894fee3.tar.bz2 linux-0872098804b5f44bab91f80b6df55df32894fee3.zip |
x86/entry: Move max syscall number calculation to syscallhdr.sh
Instead of using an array in asm-offsets to calculate the max syscall
number, calculate it when writing out the syscall headers.
Signed-off-by: Brian Gerst <brgerst@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200313195144.164260-9-brgerst@gmail.com
Diffstat (limited to 'arch/x86/um/user-offsets.c')
-rw-r--r-- | arch/x86/um/user-offsets.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/arch/x86/um/user-offsets.c b/arch/x86/um/user-offsets.c index 5b37b7f952dd..c51dd8363d25 100644 --- a/arch/x86/um/user-offsets.c +++ b/arch/x86/um/user-offsets.c @@ -9,18 +9,6 @@ #include <linux/ptrace.h> #include <asm/types.h> -#ifdef __i386__ -#define __SYSCALL_I386(nr, sym, qual) [nr] = 1, -static char syscalls[] = { -#include <asm/syscalls_32.h> -}; -#else -#define __SYSCALL_64(nr, sym, qual) [nr] = 1, -static char syscalls[] = { -#include <asm/syscalls_64.h> -}; -#endif - #define DEFINE(sym, val) \ asm volatile("\n->" #sym " %0 " #val : : "i" (val)) @@ -94,7 +82,4 @@ void foo(void) DEFINE(UM_PROT_READ, PROT_READ); DEFINE(UM_PROT_WRITE, PROT_WRITE); DEFINE(UM_PROT_EXEC, PROT_EXEC); - - DEFINE(__NR_syscall_max, sizeof(syscalls) - 1); - DEFINE(NR_syscalls, sizeof(syscalls)); } |