RISC-V: Update syscall list for 32-bit support.
PATCH 1/1 RISC-V: Update syscall list for 32-bit support.
32-bit RISC-V uses _llseek instead of lseek as syscall number 62. Update syscall list from open-embedded build, primarily because 32-bit RISC-V requires statx support.
Tested with cross gcc testsuite runs for rv32 and rv64, with the pending statx patch also applied.
--- linux-user/riscv/syscall_nr.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)
linux-user/riscv/syscall_nr.h +14 -1
@@ -72,7 +72,11 @@#define TARGET_NR_pipe2 59#define TARGET_NR_quotactl 60#define TARGET_NR_getdents64 61 +#ifdef TARGET_RISCV32 +#define TARGET_NR__llseek 62 +#else #define TARGET_NR_lseek 62 +#endif #define TARGET_NR_read 63#define TARGET_NR_write 64#define TARGET_NR_readv 65
@@ -286,7 +290,16 @@#define TARGET_NR_membarrier 283#define TARGET_NR_mlock2 284#define TARGET_NR_copy_file_range 285 +#define TARGET_NR_preadv2 286 +#define TARGET_NR_pwritev2 287 +#define TARGET_NR_pkey_mprotect 288 +#define TARGET_NR_pkey_alloc 289 +#define TARGET_NR_pkey_free 290 +#define TARGET_NR_statx 291 +#define TARGET_NR_io_pgetevents 292 +#define TARGET_NR_rseq 293 +#define TARGET_NR_kexec_file_load 294 -#define TARGET_NR_syscalls (TARGET_NR_copy_file_range + 1) +#define TARGET_NR_syscalls (TARGET_NR_kexec_file_load + 1)#endif
Signature · 1 line
2.7.4
Le 19/06/2019 à 00:32, Jim Wilson a écrit :
Quoted 37 lines
32-bit RISC-V uses
_llseekinstead of lseek as syscall number 62. Update syscall list from open-embedded build, primarily because 32-bit RISC-V requires statx support.Tested with cross gcc testsuite runs for rv32 and rv64, with the pending statx patch also applied.
Signed-off-by Jim Wilson <[email protected]>--- linux-user/riscv/syscall_nr.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)linux-user/riscv/syscall_nr.h +8
-0@@ -72,7 +72,11 @@#define TARGET_NR_pipe2 59#define TARGET_NR_quotactl 60#define TARGET_NR_getdents64 61 +#ifdef TARGET_RISCV32 +#define TARGET_NR__llseek 62 +#else #define TARGET_NR_lseek 62 +#endif #define TARGET_NR_read 63#define TARGET_NR_write 64#define TARGET_NR_readv 65@@ -286,7 +290,16 @@#define TARGET_NR_membarrier 283#define TARGET_NR_mlock2 284#define TARGET_NR_copy_file_range 285 +#define TARGET_NR_preadv2 286 +#define TARGET_NR_pwritev2 287 +#define TARGET_NR_pkey_mprotect 288 +#define TARGET_NR_pkey_alloc 289
linux-user/riscv/syscall_nr.h line 305
Quoted 10 lines
linux-user/riscv/syscall_nr.h +6
-1+#define TARGET_NR_pkey_free 290 +#define TARGET_NR_statx 291 +#define TARGET_NR_io_pgetevents 292 +#define TARGET_NR_rseq 293 +#define TARGET_NR_kexec_file_load 294 -#define TARGET_NR_syscalls (TARGET_NR_copy_file_range + 1) +#define TARGET_NR_syscalls (TARGET_NR_kexec_file_load + 1)#endif
Le 19/06/2019 à 00:32, Jim Wilson a écrit :
Quoted 37 lines
32-bit RISC-V uses
_llseekinstead of lseek as syscall number 62. Update syscall list from open-embedded build, primarily because 32-bit RISC-V requires statx support.Tested with cross gcc testsuite runs for rv32 and rv64, with the pending statx patch also applied.
Signed-off-by Jim Wilson <[email protected]>--- linux-user/riscv/syscall_nr.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)linux-user/riscv/syscall_nr.h +8
-0@@ -72,7 +72,11 @@#define TARGET_NR_pipe2 59#define TARGET_NR_quotactl 60#define TARGET_NR_getdents64 61 +#ifdef TARGET_RISCV32 +#define TARGET_NR__llseek 62 +#else #define TARGET_NR_lseek 62 +#endif #define TARGET_NR_read 63#define TARGET_NR_write 64#define TARGET_NR_readv 65@@ -286,7 +290,16 @@#define TARGET_NR_membarrier 283#define TARGET_NR_mlock2 284#define TARGET_NR_copy_file_range 285 +#define TARGET_NR_preadv2 286 +#define TARGET_NR_pwritev2 287 +#define TARGET_NR_pkey_mprotect 288 +#define TARGET_NR_pkey_alloc 289
linux-user/riscv/syscall_nr.h line 305
Quoted 10 lines
linux-user/riscv/syscall_nr.h +6
-1+#define TARGET_NR_pkey_free 290 +#define TARGET_NR_statx 291 +#define TARGET_NR_io_pgetevents 292 +#define TARGET_NR_rseq 293 +#define TARGET_NR_kexec_file_load 294 -#define TARGET_NR_syscalls (TARGET_NR_copy_file_range + 1) +#define TARGET_NR_syscalls (TARGET_NR_kexec_file_load + 1)#endif