avr32: fix sys_sync_file_range() call convention
authorHans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Wed, 17 Sep 2008 11:39:45 +0000 (13:39 +0200)
committerHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
Fri, 19 Sep 2008 16:21:31 +0000 (18:21 +0200)
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>
arch/avr32/kernel/syscall-stubs.S
arch/avr32/kernel/syscall_table.S

index 890286a1e62b8c88147a4de13575814008a0e77c..673178e235f3a485005ecfd43415f86fad13ab9e 100644 (file)
@@ -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
index 478bda4c4a09a9ac57f119b4c8529d970cbc48e2..7ee0057613b3a70789663f604651bdbc319e2551 100644 (file)
@@ -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 */