linux/arch
Nicolas Pitre 68d9102f76 [ARM] 2865/2: fix fadvise64_64 syscall argument passing
Patch from Nicolas Pitre

The prototype for sys_fadvise64_64() is:
    long sys_fadvise64_64(int fd, loff_t offset, loff_t len, int advice)
The argument list is therefore as follows on legacy ABI:
	fd: type int (r0)
	offset: type long long (r1-r2)
	len: type long long (r3-sp[0])
	advice: type int (sp[4])
With EABI this becomes:
	fd: type int (r0)
	offset: type long long (r2-r3)
	len: type long long (sp[0]-sp[4])
	advice: type int (sp[8])
Not only do we have ABI differences here, but the EABI version requires
one additional word on the syscall stack.
To avoid the ABI mismatch and the extra stack space required with EABI
this syscall is now defined with a different argument ordering
on ARM as follows:
    long sys_arm_fadvise64_64(int fd, int advice, loff_t offset, loff_t len)
This gives us the following ABI independent argument distribution:
	fd: type int (r0)
	advice: type int (r1)
	offset: type long long (r2-r3)
	len: type long long (sp[0]-sp[4])
Now, since the syscall entry code takes care of 5 registers only by
default including the store of r4 to the stack, we need a wrapper to
store r5 to the stack as well.  Because that wrapper was missing and was
always required this means that sys_fadvise64_64 never worked on ARM and
therefore we can safely reuse its syscall number for our new
sys_arm_fadvise64_64 interface.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-09-01 12:37:13 +01:00
..
alpha [PATCH] convert signal handling of NODEFER to act like other Unix boxes. 2005-08-29 10:03:11 -07:00
arm [ARM] 2865/2: fix fadvise64_64 syscall argument passing 2005-09-01 12:37:13 +01:00
arm26 [PATCH] convert signal handling of NODEFER to act like other Unix boxes. 2005-08-29 10:03:11 -07:00
cris [PATCH] convert signal handling of NODEFER to act like other Unix boxes. 2005-08-29 10:03:11 -07:00
frv [PATCH] convert signal handling of NODEFER to act like other Unix boxes. 2005-08-29 10:03:11 -07:00
h8300 [PATCH] convert signal handling of NODEFER to act like other Unix boxes. 2005-08-29 10:03:11 -07:00
i386 [PATCH] convert signal handling of NODEFER to act like other Unix boxes. 2005-08-29 10:03:11 -07:00
ia64 [PATCH] convert signal handling of NODEFER to act like other Unix boxes. 2005-08-29 10:03:11 -07:00
m32r [PATCH] convert signal handling of NODEFER to act like other Unix boxes. 2005-08-29 10:03:11 -07:00
m68k It wasn't just x86-64 that had hardcoded VM_FAULT_xxx numbers 2005-08-04 08:33:38 -07:00
m68knommu [PATCH] convert signal handling of NODEFER to act like other Unix boxes. 2005-08-29 10:03:11 -07:00
mips [PATCH] convert signal handling of NODEFER to act like other Unix boxes. 2005-08-29 10:03:11 -07:00
parisc [PATCH] convert signal handling of NODEFER to act like other Unix boxes. 2005-08-29 10:03:11 -07:00
ppc [PATCH] convert signal handling of NODEFER to act like other Unix boxes. 2005-08-29 10:03:11 -07:00
ppc64 [PATCH] convert signal handling of NODEFER to act like other Unix boxes. 2005-08-29 10:03:11 -07:00
s390 [PATCH] convert signal handling of NODEFER to act like other Unix boxes. 2005-08-29 10:03:11 -07:00
sh [PATCH] convert signal handling of NODEFER to act like other Unix boxes. 2005-08-29 10:03:11 -07:00
sh64 [PATCH] convert signal handling of NODEFER to act like other Unix boxes. 2005-08-29 10:03:11 -07:00
sparc [PATCH] convert signal handling of NODEFER to act like other Unix boxes. 2005-08-29 10:03:11 -07:00
sparc64 [PATCH] convert signal handling of NODEFER to act like other Unix boxes. 2005-08-29 10:03:11 -07:00
um [PATCH] convert signal handling of NODEFER to act like other Unix boxes. 2005-08-29 10:03:11 -07:00
v850 [PATCH] convert signal handling of NODEFER to act like other Unix boxes. 2005-08-29 10:03:11 -07:00
x86_64 [PATCH] convert signal handling of NODEFER to act like other Unix boxes. 2005-08-29 10:03:11 -07:00
xtensa [PATCH] convert signal handling of NODEFER to act like other Unix boxes. 2005-08-29 10:03:11 -07:00