avr32: wire up preadv2 and pwritev2 syscalls
authorHans-Christian Noren Egtvedt <egtvedt@samfundet.no>
Sun, 29 May 2016 19:11:53 +0000 (21:11 +0200)
committerHans-Christian Noren Egtvedt <egtvedt@samfundet.no>
Fri, 29 Jul 2016 09:55:57 +0000 (11:55 +0200)
This patch wires up the new preadv2 and pwritev2 syscall on AVR32.

On AVR32, all parameters beyond the 5th are passed on the stack. System
calls don't use the stack -- they borrow a callee-saved register
instead. This means that syscalls that take 6 parameters must be called
through a stub that pushes the last parameter on the stack.

Signed-off-by: Hans-Christian Noren Egtvedt <egtvedt@samfundet.no>
arch/avr32/include/uapi/asm/unistd.h
arch/avr32/kernel/syscall-stubs.S
arch/avr32/kernel/syscall_table.S

index 60c0f3afc1f973a85425369e3c164b870cdecdf9..d0c1f6db4b8f7c771c5c165fd3c47c47fbe3843e 100644 (file)
 #define __NR_membarrier                323
 #define __NR_mlock2            324
 #define __NR_copy_file_range    325
+#define __NR_preadv2            326
+#define __NR_pwritev2           327
 
 #endif /* _UAPI__ASM_AVR32_UNISTD_H */
index cb3991552f14b56fdd79351b6bfb539d84548d62..cb256534ed925becf328cae60896bd04906f1527 100644 (file)
@@ -133,3 +133,21 @@ __sys_copy_file_range:
        call    sys_copy_file_range
        sub     sp, -4
        popm    pc
+
+       .global __sys_preadv2
+       .type   __sys_preadv2,@function
+__sys_preadv2:
+       pushm   lr
+       st.w    --sp, ARG6
+       call    sys_preadv2
+       sub     sp, -4
+       popm    pc
+
+       .global __sys_pwritev2
+       .type   __sys_pwritev2,@function
+__sys_pwritev2:
+       pushm   lr
+       st.w    --sp, ARG6
+       call    sys_pwritev2
+       sub     sp, -4
+       popm    pc
index 64d71a781fa88da2c687ee8bd102a49fee79ea22..0eaf94b7a67cd0d55c67f5d966552f8960632eb2 100644 (file)
@@ -339,4 +339,6 @@ sys_call_table:
        .long   sys_membarrier
        .long   sys_mlock2
        .long   __sys_copy_file_range   /* 325 */
+       .long   __sys_preadv2
+       .long   __sys_pwritev2
        .long   sys_ni_syscall          /* r8 is saturated at nr_syscalls */