aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2007-07-25 22:38:24 -0400
committerRalf Baechle <ralf@linux-mips.org>2007-07-31 16:35:22 -0400
commit4dc467756e77838c592a6dc797434f11761d33f5 (patch)
tree81db3f8a1fc495e70841d9bf4ec1e993d59344f2
parent293c5bd13f124c325f74f89ad26edf5612ce7235 (diff)
[MIPS] Wire up the fallocate syscall.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--arch/mips/kernel/linux32.c7
-rw-r--r--arch/mips/kernel/scall32-o32.S1
-rw-r--r--arch/mips/kernel/scall64-64.S1
-rw-r--r--arch/mips/kernel/scall64-n32.S1
-rw-r--r--arch/mips/kernel/scall64-o32.S1
-rw-r--r--include/asm-mips/unistd.h15
6 files changed, 20 insertions, 6 deletions
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c
index c37568d6fb55..135d9a5fe337 100644
--- a/arch/mips/kernel/linux32.c
+++ b/arch/mips/kernel/linux32.c
@@ -566,6 +566,13 @@ asmlinkage long sys32_fadvise64_64(int fd, int __pad,
566 flags); 566 flags);
567} 567}
568 568
569asmlinkage long sys32_fallocate(int fd, int mode, unsigned offset_a2,
570 unsigned offset_a3, unsigned len_a4, unsigned len_a5)
571{
572 return sys_fallocate(fd, mode, merge_64(offset_a2, offset_a3),
573 merge_64(len_a4, len_a5));
574}
575
569save_static_function(sys32_clone); 576save_static_function(sys32_clone);
570static int noinline __used 577static int noinline __used
571_sys32_clone(nabi_no_regargs struct pt_regs regs) 578_sys32_clone(nabi_no_regargs struct pt_regs regs)
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S
index ae985d1fcca1..82480a1717d8 100644
--- a/arch/mips/kernel/scall32-o32.S
+++ b/arch/mips/kernel/scall32-o32.S
@@ -662,6 +662,7 @@ einval: li v0, -EINVAL
662 sys sys_signalfd 3 662 sys sys_signalfd 3
663 sys sys_timerfd 4 663 sys sys_timerfd 4
664 sys sys_eventfd 1 664 sys sys_eventfd 1
665 sys sys_fallocate 6 /* 4320 */
665 .endm 666 .endm
666 667
667 /* We pre-compute the number of _instruction_ bytes needed to 668 /* We pre-compute the number of _instruction_ bytes needed to
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S
index 7bcd5a1a85f5..c2c10876da2e 100644
--- a/arch/mips/kernel/scall64-64.S
+++ b/arch/mips/kernel/scall64-64.S
@@ -477,4 +477,5 @@ sys_call_table:
477 PTR sys_signalfd 477 PTR sys_signalfd
478 PTR sys_timerfd 478 PTR sys_timerfd
479 PTR sys_eventfd 479 PTR sys_eventfd
480 PTR sys_fallocate
480 .size sys_call_table,.-sys_call_table 481 .size sys_call_table,.-sys_call_table
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S
index 532a2f3b42fc..53d7a977193c 100644
--- a/arch/mips/kernel/scall64-n32.S
+++ b/arch/mips/kernel/scall64-n32.S
@@ -403,4 +403,5 @@ EXPORT(sysn32_call_table)
403 PTR compat_sys_signalfd /* 5280 */ 403 PTR compat_sys_signalfd /* 5280 */
404 PTR compat_sys_timerfd 404 PTR compat_sys_timerfd
405 PTR sys_eventfd 405 PTR sys_eventfd
406 PTR sys_fallocate
406 .size sysn32_call_table,.-sysn32_call_table 407 .size sysn32_call_table,.-sysn32_call_table
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S
index 6bbe0f4ed8ba..b3ed731a24c6 100644
--- a/arch/mips/kernel/scall64-o32.S
+++ b/arch/mips/kernel/scall64-o32.S
@@ -525,4 +525,5 @@ sys_call_table:
525 PTR compat_sys_signalfd 525 PTR compat_sys_signalfd
526 PTR compat_sys_timerfd 526 PTR compat_sys_timerfd
527 PTR sys_eventfd 527 PTR sys_eventfd
528 PTR sys_fallocate /* 4320 */
528 .size sys_call_table,.-sys_call_table 529 .size sys_call_table,.-sys_call_table
diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h
index ed16de0a6398..fa9a587b3bf1 100644
--- a/include/asm-mips/unistd.h
+++ b/include/asm-mips/unistd.h
@@ -340,16 +340,17 @@
340#define __NR_signalfd (__NR_Linux + 317) 340#define __NR_signalfd (__NR_Linux + 317)
341#define __NR_timerfd (__NR_Linux + 318) 341#define __NR_timerfd (__NR_Linux + 318)
342#define __NR_eventfd (__NR_Linux + 319) 342#define __NR_eventfd (__NR_Linux + 319)
343#define __NR_fallocate (__NR_Linux + 320)
343 344
344/* 345/*
345 * Offset of the last Linux o32 flavoured syscall 346 * Offset of the last Linux o32 flavoured syscall
346 */ 347 */
347#define __NR_Linux_syscalls 319 348#define __NR_Linux_syscalls 320
348 349
349#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ 350#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
350 351
351#define __NR_O32_Linux 4000 352#define __NR_O32_Linux 4000
352#define __NR_O32_Linux_syscalls 319 353#define __NR_O32_Linux_syscalls 320
353 354
354#if _MIPS_SIM == _MIPS_SIM_ABI64 355#if _MIPS_SIM == _MIPS_SIM_ABI64
355 356
@@ -636,16 +637,17 @@
636#define __NR_signalfd (__NR_Linux + 276) 637#define __NR_signalfd (__NR_Linux + 276)
637#define __NR_timerfd (__NR_Linux + 277) 638#define __NR_timerfd (__NR_Linux + 277)
638#define __NR_eventfd (__NR_Linux + 278) 639#define __NR_eventfd (__NR_Linux + 278)
640#define __NR_fallocate (__NR_Linux + 279)
639 641
640/* 642/*
641 * Offset of the last Linux 64-bit flavoured syscall 643 * Offset of the last Linux 64-bit flavoured syscall
642 */ 644 */
643#define __NR_Linux_syscalls 278 645#define __NR_Linux_syscalls 279
644 646
645#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ 647#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
646 648
647#define __NR_64_Linux 5000 649#define __NR_64_Linux 5000
648#define __NR_64_Linux_syscalls 278 650#define __NR_64_Linux_syscalls 279
649 651
650#if _MIPS_SIM == _MIPS_SIM_NABI32 652#if _MIPS_SIM == _MIPS_SIM_NABI32
651 653
@@ -936,16 +938,17 @@
936#define __NR_signalfd (__NR_Linux + 280) 938#define __NR_signalfd (__NR_Linux + 280)
937#define __NR_timerfd (__NR_Linux + 281) 939#define __NR_timerfd (__NR_Linux + 281)
938#define __NR_eventfd (__NR_Linux + 282) 940#define __NR_eventfd (__NR_Linux + 282)
941#define __NR_fallocate (__NR_Linux + 283)
939 942
940/* 943/*
941 * Offset of the last N32 flavoured syscall 944 * Offset of the last N32 flavoured syscall
942 */ 945 */
943#define __NR_Linux_syscalls 282 946#define __NR_Linux_syscalls 283
944 947
945#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ 948#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
946 949
947#define __NR_N32_Linux 6000 950#define __NR_N32_Linux 6000
948#define __NR_N32_Linux_syscalls 282 951#define __NR_N32_Linux_syscalls 283
949 952
950#ifdef __KERNEL__ 953#ifdef __KERNEL__
951 954