diff options
author | David Miller <davem@davemloft.net> | 2008-11-19 18:36:15 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-11-19 21:49:57 -0500 |
commit | f8b2256e9c11a825899345de06b39a4bdf44911d (patch) | |
tree | 18b353bdb9d63892b35101b4d8f811d0170d90b5 /arch | |
parent | de11defebf00007677fb7ee91d9b089b78786fbb (diff) |
sparc64: wire up accept4()
This adds the sparc syscall hookups.
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Ulrich Drepper <drepper@redhat.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sparc/include/asm/unistd_32.h | 3 | ||||
-rw-r--r-- | arch/sparc/include/asm/unistd_64.h | 3 | ||||
-rw-r--r-- | arch/sparc/kernel/systbls.S | 2 | ||||
-rw-r--r-- | arch/sparc64/kernel/sys32.S | 13 | ||||
-rw-r--r-- | arch/sparc64/kernel/systbls.S | 4 |
5 files changed, 19 insertions, 6 deletions
diff --git a/arch/sparc/include/asm/unistd_32.h b/arch/sparc/include/asm/unistd_32.h index 648643a9f139..0d13d2a4c76f 100644 --- a/arch/sparc/include/asm/unistd_32.h +++ b/arch/sparc/include/asm/unistd_32.h | |||
@@ -338,8 +338,9 @@ | |||
338 | #define __NR_dup3 320 | 338 | #define __NR_dup3 320 |
339 | #define __NR_pipe2 321 | 339 | #define __NR_pipe2 321 |
340 | #define __NR_inotify_init1 322 | 340 | #define __NR_inotify_init1 322 |
341 | #define __NR_accept4 323 | ||
341 | 342 | ||
342 | #define NR_SYSCALLS 323 | 343 | #define NR_SYSCALLS 324 |
343 | 344 | ||
344 | /* Sparc 32-bit only has the "setresuid32", "getresuid32" variants, | 345 | /* Sparc 32-bit only has the "setresuid32", "getresuid32" variants, |
345 | * it never had the plain ones and there is no value to adding those | 346 | * it never had the plain ones and there is no value to adding those |
diff --git a/arch/sparc/include/asm/unistd_64.h b/arch/sparc/include/asm/unistd_64.h index c5cc0e052321..fa5d3c0343c7 100644 --- a/arch/sparc/include/asm/unistd_64.h +++ b/arch/sparc/include/asm/unistd_64.h | |||
@@ -340,8 +340,9 @@ | |||
340 | #define __NR_dup3 320 | 340 | #define __NR_dup3 320 |
341 | #define __NR_pipe2 321 | 341 | #define __NR_pipe2 321 |
342 | #define __NR_inotify_init1 322 | 342 | #define __NR_inotify_init1 322 |
343 | #define __NR_accept4 323 | ||
343 | 344 | ||
344 | #define NR_SYSCALLS 323 | 345 | #define NR_SYSCALLS 324 |
345 | 346 | ||
346 | #ifdef __KERNEL__ | 347 | #ifdef __KERNEL__ |
347 | #define __ARCH_WANT_IPC_PARSE_VERSION | 348 | #define __ARCH_WANT_IPC_PARSE_VERSION |
diff --git a/arch/sparc/kernel/systbls.S b/arch/sparc/kernel/systbls.S index e1b9233b90ab..7d0807586442 100644 --- a/arch/sparc/kernel/systbls.S +++ b/arch/sparc/kernel/systbls.S | |||
@@ -81,4 +81,4 @@ sys_call_table: | |||
81 | /*305*/ .long sys_set_mempolicy, sys_kexec_load, sys_move_pages, sys_getcpu, sys_epoll_pwait | 81 | /*305*/ .long sys_set_mempolicy, sys_kexec_load, sys_move_pages, sys_getcpu, sys_epoll_pwait |
82 | /*310*/ .long sys_utimensat, sys_signalfd, sys_timerfd_create, sys_eventfd, sys_fallocate | 82 | /*310*/ .long sys_utimensat, sys_signalfd, sys_timerfd_create, sys_eventfd, sys_fallocate |
83 | /*315*/ .long sys_timerfd_settime, sys_timerfd_gettime, sys_signalfd4, sys_eventfd2, sys_epoll_create1 | 83 | /*315*/ .long sys_timerfd_settime, sys_timerfd_gettime, sys_signalfd4, sys_eventfd2, sys_epoll_create1 |
84 | /*320*/ .long sys_dup3, sys_pipe2, sys_inotify_init1 | 84 | /*320*/ .long sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4 |
diff --git a/arch/sparc64/kernel/sys32.S b/arch/sparc64/kernel/sys32.S index ade18ba0c686..f061c4dda9ef 100644 --- a/arch/sparc64/kernel/sys32.S +++ b/arch/sparc64/kernel/sys32.S | |||
@@ -150,7 +150,7 @@ sys32_mmap2: | |||
150 | sys32_socketcall: /* %o0=call, %o1=args */ | 150 | sys32_socketcall: /* %o0=call, %o1=args */ |
151 | cmp %o0, 1 | 151 | cmp %o0, 1 |
152 | bl,pn %xcc, do_einval | 152 | bl,pn %xcc, do_einval |
153 | cmp %o0, 17 | 153 | cmp %o0, 18 |
154 | bg,pn %xcc, do_einval | 154 | bg,pn %xcc, do_einval |
155 | sub %o0, 1, %o0 | 155 | sub %o0, 1, %o0 |
156 | sllx %o0, 5, %o0 | 156 | sllx %o0, 5, %o0 |
@@ -319,6 +319,15 @@ do_sys_recvmsg: /* compat_sys_recvmsg(int, struct compat_msghdr *, unsigned int) | |||
319 | nop | 319 | nop |
320 | nop | 320 | nop |
321 | nop | 321 | nop |
322 | do_sys_accept4: /* sys_accept4(int, struct sockaddr *, int *, int) */ | ||
323 | 63: ldswa [%o1 + 0x0] %asi, %o0 | ||
324 | sethi %hi(sys_accept4), %g1 | ||
325 | 64: lduwa [%o1 + 0x8] %asi, %o2 | ||
326 | 65: ldswa [%o1 + 0xc] %asi, %o3 | ||
327 | jmpl %g1 + %lo(sys_accept4), %g0 | ||
328 | 66: lduwa [%o1 + 0x4] %asi, %o1 | ||
329 | nop | ||
330 | nop | ||
322 | 331 | ||
323 | .section __ex_table,"a" | 332 | .section __ex_table,"a" |
324 | .align 4 | 333 | .align 4 |
@@ -353,4 +362,6 @@ do_sys_recvmsg: /* compat_sys_recvmsg(int, struct compat_msghdr *, unsigned int) | |||
353 | .word 57b, __retl_efault, 58b, __retl_efault | 362 | .word 57b, __retl_efault, 58b, __retl_efault |
354 | .word 59b, __retl_efault, 60b, __retl_efault | 363 | .word 59b, __retl_efault, 60b, __retl_efault |
355 | .word 61b, __retl_efault, 62b, __retl_efault | 364 | .word 61b, __retl_efault, 62b, __retl_efault |
365 | .word 63b, __retl_efault, 64b, __retl_efault | ||
366 | .word 65b, __retl_efault, 66b, __retl_efault | ||
356 | .previous | 367 | .previous |
diff --git a/arch/sparc64/kernel/systbls.S b/arch/sparc64/kernel/systbls.S index b2fa4c163638..9fc78cf354bd 100644 --- a/arch/sparc64/kernel/systbls.S +++ b/arch/sparc64/kernel/systbls.S | |||
@@ -82,7 +82,7 @@ sys_call_table32: | |||
82 | .word compat_sys_set_mempolicy, compat_sys_kexec_load, compat_sys_move_pages, sys_getcpu, compat_sys_epoll_pwait | 82 | .word compat_sys_set_mempolicy, compat_sys_kexec_load, compat_sys_move_pages, sys_getcpu, compat_sys_epoll_pwait |
83 | /*310*/ .word compat_sys_utimensat, compat_sys_signalfd, sys_timerfd_create, sys_eventfd, compat_sys_fallocate | 83 | /*310*/ .word compat_sys_utimensat, compat_sys_signalfd, sys_timerfd_create, sys_eventfd, compat_sys_fallocate |
84 | .word compat_sys_timerfd_settime, compat_sys_timerfd_gettime, compat_sys_signalfd4, sys_eventfd2, sys_epoll_create1 | 84 | .word compat_sys_timerfd_settime, compat_sys_timerfd_gettime, compat_sys_signalfd4, sys_eventfd2, sys_epoll_create1 |
85 | /*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1 | 85 | /*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4 |
86 | 86 | ||
87 | #endif /* CONFIG_COMPAT */ | 87 | #endif /* CONFIG_COMPAT */ |
88 | 88 | ||
@@ -156,4 +156,4 @@ sys_call_table: | |||
156 | .word sys_set_mempolicy, sys_kexec_load, sys_move_pages, sys_getcpu, sys_epoll_pwait | 156 | .word sys_set_mempolicy, sys_kexec_load, sys_move_pages, sys_getcpu, sys_epoll_pwait |
157 | /*310*/ .word sys_utimensat, sys_signalfd, sys_timerfd_create, sys_eventfd, sys_fallocate | 157 | /*310*/ .word sys_utimensat, sys_signalfd, sys_timerfd_create, sys_eventfd, sys_fallocate |
158 | .word sys_timerfd_settime, sys_timerfd_gettime, sys_signalfd4, sys_eventfd2, sys_epoll_create1 | 158 | .word sys_timerfd_settime, sys_timerfd_gettime, sys_signalfd4, sys_eventfd2, sys_epoll_create1 |
159 | /*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1 | 159 | /*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4 |