I found some confusions about posix_fadvise() on MIPS.
1) unistd.h defines __NR_fadvise64 for all ABI but no
__NR_fadvise64_64. But sys_fadvise64_64 is used for all syscall
entries. For N64, sys_fadvise64 and sys_fadvise64_64 are same so no
problem, but for other ABIs size of 'len' argument cause mismatch
between kernel and libc.
2) On O32, glibc pass a 'long long' argument by hi and lo words, but
kernel needs padding word between 'fd' and 'offset' argument.
3) On N32, glibc pass a 'long long' argument by hi and lo words, but
kernel expects a single register value for 'long long' argument.
4) __ARCH_WANT_SYS_FADVISE64 is defined in unistd.h but sys_fadvise64
is not used.
What is preferred way to fix those issues?
It seems N64 do not need any fix.
For N32 and O32, kernel should be fixed anyway, but which syscall
should be supported? And whether kernel or libc should take care of
'long long' issue?