Skip to content

Commit

Permalink
x32: Add x32 system calls to syscall/syscall_64.tbl
Browse files Browse the repository at this point in the history
Split the 64-bit system calls into "64" (64-bit only) and "common"
(64-bit or x32) and add the x32 system call numbers.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
  • Loading branch information
H. Peter Anvin committed Feb 20, 2012
1 parent 2c73ce7 commit 6630f11
Show file tree
Hide file tree
Showing 6 changed files with 317 additions and 274 deletions.
2 changes: 2 additions & 0 deletions arch/x86/kernel/asm-offsets_64.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include <asm/ia32.h>

#define __SYSCALL_64(nr, sym, compat) [nr] = 1,
#define __SYSCALL_COMMON(nr, sym, compat) [nr] = 1,
#define __SYSCALL_X32(nr, sym, compat) /* Not yet */
static char syscalls_64[] = {
#include <asm/syscalls_64.h>
};
Expand Down
3 changes: 3 additions & 0 deletions arch/x86/kernel/syscall_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
#include <linux/cache.h>
#include <asm/asm-offsets.h>

#define __SYSCALL_COMMON(nr, sym, compat) __SYSCALL_64(nr, sym, compat)
#define __SYSCALL_X32(nr, sym, compat) /* Not yet */

#define __SYSCALL_64(nr, sym, compat) extern asmlinkage void sym(void) ;
#include <asm/syscalls_64.h>
#undef __SYSCALL_64
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/syscalls/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ syshdr_pfx_unistd_32_ia32 := ia32_
$(out)/unistd_32_ia32.h: $(syscall32) $(syshdr)
$(call if_changed,syshdr)

syshdr_abi_unistd_64 := 64
syshdr_abi_unistd_64 := common,64
$(out)/unistd_64.h: $(syscall64) $(syshdr)
$(call if_changed,syshdr)

Expand Down
Loading

0 comments on commit 6630f11

Please sign in to comment.