]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
sparc64: wire up accept4()
authorDavid Miller <davem@davemloft.net>
Wed, 19 Nov 2008 23:36:15 +0000 (15:36 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 20 Nov 2008 02:49:57 +0000 (18:49 -0800)
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>
arch/sparc/include/asm/unistd_32.h
arch/sparc/include/asm/unistd_64.h
arch/sparc/kernel/systbls.S
arch/sparc64/kernel/sys32.S
arch/sparc64/kernel/systbls.S

index 648643a9f139b62930a6fd39ab6f4b614bd74c92..0d13d2a4c76f6e0f63f005e01e077bd9f565f6de 100644 (file)
 #define __NR_dup3              320
 #define __NR_pipe2             321
 #define __NR_inotify_init1     322
+#define __NR_accept4           323
 
-#define NR_SYSCALLS            323
+#define NR_SYSCALLS            324
 
 /* Sparc 32-bit only has the "setresuid32", "getresuid32" variants,
  * it never had the plain ones and there is no value to adding those
index c5cc0e052321850157df1edaf92b6020b5fb22d0..fa5d3c0343c7ee33d09111b3bfab4a987839fcc2 100644 (file)
 #define __NR_dup3              320
 #define __NR_pipe2             321
 #define __NR_inotify_init1     322
+#define __NR_accept4           323
 
-#define NR_SYSCALLS            323
+#define NR_SYSCALLS            324
 
 #ifdef __KERNEL__
 #define __ARCH_WANT_IPC_PARSE_VERSION
index e1b9233b90ab3133587481322f30d3a260fc6569..7d0807586442dda4d837e58cc9ac419c10c6bc20 100644 (file)
@@ -81,4 +81,4 @@ sys_call_table:
 /*305*/        .long sys_set_mempolicy, sys_kexec_load, sys_move_pages, sys_getcpu, sys_epoll_pwait
 /*310*/        .long sys_utimensat, sys_signalfd, sys_timerfd_create, sys_eventfd, sys_fallocate
 /*315*/        .long sys_timerfd_settime, sys_timerfd_gettime, sys_signalfd4, sys_eventfd2, sys_epoll_create1
-/*320*/        .long sys_dup3, sys_pipe2, sys_inotify_init1
+/*320*/        .long sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4
index ade18ba0c68634db858ce2e226e00236e5d2a428..f061c4dda9efb96dd5d8a6317169af88332b6720 100644 (file)
@@ -150,7 +150,7 @@ sys32_mmap2:
 sys32_socketcall:      /* %o0=call, %o1=args */
        cmp             %o0, 1
        bl,pn           %xcc, do_einval
-        cmp            %o0, 17
+        cmp            %o0, 18
        bg,pn           %xcc, do_einval
         sub            %o0, 1, %o0
        sllx            %o0, 5, %o0
@@ -319,6 +319,15 @@ do_sys_recvmsg: /* compat_sys_recvmsg(int, struct compat_msghdr *, unsigned int)
        nop
        nop
        nop
+do_sys_accept4: /* sys_accept4(int, struct sockaddr *, int *, int) */
+63:    ldswa           [%o1 + 0x0] %asi, %o0
+       sethi           %hi(sys_accept4), %g1
+64:    lduwa           [%o1 + 0x8] %asi, %o2
+65:    ldswa           [%o1 + 0xc] %asi, %o3
+       jmpl            %g1 + %lo(sys_accept4), %g0
+66:     lduwa          [%o1 + 0x4] %asi, %o1
+       nop
+       nop
 
        .section        __ex_table,"a"
        .align          4
@@ -353,4 +362,6 @@ do_sys_recvmsg: /* compat_sys_recvmsg(int, struct compat_msghdr *, unsigned int)
        .word           57b, __retl_efault, 58b, __retl_efault
        .word           59b, __retl_efault, 60b, __retl_efault
        .word           61b, __retl_efault, 62b, __retl_efault
+       .word           63b, __retl_efault, 64b, __retl_efault
+       .word           65b, __retl_efault, 66b, __retl_efault
        .previous
index b2fa4c1636387f2e40bf52a09c8d80bae7dce36c..9fc78cf354bd1f63e034ad46320ff4ed38fa2ee1 100644 (file)
@@ -82,7 +82,7 @@ sys_call_table32:
        .word compat_sys_set_mempolicy, compat_sys_kexec_load, compat_sys_move_pages, sys_getcpu, compat_sys_epoll_pwait
 /*310*/        .word compat_sys_utimensat, compat_sys_signalfd, sys_timerfd_create, sys_eventfd, compat_sys_fallocate
        .word compat_sys_timerfd_settime, compat_sys_timerfd_gettime, compat_sys_signalfd4, sys_eventfd2, sys_epoll_create1
-/*320*/        .word sys_dup3, sys_pipe2, sys_inotify_init1
+/*320*/        .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4
 
 #endif /* CONFIG_COMPAT */
 
@@ -156,4 +156,4 @@ sys_call_table:
        .word sys_set_mempolicy, sys_kexec_load, sys_move_pages, sys_getcpu, sys_epoll_pwait
 /*310*/        .word sys_utimensat, sys_signalfd, sys_timerfd_create, sys_eventfd, sys_fallocate
        .word sys_timerfd_settime, sys_timerfd_gettime, sys_signalfd4, sys_eventfd2, sys_epoll_create1
-/*320*/        .word sys_dup3, sys_pipe2, sys_inotify_init1
+/*320*/        .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4