aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/unistd.h
diff options
context:
space:
mode:
authorBrian Gerst <brgerst@gmail.com>2020-03-13 15:51:34 -0400
committerThomas Gleixner <tglx@linutronix.de>2020-03-21 16:03:21 +0100
commit0872098804b5f44bab91f80b6df55df32894fee3 (patch)
tree1cfe6e6c1d6a4d5c9c083b288780af56364ca0bb /arch/x86/include/asm/unistd.h
parent2e487c357917b98adc6a6dafa612c435cad1af41 (diff)
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/include/asm/unistd.h')
-rw-r--r--arch/x86/include/asm/unistd.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/include/asm/unistd.h b/arch/x86/include/asm/unistd.h
index a7dd080749ce..c1c3d31b15c0 100644
--- a/arch/x86/include/asm/unistd.h
+++ b/arch/x86/include/asm/unistd.h
@@ -13,10 +13,13 @@
# define __ARCH_WANT_SYS_OLD_MMAP
# define __ARCH_WANT_SYS_OLD_SELECT
+# define __NR_ia32_syscall_max __NR_syscall_max
+
# else
# include <asm/unistd_64.h>
# include <asm/unistd_64_x32.h>
+# include <asm/unistd_32_ia32.h>
# define __ARCH_WANT_SYS_TIME
# define __ARCH_WANT_SYS_UTIME
# define __ARCH_WANT_COMPAT_SYS_PREADV64
@@ -26,6 +29,10 @@
# endif
+# define NR_syscalls (__NR_syscall_max + 1)
+# define X32_NR_syscalls (__NR_x32_syscall_max + 1)
+# define IA32_NR_syscalls (__NR_ia32_syscall_max + 1)
+
# define __ARCH_WANT_NEW_STAT
# define __ARCH_WANT_OLD_READDIR
# define __ARCH_WANT_OLD_STAT