avr32: wire up copy_file_range syscall
authorHans-Christian Egtvedt <egtvedt@samfundet.no>
Sun, 28 Feb 2016 17:14:41 +0000 (18:14 +0100)
committerHans-Christian Egtvedt <egtvedt@samfundet.no>
Mon, 14 Mar 2016 10:08:29 +0000 (11:08 +0100)
This patch wires up the new copy_file_range 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 b60132bb27ea7d7be7d0e306d49e9071142061ac..60c0f3afc1f973a85425369e3c164b870cdecdf9 100644 (file)
 #define __NR_userfaultfd       322
 #define __NR_membarrier                323
 #define __NR_mlock2            324
+#define __NR_copy_file_range    325
 
 #endif /* _UAPI__ASM_AVR32_UNISTD_H */
index f9c68fab0e2fc1d9eedc61c39c9ff84e1e68ab35..cb3991552f14b56fdd79351b6bfb539d84548d62 100644 (file)
@@ -124,3 +124,12 @@ __sys_process_vm_writev:
        call    sys_process_vm_writev
        sub     sp, -4
        popm    pc
+
+       .global __sys_copy_file_range
+       .type   __sys_copy_file_range,@function
+__sys_copy_file_range:
+       pushm   lr
+       st.w    --sp, ARG6
+       call    sys_copy_file_range
+       sub     sp, -4
+       popm    pc
index 1915a443b4914de8d27347688dc06f048ee22473..64d71a781fa88da2c687ee8bd102a49fee79ea22 100644 (file)
@@ -338,4 +338,5 @@ sys_call_table:
        .long   sys_userfaultfd
        .long   sys_membarrier
        .long   sys_mlock2
+       .long   __sys_copy_file_range   /* 325 */
        .long   sys_ni_syscall          /* r8 is saturated at nr_syscalls */