diff options
| author | Hans-Christian Egtvedt <egtvedt@samfundet.no> | 2014-12-25 13:58:50 -0500 |
|---|---|---|
| committer | Hans-Christian Egtvedt <egtvedt@samfundet.no> | 2015-02-09 09:27:44 -0500 |
| commit | f3240c1f6d18591b2c1ef33ed18d5ca91e62c104 (patch) | |
| tree | 32879b14929eb1cadb337af885cd3fcb48df7a8f /arch/avr32 | |
| parent | bfa76d49576599a4b9f9b7a71f23d73d6dcff735 (diff) | |
avr32: wire up missing syscalls
This patch adds a bunch of missing syscalls to AVR32:
__NR_pread64
__NR_pwrite64
__NR_timerfd_create
__NR_fallocate
__NR_timerfd_settime
__NR_timerfd_gettime
__NR_signalfd4
__NR_eventfd2
__NR_epoll_create1
__NR_dup3
__NR_pipe2
__NR_inotify_init1
__NR_preadv
__NR_pwritev
__NR_rt_tgsigqueueinfo
__NR_perf_event_open
__NR_recvmmsg
__NR_fanotify_init
__NR_fanotify_mark
__NR_prlimit64
__NR_name_to_handle_at
__NR_open_by_handle_at
__NR_clock_adjtime
__NR_syncfs
__NR_sendmmsg
__NR_process_vm_readv
__NR_process_vm_writev
__NR_kcmp
__NR_finit_module
__NR_sched_setattr
__NR_sched_getattr
__NR_renameat2
__NR_seccomp
__NR_getrandom
__NR_memfd_create
__NR_bpf
__NR_execveat
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 relates to syscall fallocate, fanotify_mark, process_vm_readv, and
process_vm_writev.
Signed-off-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Diffstat (limited to 'arch/avr32')
| -rw-r--r-- | arch/avr32/include/asm/unistd.h | 2 | ||||
| -rw-r--r-- | arch/avr32/include/uapi/asm/unistd.h | 41 | ||||
| -rw-r--r-- | arch/avr32/kernel/syscall-stubs.S | 36 | ||||
| -rw-r--r-- | arch/avr32/kernel/syscall_table.S | 37 |
4 files changed, 111 insertions, 5 deletions
diff --git a/arch/avr32/include/asm/unistd.h b/arch/avr32/include/asm/unistd.h index c1eb080e45fe..2011bee3f252 100644 --- a/arch/avr32/include/asm/unistd.h +++ b/arch/avr32/include/asm/unistd.h | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | 10 | ||
| 11 | #include <uapi/asm/unistd.h> | 11 | #include <uapi/asm/unistd.h> |
| 12 | 12 | ||
| 13 | #define NR_syscalls 284 | 13 | #define NR_syscalls 321 |
| 14 | 14 | ||
| 15 | /* Old stuff */ | 15 | /* Old stuff */ |
| 16 | #define __IGNORE_uselib | 16 | #define __IGNORE_uselib |
diff --git a/arch/avr32/include/uapi/asm/unistd.h b/arch/avr32/include/uapi/asm/unistd.h index 8822bf46ddc6..bbe2fba565cd 100644 --- a/arch/avr32/include/uapi/asm/unistd.h +++ b/arch/avr32/include/uapi/asm/unistd.h | |||
| @@ -222,7 +222,6 @@ | |||
| 222 | #define __NR_epoll_wait 207 | 222 | #define __NR_epoll_wait 207 |
| 223 | #define __NR_remap_file_pages 208 | 223 | #define __NR_remap_file_pages 208 |
| 224 | #define __NR_set_tid_address 209 | 224 | #define __NR_set_tid_address 209 |
| 225 | |||
| 226 | #define __NR_timer_create 210 | 225 | #define __NR_timer_create 210 |
| 227 | #define __NR_timer_settime 211 | 226 | #define __NR_timer_settime 211 |
| 228 | #define __NR_timer_gettime 212 | 227 | #define __NR_timer_gettime 212 |
| @@ -238,7 +237,6 @@ | |||
| 238 | /* 222 reserved for tux */ | 237 | /* 222 reserved for tux */ |
| 239 | #define __NR_utimes 223 | 238 | #define __NR_utimes 223 |
| 240 | #define __NR_fadvise64_64 224 | 239 | #define __NR_fadvise64_64 224 |
| 241 | |||
| 242 | #define __NR_cacheflush 225 | 240 | #define __NR_cacheflush 225 |
| 243 | 241 | ||
| 244 | #define __NR_vserver 226 | 242 | #define __NR_vserver 226 |
| @@ -281,7 +279,6 @@ | |||
| 281 | #define __NR_tee 263 | 279 | #define __NR_tee 263 |
| 282 | #define __NR_vmsplice 264 | 280 | #define __NR_vmsplice 264 |
| 283 | #define __NR_epoll_pwait 265 | 281 | #define __NR_epoll_pwait 265 |
| 284 | |||
| 285 | #define __NR_msgget 266 | 282 | #define __NR_msgget 266 |
| 286 | #define __NR_msgsnd 267 | 283 | #define __NR_msgsnd 267 |
| 287 | #define __NR_msgrcv 268 | 284 | #define __NR_msgrcv 268 |
| @@ -294,11 +291,47 @@ | |||
| 294 | #define __NR_shmget 275 | 291 | #define __NR_shmget 275 |
| 295 | #define __NR_shmdt 276 | 292 | #define __NR_shmdt 276 |
| 296 | #define __NR_shmctl 277 | 293 | #define __NR_shmctl 277 |
| 297 | |||
| 298 | #define __NR_utimensat 278 | 294 | #define __NR_utimensat 278 |
| 299 | #define __NR_signalfd 279 | 295 | #define __NR_signalfd 279 |
| 300 | /* 280 was __NR_timerfd */ | 296 | /* 280 was __NR_timerfd */ |
| 301 | #define __NR_eventfd 281 | 297 | #define __NR_eventfd 281 |
| 302 | #define __NR_setns 283 | 298 | #define __NR_setns 283 |
| 299 | #define __NR_pread64 284 | ||
| 300 | #define __NR_pwrite64 285 | ||
| 301 | #define __NR_timerfd_create 286 | ||
| 302 | #define __NR_fallocate 287 | ||
| 303 | #define __NR_timerfd_settime 288 | ||
| 304 | #define __NR_timerfd_gettime 289 | ||
| 305 | #define __NR_signalfd4 290 | ||
| 306 | #define __NR_eventfd2 291 | ||
| 307 | #define __NR_epoll_create1 292 | ||
| 308 | #define __NR_dup3 293 | ||
| 309 | #define __NR_pipe2 294 | ||
| 310 | #define __NR_inotify_init1 295 | ||
| 311 | #define __NR_preadv 296 | ||
| 312 | #define __NR_pwritev 297 | ||
| 313 | #define __NR_rt_tgsigqueueinfo 298 | ||
| 314 | #define __NR_perf_event_open 299 | ||
| 315 | #define __NR_recvmmsg 300 | ||
| 316 | #define __NR_fanotify_init 301 | ||
| 317 | #define __NR_fanotify_mark 302 | ||
| 318 | #define __NR_prlimit64 303 | ||
| 319 | #define __NR_name_to_handle_at 304 | ||
| 320 | #define __NR_open_by_handle_at 305 | ||
| 321 | #define __NR_clock_adjtime 306 | ||
| 322 | #define __NR_syncfs 307 | ||
| 323 | #define __NR_sendmmsg 308 | ||
| 324 | #define __NR_process_vm_readv 309 | ||
| 325 | #define __NR_process_vm_writev 310 | ||
| 326 | #define __NR_kcmp 311 | ||
| 327 | #define __NR_finit_module 312 | ||
| 328 | #define __NR_sched_setattr 313 | ||
| 329 | #define __NR_sched_getattr 314 | ||
| 330 | #define __NR_renameat2 315 | ||
| 331 | #define __NR_seccomp 316 | ||
| 332 | #define __NR_getrandom 317 | ||
| 333 | #define __NR_memfd_create 318 | ||
| 334 | #define __NR_bpf 319 | ||
| 335 | #define __NR_execveat 320 | ||
| 303 | 336 | ||
| 304 | #endif /* _UAPI__ASM_AVR32_UNISTD_H */ | 337 | #endif /* _UAPI__ASM_AVR32_UNISTD_H */ |
diff --git a/arch/avr32/kernel/syscall-stubs.S b/arch/avr32/kernel/syscall-stubs.S index b5fc927cd398..f9c68fab0e2f 100644 --- a/arch/avr32/kernel/syscall-stubs.S +++ b/arch/avr32/kernel/syscall-stubs.S | |||
| @@ -88,3 +88,39 @@ __sys_sync_file_range: | |||
| 88 | call sys_sync_file_range | 88 | call sys_sync_file_range |
| 89 | sub sp, -4 | 89 | sub sp, -4 |
| 90 | popm pc | 90 | popm pc |
| 91 | |||
| 92 | .global __sys_fallocate | ||
| 93 | .type __sys_fallocate,@function | ||
| 94 | __sys_fallocate: | ||
| 95 | pushm lr | ||
| 96 | st.w --sp, ARG6 | ||
| 97 | call sys_fallocate | ||
| 98 | sub sp, -4 | ||
| 99 | popm pc | ||
| 100 | |||
| 101 | .global __sys_fanotify_mark | ||
| 102 | .type __sys_fanotify_mark,@function | ||
| 103 | __sys_fanotify_mark: | ||
| 104 | pushm lr | ||
| 105 | st.w --sp, ARG6 | ||
| 106 | call sys_fanotify_mark | ||
| 107 | sub sp, -4 | ||
| 108 | popm pc | ||
| 109 | |||
| 110 | .global __sys_process_vm_readv | ||
| 111 | .type __sys_process_vm_readv,@function | ||
| 112 | __sys_process_vm_readv: | ||
| 113 | pushm lr | ||
| 114 | st.w --sp, ARG6 | ||
| 115 | call sys_process_vm_readv | ||
| 116 | sub sp, -4 | ||
| 117 | popm pc | ||
| 118 | |||
| 119 | .global __sys_process_vm_writev | ||
| 120 | .type __sys_process_vm_writev,@function | ||
| 121 | __sys_process_vm_writev: | ||
| 122 | pushm lr | ||
| 123 | st.w --sp, ARG6 | ||
| 124 | call sys_process_vm_writev | ||
| 125 | sub sp, -4 | ||
| 126 | popm pc | ||
diff --git a/arch/avr32/kernel/syscall_table.S b/arch/avr32/kernel/syscall_table.S index 017a904180c8..c3b593bfc3b3 100644 --- a/arch/avr32/kernel/syscall_table.S +++ b/arch/avr32/kernel/syscall_table.S | |||
| @@ -297,4 +297,41 @@ sys_call_table: | |||
| 297 | .long sys_eventfd | 297 | .long sys_eventfd |
| 298 | .long sys_recvmmsg | 298 | .long sys_recvmmsg |
| 299 | .long sys_setns | 299 | .long sys_setns |
| 300 | .long sys_pread64 | ||
| 301 | .long sys_pwrite64 /* 285 */ | ||
| 302 | .long sys_timerfd_create | ||
| 303 | .long __sys_fallocate | ||
| 304 | .long sys_timerfd_settime | ||
| 305 | .long sys_timerfd_gettime | ||
| 306 | .long sys_signalfd4 /* 290 */ | ||
| 307 | .long sys_eventfd2 | ||
| 308 | .long sys_epoll_create1 | ||
| 309 | .long sys_dup3 | ||
| 310 | .long sys_pipe2 | ||
| 311 | .long sys_inotify_init1 /* 295 */ | ||
| 312 | .long sys_preadv | ||
| 313 | .long sys_pwritev | ||
| 314 | .long sys_rt_tgsigqueueinfo | ||
| 315 | .long sys_perf_event_open | ||
| 316 | .long sys_recvmmsg /* 300 */ | ||
| 317 | .long sys_fanotify_init | ||
| 318 | .long __sys_fanotify_mark | ||
| 319 | .long sys_prlimit64 | ||
| 320 | .long sys_name_to_handle_at | ||
| 321 | .long sys_open_by_handle_at /* 305 */ | ||
| 322 | .long sys_clock_adjtime | ||
| 323 | .long sys_syncfs | ||
| 324 | .long sys_sendmmsg | ||
| 325 | .long __sys_process_vm_readv | ||
| 326 | .long __sys_process_vm_writev /* 310 */ | ||
| 327 | .long sys_kcmp | ||
| 328 | .long sys_finit_module | ||
| 329 | .long sys_sched_setattr | ||
| 330 | .long sys_sched_getattr | ||
| 331 | .long sys_renameat2 /* 315 */ | ||
| 332 | .long sys_seccomp | ||
| 333 | .long sys_getrandom | ||
| 334 | .long sys_memfd_create | ||
| 335 | .long sys_bpf | ||
| 336 | .long sys_execveat /* 320 */ | ||
| 300 | .long sys_ni_syscall /* r8 is saturated at nr_syscalls */ | 337 | .long sys_ni_syscall /* r8 is saturated at nr_syscalls */ |
