Fix sync_file_range for Mips
PATCH 1/1 Fix sync_file_range for Mips
For Mips there is a second argument which is actually a padding. This can be confirmed in glibc.
--- testcases/kernel/syscalls/sync_file_range/sync_file_range01.c | 5 +++++ 1 file changed, 5 insertions(+)
testcases/kernel/syscalls/sync_file_range/sync_file_range01.c +5 -0
@@ -216,6 +216,11 @@ static inline long syncfilerange(int fd, off64_t offset, off64_t nbytes,return ltp_syscall (__NR_sync_file_range, fd, (int )(offset >>32 ), (int )offset, (int )(nbytes >>32 ), (int )nbytes, flags); +/* mips */ +#elif defined(__mips__) && __WORDSIZE ==32 +return ltp_syscall (__NR_sync_file_range, fd,0 , (int )(offset >>32 ), + (int )offset, (int )(nbytes >>32 ), (int )nbytes, flags); +/* other */ #else return ltp_syscall (__NR_sync_file_range, fd, offset, nbytes, flags);
Signature · 1 line
1.9.1
PATCH 1/1 Fix sync_file_range for Mips
----- Original Message -----
Quoted 7 lines
From: "Dejan Jovicevic" <[email protected]>
To: [email protected]
Sent: Monday, 3 October, 2016 1:06:46 PM
Subject: [LTP] [PATCH] Fixsync_file_rangefor MipsFor Mips there is a second argument which is actually a padding. This can be confirmed in glibc.
<glibc>/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c or [1]:
LONG LONG in 32-bit mode:
If GR > r10, go to STACK. Otherwise, if GR is odd, advance GR to the next register. Load the 64-bit long long value into register pair GR and GR+1. Advance GR to GR+2 and go to SCAN.
Pushed with slightly modified commit message. Please include Signed-off-by line in future.
Thanks,
Jan