Skip to content

Commit

Permalink
avr32: fix sys_sync_file_range() call convention
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hans-Christian Egtvedt authored and Haavard Skinnemoen committed Sep 19, 2008
1 parent e37925e commit 73d4393
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions arch/avr32/kernel/syscall-stubs.S
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,12 @@ __sys_epoll_pwait:
rcall sys_epoll_pwait
sub sp, -4
popm pc

.global __sys_sync_file_range
.type __sys_sync_file_range,@function
__sys_sync_file_range:
pushm lr
st.w --sp, ARG6
rcall sys_sync_file_range
sub sp, -4
popm pc
2 changes: 1 addition & 1 deletion arch/avr32/kernel/syscall_table.S
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ sys_call_table:
.long sys_set_robust_list
.long sys_get_robust_list /* 260 */
.long __sys_splice
.long sys_sync_file_range
.long __sys_sync_file_range
.long sys_tee
.long sys_vmsplice
.long __sys_epoll_pwait /* 265 */
Expand Down

0 comments on commit 73d4393

Please sign in to comment.