diff options
author | Mark Salter <msalter@redhat.com> | 2012-09-21 12:26:39 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-10-01 00:59:09 -0400 |
commit | 680a14535c330481517d3f95b2277353a14b8442 (patch) | |
tree | 2059d744e0fc93706864b2396b45cf0673d39286 /arch/c6x | |
parent | 39fcf44099dd64679c232c4a7bb81cf469e4e43c (diff) |
c6x: switch to generic sys_execve
Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/c6x')
-rw-r--r-- | arch/c6x/include/asm/syscalls.h | 5 | ||||
-rw-r--r-- | arch/c6x/include/asm/unistd.h | 1 | ||||
-rw-r--r-- | arch/c6x/kernel/entry.S | 23 | ||||
-rw-r--r-- | arch/c6x/kernel/process.c | 22 |
4 files changed, 1 insertions, 50 deletions
diff --git a/arch/c6x/include/asm/syscalls.h b/arch/c6x/include/asm/syscalls.h index aed53da703c9..e7b8991dc07c 100644 --- a/arch/c6x/include/asm/syscalls.h +++ b/arch/c6x/include/asm/syscalls.h | |||
@@ -44,11 +44,6 @@ extern int sys_cache_sync(unsigned long s, unsigned long e); | |||
44 | struct pt_regs; | 44 | struct pt_regs; |
45 | 45 | ||
46 | extern asmlinkage long sys_c6x_clone(struct pt_regs *regs); | 46 | extern asmlinkage long sys_c6x_clone(struct pt_regs *regs); |
47 | extern asmlinkage long sys_c6x_execve(const char __user *name, | ||
48 | const char __user *const __user *argv, | ||
49 | const char __user *const __user *envp, | ||
50 | struct pt_regs *regs); | ||
51 | |||
52 | 47 | ||
53 | #include <asm-generic/syscalls.h> | 48 | #include <asm-generic/syscalls.h> |
54 | 49 | ||
diff --git a/arch/c6x/include/asm/unistd.h b/arch/c6x/include/asm/unistd.h index 1ce3a6f2372b..3c131d5888c1 100644 --- a/arch/c6x/include/asm/unistd.h +++ b/arch/c6x/include/asm/unistd.h | |||
@@ -17,6 +17,7 @@ | |||
17 | #define _ASM_C6X_UNISTD_H | 17 | #define _ASM_C6X_UNISTD_H |
18 | 18 | ||
19 | #define __ARCH_WANT_KERNEL_EXECVE | 19 | #define __ARCH_WANT_KERNEL_EXECVE |
20 | #define __ARCH_WANT_SYS_EXECVE | ||
20 | 21 | ||
21 | /* Use the standard ABI for syscalls. */ | 22 | /* Use the standard ABI for syscalls. */ |
22 | #include <asm-generic/unistd.h> | 23 | #include <asm-generic/unistd.h> |
diff --git a/arch/c6x/kernel/entry.S b/arch/c6x/kernel/entry.S index 32e3683da718..5449c36018fe 100644 --- a/arch/c6x/kernel/entry.S +++ b/arch/c6x/kernel/entry.S | |||
@@ -647,29 +647,6 @@ ENTRY(sys_rt_sigreturn) | |||
647 | #endif | 647 | #endif |
648 | ENDPROC(sys_rt_sigreturn) | 648 | ENDPROC(sys_rt_sigreturn) |
649 | 649 | ||
650 | ENTRY(sys_execve) | ||
651 | ADDAW .D2 SP,2,B6 ; put regs addr in 4th parameter | ||
652 | ; & adjust regs stack addr | ||
653 | LDW .D2T2 *+SP(REGS_B4+8),B4 | ||
654 | |||
655 | ;; c6x_execve(char *name, char **argv, | ||
656 | ;; char **envp, struct pt_regs *regs) | ||
657 | #ifdef CONFIG_C6X_BIG_KERNEL | ||
658 | || MVKL .S1 sys_c6x_execve,A0 | ||
659 | MVKH .S1 sys_c6x_execve,A0 | ||
660 | B .S2X A0 | ||
661 | #else | ||
662 | || B .S2 sys_c6x_execve | ||
663 | #endif | ||
664 | STW .D2T2 B3,*SP--[2] | ||
665 | ADDKPC .S2 ret_from_c6x_execve,B3,3 | ||
666 | |||
667 | ret_from_c6x_execve: | ||
668 | LDW .D2T2 *++SP[2],B3 | ||
669 | NOP 4 | ||
670 | BNOP .S2 B3,5 | ||
671 | ENDPROC(sys_execve) | ||
672 | |||
673 | ENTRY(sys_pread_c6x) | 650 | ENTRY(sys_pread_c6x) |
674 | MV .D2X A8,B7 | 651 | MV .D2X A8,B7 |
675 | #ifdef CONFIG_C6X_BIG_KERNEL | 652 | #ifdef CONFIG_C6X_BIG_KERNEL |
diff --git a/arch/c6x/kernel/process.c b/arch/c6x/kernel/process.c index d2ffc9bdaba1..f98616d92f2d 100644 --- a/arch/c6x/kernel/process.c +++ b/arch/c6x/kernel/process.c | |||
@@ -207,28 +207,6 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, | |||
207 | return 0; | 207 | return 0; |
208 | } | 208 | } |
209 | 209 | ||
210 | /* | ||
211 | * c6x_execve() executes a new program. | ||
212 | */ | ||
213 | SYSCALL_DEFINE4(c6x_execve, const char __user *, name, | ||
214 | const char __user *const __user *, argv, | ||
215 | const char __user *const __user *, envp, | ||
216 | struct pt_regs *, regs) | ||
217 | { | ||
218 | int error; | ||
219 | char *filename; | ||
220 | |||
221 | filename = getname(name); | ||
222 | error = PTR_ERR(filename); | ||
223 | if (IS_ERR(filename)) | ||
224 | goto out; | ||
225 | |||
226 | error = do_execve(filename, argv, envp, regs); | ||
227 | putname(filename); | ||
228 | out: | ||
229 | return error; | ||
230 | } | ||
231 | |||
232 | unsigned long get_wchan(struct task_struct *p) | 210 | unsigned long get_wchan(struct task_struct *p) |
233 | { | 211 | { |
234 | return p->thread.wchan; | 212 | return p->thread.wchan; |