diff options
author | Hans-Christian Egtvedt <egtvedt@samfundet.no> | 2016-02-28 12:14:41 -0500 |
---|---|---|
committer | Hans-Christian Egtvedt <egtvedt@samfundet.no> | 2016-03-14 06:08:29 -0400 |
commit | b837e97fd35a6b551e3478ace0623a0bd744787c (patch) | |
tree | 86e994c0e476025a30cd1724f30f4d8caaaa1f18 | |
parent | b562e44f507e863c6792946e4e1b1449fbbac85d (diff) |
avr32: wire up copy_file_range syscall
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>
-rw-r--r-- | arch/avr32/include/uapi/asm/unistd.h | 1 | ||||
-rw-r--r-- | arch/avr32/kernel/syscall-stubs.S | 9 | ||||
-rw-r--r-- | arch/avr32/kernel/syscall_table.S | 1 |
3 files changed, 11 insertions, 0 deletions
diff --git a/arch/avr32/include/uapi/asm/unistd.h b/arch/avr32/include/uapi/asm/unistd.h index b60132bb27ea..60c0f3afc1f9 100644 --- a/arch/avr32/include/uapi/asm/unistd.h +++ b/arch/avr32/include/uapi/asm/unistd.h | |||
@@ -337,5 +337,6 @@ | |||
337 | #define __NR_userfaultfd 322 | 337 | #define __NR_userfaultfd 322 |
338 | #define __NR_membarrier 323 | 338 | #define __NR_membarrier 323 |
339 | #define __NR_mlock2 324 | 339 | #define __NR_mlock2 324 |
340 | #define __NR_copy_file_range 325 | ||
340 | 341 | ||
341 | #endif /* _UAPI__ASM_AVR32_UNISTD_H */ | 342 | #endif /* _UAPI__ASM_AVR32_UNISTD_H */ |
diff --git a/arch/avr32/kernel/syscall-stubs.S b/arch/avr32/kernel/syscall-stubs.S index f9c68fab0e2f..cb3991552f14 100644 --- a/arch/avr32/kernel/syscall-stubs.S +++ b/arch/avr32/kernel/syscall-stubs.S | |||
@@ -124,3 +124,12 @@ __sys_process_vm_writev: | |||
124 | call sys_process_vm_writev | 124 | call sys_process_vm_writev |
125 | sub sp, -4 | 125 | sub sp, -4 |
126 | popm pc | 126 | popm pc |
127 | |||
128 | .global __sys_copy_file_range | ||
129 | .type __sys_copy_file_range,@function | ||
130 | __sys_copy_file_range: | ||
131 | pushm lr | ||
132 | st.w --sp, ARG6 | ||
133 | call sys_copy_file_range | ||
134 | sub sp, -4 | ||
135 | popm pc | ||
diff --git a/arch/avr32/kernel/syscall_table.S b/arch/avr32/kernel/syscall_table.S index 1915a443b491..64d71a781fa8 100644 --- a/arch/avr32/kernel/syscall_table.S +++ b/arch/avr32/kernel/syscall_table.S | |||
@@ -338,4 +338,5 @@ sys_call_table: | |||
338 | .long sys_userfaultfd | 338 | .long sys_userfaultfd |
339 | .long sys_membarrier | 339 | .long sys_membarrier |
340 | .long sys_mlock2 | 340 | .long sys_mlock2 |
341 | .long __sys_copy_file_range /* 325 */ | ||
341 | .long sys_ni_syscall /* r8 is saturated at nr_syscalls */ | 342 | .long sys_ni_syscall /* r8 is saturated at nr_syscalls */ |