unicore32: switch to generic sys_execve()
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 13 Oct 2012 21:36:40 +0000 (17:36 -0400)
committerGuan Xuetao <gxt@mprc.pku.edu.cn>
Fri, 9 Nov 2012 09:30:10 +0000 (17:30 +0800)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-and-Tested-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
arch/unicore32/include/uapi/asm/unistd.h
arch/unicore32/kernel/entry.S
arch/unicore32/kernel/sys.c

index 2abcf61c615dd82bfe10114357d663a8482dff10..d18a3be89b38db8b9b2f370bfc1d64ab43ff5efe 100644 (file)
@@ -12,3 +12,4 @@
 
 /* Use the standard ABI for syscalls. */
 #include <asm-generic/unistd.h>
+#define __ARCH_WANT_SYS_EXECVE
index 32648c99483a8193a389cf99ccb3128c40e220b0..7049350c790fea708301996647e041431a8feef5 100644 (file)
@@ -668,11 +668,6 @@ __cr_alignment:
 #endif
        .ltorg
 
-ENTRY(sys_execve)
-               add     r3, sp, #S_OFF
-               b       __sys_execve
-ENDPROC(sys_execve)
-
 ENTRY(sys_clone)
                add     ip, sp, #S_OFF
                stw     ip, [sp+], #4
index 8b6e4cc5739395f58048361c60454ac3988f11d3..9680134b31f0ddd8a0be50f8dd2183a8392328c3 100644 (file)
@@ -42,27 +42,6 @@ asmlinkage long __sys_clone(unsigned long clone_flags, unsigned long newsp,
                        parent_tid, child_tid);
 }
 
-/* sys_execve() executes a new program.
- * This is called indirectly via a small wrapper
- */
-asmlinkage long __sys_execve(const char __user *filename,
-                         const char __user *const __user *argv,
-                         const char __user *const __user *envp,
-                         struct pt_regs *regs)
-{
-       int error;
-       struct filename *fn;
-
-       fn = getname(filename);
-       error = PTR_ERR(fn);
-       if (IS_ERR(fn))
-               goto out;
-       error = do_execve(fn->name, argv, envp, regs);
-       putname(fn);
-out:
-       return error;
-}
-
 /* Note: used by the compat code even in 64-bit Linux. */
 SYSCALL_DEFINE6(mmap2, unsigned long, addr, unsigned long, len,
                unsigned long, prot, unsigned long, flags,