]> git.hungrycats.org Git - linux/commitdiff
PPC32: Add the fadvise64_64 system call.
authorPaul Mackerras <paulus@samba.org>
Sat, 23 Aug 2003 22:15:37 +0000 (08:15 +1000)
committerPaul Mackerras <paulus@samba.org>
Sat, 23 Aug 2003 22:15:37 +0000 (08:15 +1000)
On PPC32 we reorder the arguments so they fit into 6 registers.  Glibc will
need a two-line stub to change them from the standard order to the ordering
used by the system call: (fd, advice, offset, len).

arch/ppc/kernel/misc.S
arch/ppc/kernel/syscalls.c
include/asm-ppc/unistd.h

index 9346ec88f08df426ccdd7bc2ff1a5b204fa40e2c..c076529683c9e5df567df1c5c4fb929cfafa370d 100644 (file)
@@ -1380,3 +1380,4 @@ _GLOBAL(sys_call_table)
        .long sys_utimes
        .long sys_statfs64
        .long sys_fstatfs64
+       .long ppc_fadvise64_64
index b2d3b4480d115aafdf69bd1adcb604bc31275027..1ca53495e857ef075abac18181f9cd68ade01e7e 100644 (file)
@@ -262,4 +262,14 @@ int sys_olduname(struct oldold_utsname __user * name)
        return error;
 }
 
+/*
+ * We put the arguments in a different order so we only use 6
+ * registers for arguments, rather than 7 as sys_fadvise64_64 needs
+ * (because `offset' goes in r5/r6).
+ */
+long ppc_fadvise64_64(int fd, int advice, loff_t offset, loff_t len)
+{
+       return sys_fadvise64_64(fd, offset, len, advice);
+}
+
 cond_syscall(sys_pciconfig_iobase);
index 400f86ec5b9327957a2a156fa96c266c4bec963f..bf1df39dfcecc5514469d1b7199fd1f479495e28 100644 (file)
 #define __NR_utimes            251
 #define __NR_statfs64          252
 #define __NR_fstatfs64         253
+#define __NR_fadvise64_64      254
 
-#define __NR_syscalls          254
+#define __NR_syscalls          255
 
 #define __NR(n)        #n