Commit c86d2cad authored by Guo Ren's avatar Guo Ren Committed by Palmer Dabbelt

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: default avatarGuo Ren <guoren@linux.alibaba.com>
Signed-off-by: default avatarGuo Ren <guoren@kernel.org>
Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Tested-by: default avatarHeiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20220405071314.3225832-8-guoren@kernel.orgSigned-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
parent 84a0c977
...@@ -383,7 +383,7 @@ __SYSCALL(__NR_syslog, sys_syslog) ...@@ -383,7 +383,7 @@ __SYSCALL(__NR_syslog, sys_syslog)
/* kernel/ptrace.c */ /* kernel/ptrace.c */
#define __NR_ptrace 117 #define __NR_ptrace 117
__SYSCALL(__NR_ptrace, sys_ptrace) __SC_COMP(__NR_ptrace, sys_ptrace, compat_sys_ptrace)
/* kernel/sched/core.c */ /* kernel/sched/core.c */
#define __NR_sched_setparam 118 #define __NR_sched_setparam 118
...@@ -779,7 +779,7 @@ __SYSCALL(__NR_rseq, sys_rseq) ...@@ -779,7 +779,7 @@ __SYSCALL(__NR_rseq, sys_rseq)
#define __NR_kexec_file_load 294 #define __NR_kexec_file_load 294
__SYSCALL(__NR_kexec_file_load, sys_kexec_file_load) __SYSCALL(__NR_kexec_file_load, sys_kexec_file_load)
/* 295 through 402 are unassigned to sync up with generic numbers, don't use */ /* 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 #define __NR_clock_gettime64 403
__SYSCALL(__NR_clock_gettime64, sys_clock_gettime) __SYSCALL(__NR_clock_gettime64, sys_clock_gettime)
#define __NR_clock_settime64 404 #define __NR_clock_settime64 404
......
...@@ -383,7 +383,7 @@ __SYSCALL(__NR_syslog, sys_syslog) ...@@ -383,7 +383,7 @@ __SYSCALL(__NR_syslog, sys_syslog)
/* kernel/ptrace.c */ /* kernel/ptrace.c */
#define __NR_ptrace 117 #define __NR_ptrace 117
__SYSCALL(__NR_ptrace, sys_ptrace) __SC_COMP(__NR_ptrace, sys_ptrace, compat_sys_ptrace)
/* kernel/sched/core.c */ /* kernel/sched/core.c */
#define __NR_sched_setparam 118 #define __NR_sched_setparam 118
...@@ -779,7 +779,7 @@ __SYSCALL(__NR_rseq, sys_rseq) ...@@ -779,7 +779,7 @@ __SYSCALL(__NR_rseq, sys_rseq)
#define __NR_kexec_file_load 294 #define __NR_kexec_file_load 294
__SYSCALL(__NR_kexec_file_load, sys_kexec_file_load) __SYSCALL(__NR_kexec_file_load, sys_kexec_file_load)
/* 295 through 402 are unassigned to sync up with generic numbers, don't use */ /* 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 #define __NR_clock_gettime64 403
__SYSCALL(__NR_clock_gettime64, sys_clock_gettime) __SYSCALL(__NR_clock_gettime64, sys_clock_gettime)
#define __NR_clock_settime64 404 #define __NR_clock_settime64 404
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment