summaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/asm/unistd.h
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2015-01-06 16:42:32 +0000
committerCatalin Marinas <catalin.marinas@arm.com>2015-01-27 09:38:07 +0000
commit0156411b1828771c09c92f034e7b81f702b84f07 (patch)
treea0c06d493a7e852ed9e736c42be740927c21094d /arch/arm64/include/asm/unistd.h
parent54e45c169dbce43cf46d00eb1521b655b6e4f9e9 (diff)
downloadlinux-0156411b1828771c09c92f034e7b81f702b84f07.tar.bz2
arm64: Implement the compat_sys_call_table in C
Unlike the sys_call_table[], the compat one was implemented in sys32.S making it impossible to notice discrepancies between the number of compat syscalls and the __NR_compat_syscalls macro, the latter having to be defined in asm/unistd.h as including asm/unistd32.h would cause conflicts on __NR_* definitions. With this patch, incorrect __NR_compat_syscalls values will result in a build-time error. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Suggested-by: Mark Rutland <mark.rutland@arm.com> Acked-by: Mark Rutland <mark.rutland@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/unistd.h')
-rw-r--r--arch/arm64/include/asm/unistd.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/unistd.h b/arch/arm64/include/asm/unistd.h
index b780c6c76eec..159b44fff258 100644
--- a/arch/arm64/include/asm/unistd.h
+++ b/arch/arm64/include/asm/unistd.h
@@ -48,6 +48,9 @@
#endif
#define __ARCH_WANT_SYS_CLONE
+
+#ifndef __COMPAT_SYSCALL_NR
#include <uapi/asm/unistd.h>
+#endif
#define NR_syscalls (__NR_syscalls)