aboutsummaryrefslogtreecommitdiffstats
path: root/arch/avr32/kernel
diff options
context:
space:
mode:
authorHans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>2008-09-17 07:39:45 -0400
committerHaavard Skinnemoen <haavard.skinnemoen@atmel.com>2008-09-19 12:21:31 -0400
commit73d4393d1df4ff3892b040396f101ede94e9e846 (patch)
treee819398b568c074c1d68d39173bfd68529966168 /arch/avr32/kernel
parente37925ebdb9738fc7968119198c6997e79093c02 (diff)
avr32: fix sys_sync_file_range() call convention
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. This patch adds a stub for sync_file_range syscall on AVR32 architecture. Tested with uClibc snapshot. Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com> Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Diffstat (limited to 'arch/avr32/kernel')
-rw-r--r--arch/avr32/kernel/syscall-stubs.S9
-rw-r--r--arch/avr32/kernel/syscall_table.S2
2 files changed, 10 insertions, 1 deletions
diff --git a/arch/avr32/kernel/syscall-stubs.S b/arch/avr32/kernel/syscall-stubs.S
index 890286a1e62b..673178e235f3 100644
--- a/arch/avr32/kernel/syscall-stubs.S
+++ b/arch/avr32/kernel/syscall-stubs.S
@@ -109,3 +109,12 @@ __sys_epoll_pwait:
109 rcall sys_epoll_pwait 109 rcall sys_epoll_pwait
110 sub sp, -4 110 sub sp, -4
111 popm pc 111 popm pc
112
113 .global __sys_sync_file_range
114 .type __sys_sync_file_range,@function
115__sys_sync_file_range:
116 pushm lr
117 st.w --sp, ARG6
118 rcall sys_sync_file_range
119 sub sp, -4
120 popm pc
diff --git a/arch/avr32/kernel/syscall_table.S b/arch/avr32/kernel/syscall_table.S
index 478bda4c4a09..7ee0057613b3 100644
--- a/arch/avr32/kernel/syscall_table.S
+++ b/arch/avr32/kernel/syscall_table.S
@@ -275,7 +275,7 @@ sys_call_table:
275 .long sys_set_robust_list 275 .long sys_set_robust_list
276 .long sys_get_robust_list /* 260 */ 276 .long sys_get_robust_list /* 260 */
277 .long __sys_splice 277 .long __sys_splice
278 .long sys_sync_file_range 278 .long __sys_sync_file_range
279 .long sys_tee 279 .long sys_tee
280 .long sys_vmsplice 280 .long sys_vmsplice
281 .long __sys_epoll_pwait /* 265 */ 281 .long __sys_epoll_pwait /* 265 */