summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/syscall_64.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2011-11-12 01:07:41 +0100
committerH. Peter Anvin <hpa@linux.intel.com>2011-11-17 22:35:37 +0100
commit303395ac3bf3e2cb488435537d416bc840438fcb (patch)
treef979e40575b28ba5bb851d6de0bb0ae5b91541c3 /arch/x86/kernel/syscall_64.c
parentchecksyscalls: Use arch/x86/syscalls/syscall_32.tbl as source (diff)
downloadlinux-303395ac3bf3e2cb488435537d416bc840438fcb.tar.xz
linux-303395ac3bf3e2cb488435537d416bc840438fcb.zip
x86: Generate system call tables and unistd_*.h from tables
Generate system call tables and unistd_*.h automatically from the tables in arch/x86/syscalls. All other information, like NR_syscalls, is auto-generated, some of which is in asm-offsets_*.c. This allows us to keep all the system call information in one place, and allows for kernel space and user space to see different information; this is currently used for the ia32 system call numbers when building the 64-bit kernel, but will be used by the x32 ABI in the near future. This also removes some gratuitious differences between i386, x86-64 and ia32; in particular, now all system call tables are generated with the same mechanism. Cc: H. J. Lu <hjl.tools@gmail.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/kernel/syscall_64.c')
-rw-r--r--arch/x86/kernel/syscall_64.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/arch/x86/kernel/syscall_64.c b/arch/x86/kernel/syscall_64.c
index 0edfafa1b269..7ac7943be02c 100644
--- a/arch/x86/kernel/syscall_64.c
+++ b/arch/x86/kernel/syscall_64.c
@@ -5,15 +5,11 @@
#include <linux/cache.h>
#include <asm/asm-offsets.h>
-#define __NO_STUBS
+#define __SYSCALL_64(nr, sym, compat) extern asmlinkage void sym(void) ;
+#include <asm/syscalls_64.h>
+#undef __SYSCALL_64
-#define __SYSCALL(nr, sym) extern asmlinkage void sym(void) ;
-#undef _ASM_X86_UNISTD_64_H
-#include <asm/unistd_64.h>
-
-#undef __SYSCALL
-#define __SYSCALL(nr, sym) [nr] = sym,
-#undef _ASM_X86_UNISTD_64_H
+#define __SYSCALL_64(nr, sym, compat) [nr] = sym,
typedef void (*sys_call_ptr_t)(void);
@@ -25,5 +21,5 @@ const sys_call_ptr_t sys_call_table[__NR_syscall_max+1] = {
* when the & below is removed.
*/
[0 ... __NR_syscall_max] = &sys_ni_syscall,
-#include <asm/unistd_64.h>
+#include <asm/syscalls_64.h>
};