c6x: switch to generic kernel_execve
authorMark Salter <msalter@redhat.com>
Fri, 21 Sep 2012 16:26:38 +0000 (12:26 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 1 Oct 2012 04:59:08 +0000 (00:59 -0400)
Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/c6x/include/asm/unistd.h
arch/c6x/kernel/entry.S

index 6d54ea4262eb6e538c0c9a55dd513d23578c7360..1ce3a6f2372b4fc9638074b3153c05a10d561952 100644 (file)
@@ -16,6 +16,8 @@
 #if !defined(_ASM_C6X_UNISTD_H) || defined(__SYSCALL)
 #define _ASM_C6X_UNISTD_H
 
+#define __ARCH_WANT_KERNEL_EXECVE
+
 /* Use the standard ABI for syscalls. */
 #include <asm-generic/unistd.h>
 
index 6e6bd9d3d9cce14c8d4906086e2317e58b210a94..32e3683da71807979c727199edd639411e919c16 100644 (file)
@@ -420,6 +420,12 @@ ENTRY(ret_from_kernel_thread)
        BNOP    .S2     B11,5   /* jump to sys_exit */
 ENDPROC(ret_from_kernel_thread)
 
+ENTRY(ret_from_kernel_execve)
+       GET_THREAD_INFO A12
+       BNOP    .S2     syscall_exit,4
+       ADD     .D2X    A4,-8,SP
+ENDPROC(ret_from_kernel_execve)
+
        ;;
        ;; These are the interrupt handlers, responsible for calling __do_IRQ()
        ;; int6 is used for syscalls (see _system_call entry)
@@ -613,13 +619,6 @@ ENTRY(sys_sigaltstack)
        NOP     4
 ENDPROC(sys_sigaltstack)
 
-       ;; kernel_execve
-ENTRY(kernel_execve)
-       MVK     .S2     __NR_execve,B0
-       SWE
-       BNOP    .S2     B3,5
-ENDPROC(kernel_execve)
-
        ;;
        ;; Special system calls
        ;; return address is in B3