linux-mips
[Top] [All Lists]

fadvise on MIPS

To: linux-mips@linux-mips.org
Subject: fadvise on MIPS
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Sat, 17 Feb 2007 00:43:29 +0900 (JST)
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
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?

---
Atsushi Nemoto

<Prev in Thread] Current Thread [Next in Thread>