x32: Generate <asm/unistd_64_x32.h>
authorH. Peter Anvin <hpa@zytor.com>
Tue, 14 Feb 2012 22:46:23 +0000 (14:46 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Mon, 20 Feb 2012 20:52:04 +0000 (12:52 -0800)
Generate macros for the *kernel* code to use to refer to x32 system
calls.  These have an __NR_x32_ prefix and do not include
__X32_SYSCALL_BIT.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
arch/x86/include/asm/unistd.h
arch/x86/syscalls/Makefile

index dab5349f14fc6c047b4f9a7b66a21122c52fbb50..7a48a55574702b1612501a28bbca81f48e8d9f19 100644 (file)
@@ -17,6 +17,7 @@
 # else
 
 #  include <asm/unistd_64.h>
+#  include <asm/unistd_64_x32.h>
 #  define __ARCH_WANT_COMPAT_SYS_TIME
 
 # endif
index 8051c3134ad1e7eb5bdf1f165b354742381246e1..3236aebc828d45eb7f8761b57d23861e3b46c7ad 100644 (file)
@@ -35,6 +35,11 @@ syshdr_abi_unistd_64 := common,64
 $(out)/unistd_64.h: $(syscall64) $(syshdr)
        $(call if_changed,syshdr)
 
+syshdr_abi_unistd_64_x32 := x32
+syshdr_pfx_unistd_64_x32 := x32_
+$(out)/unistd_64_x32.h: $(syscall64) $(syshdr)
+       $(call if_changed,syshdr)
+
 $(out)/syscalls_32.h: $(syscall32) $(systbl)
        $(call if_changed,systbl)
 $(out)/syscalls_64.h: $(syscall64) $(systbl)
@@ -42,7 +47,7 @@ $(out)/syscalls_64.h: $(syscall64) $(systbl)
 
 syshdr-y                       += unistd_32.h unistd_64.h unistd_x32.h
 syshdr-y                       += syscalls_32.h
-syshdr-$(CONFIG_X86_64)                += unistd_32_ia32.h
+syshdr-$(CONFIG_X86_64)                += unistd_32_ia32.h unistd_64_x32.h
 syshdr-$(CONFIG_X86_64)                += syscalls_64.h
 
 targets        += $(syshdr-y)