On 4 October 2016 at 11:05, Aleksandar Markovic <aleksandar.marko...@rt-rk.com> wrote: > From: Aleksandar Markovic <aleksandar.marko...@imgtec.com> > > By looking at the file arch/mips/kernel/sys.S in Linux kernel,
There doesn't appear to be a file by that name: http://lxr.free-electrons.com/source/arch/mips/kernel/ > it can be deduced that, for Mips32 platform, syscall > corresponding to number _NR_fadvise64 translates to kernel > function sys_fadvise64_64, and that argument layout is as > follows: > 0 32 0 32 > +----------------+----------------+ > (arg1) | fd | __pad | (arg2) > +----------------+----------------+ > (arg3) | buffer | (arg4) > +----------------+----------------+ > (arg5) | len | (arg6) > +----------------+----------------+ > (arg7) | advise | not used | (arg8) > +----------------+----------------+ > > This can be deduced from glibc code as well, and relevant commits > in linux kernel and glibc. > > Mips32 uniqness is that it does not define _NR_fadvise64_64, > however its fadvise64 implemantation is identical to > fadvise64_64 impleanentation on most other platforms. > > This patch also fixes the failure LTP test posix_fadvise03, if > executed on Qemu-emulated Mips32 platform (user mode). We could alternatively fix this by having #define TARGET_NR_fadvise64_64 (TARGET_NR_Linux + 254) in linux-user/mips/syscall_nr.h rather than #define TARGET_NR_fadvise64 (TARGET_NR_Linux + 254) right? thanks -- PMM