aboutsummaryrefslogtreecommitdiffstats
path: root/tools/include/uapi
diff options
context:
space:
mode:
authorGuo Ren <guoren@linux.alibaba.com>2022-04-05 15:13:01 +0800
committerPalmer Dabbelt <palmer@rivosinc.com>2022-04-26 13:36:01 -0700
commitc86d2cad193a5c7f9b92467955bb7fb6642b9e80 (patch)
treee67a2bc4678a327da9564b12b157c4b9d1ea138d /tools/include/uapi
parentasm-generic: compat: Cleanup duplicate definitions (diff)
downloadlinux-dev-c86d2cad193a5c7f9b92467955bb7fb6642b9e80.tar.xz
linux-dev-c86d2cad193a5c7f9b92467955bb7fb6642b9e80.zip
syscalls: compat: Fix the missing part for __SYSCALL_COMPAT
Make "uapi asm unistd.h" could be used for architectures' COMPAT mode. The __SYSCALL_COMPAT is first used in riscv. Signed-off-by: Guo Ren <guoren@linux.alibaba.com> Signed-off-by: Guo Ren <guoren@kernel.org> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Tested-by: Heiko Stuebner <heiko@sntech.de> Link: https://lore.kernel.org/r/20220405071314.3225832-8-guoren@kernel.org Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'tools/include/uapi')
-rw-r--r--tools/include/uapi/asm-generic/unistd.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/include/uapi/asm-generic/unistd.h b/tools/include/uapi/asm-generic/unistd.h
index 1c48b0ae3ba3..45fa180cc56a 100644
--- a/tools/include/uapi/asm-generic/unistd.h
+++ b/tools/include/uapi/asm-generic/unistd.h
@@ -383,7 +383,7 @@ __SYSCALL(__NR_syslog, sys_syslog)
/* kernel/ptrace.c */
#define __NR_ptrace 117
-__SYSCALL(__NR_ptrace, sys_ptrace)
+__SC_COMP(__NR_ptrace, sys_ptrace, compat_sys_ptrace)
/* kernel/sched/core.c */
#define __NR_sched_setparam 118
@@ -779,7 +779,7 @@ __SYSCALL(__NR_rseq, sys_rseq)
#define __NR_kexec_file_load 294
__SYSCALL(__NR_kexec_file_load, sys_kexec_file_load)
/* 295 through 402 are unassigned to sync up with generic numbers, don't use */
-#if __BITS_PER_LONG == 32
+#if defined(__SYSCALL_COMPAT) || __BITS_PER_LONG == 32
#define __NR_clock_gettime64 403
__SYSCALL(__NR_clock_gettime64, sys_clock_gettime)
#define __NR_clock_settime64 404