aboutsummaryrefslogtreecommitdiffstats
path: root/arch/openrisc
diff options
context:
space:
mode:
authorJonas Bonn <jonas@southpole.se>2012-10-19 12:25:36 -0400
committerJonas Bonn <jonas@southpole.se>2012-10-19 12:33:01 -0400
commita91a2bb1dbd87987645bdb56f49e6a50501b692a (patch)
tree3bc883a09b0ad54f5ed45c6d447c06fe32fc97ce /arch/openrisc
parentcbf23cf1b96819599f6a1b9658d1bf3a97c6ff15 (diff)
openrisc: use generic sys_execve
Signed-off-by: Jonas Bonn <jonas@southpole.se>
Diffstat (limited to 'arch/openrisc')
-rw-r--r--arch/openrisc/include/uapi/asm/unistd.h2
-rw-r--r--arch/openrisc/kernel/entry.S4
-rw-r--r--arch/openrisc/kernel/process.c24
3 files changed, 2 insertions, 28 deletions
diff --git a/arch/openrisc/include/uapi/asm/unistd.h b/arch/openrisc/include/uapi/asm/unistd.h
index 437bdbb61b14..5db7bc0fa5a7 100644
--- a/arch/openrisc/include/uapi/asm/unistd.h
+++ b/arch/openrisc/include/uapi/asm/unistd.h
@@ -20,6 +20,8 @@
20 20
21#define sys_mmap2 sys_mmap_pgoff 21#define sys_mmap2 sys_mmap_pgoff
22 22
23#define __ARCH_WANT_SYS_EXECVE
24
23#include <asm-generic/unistd.h> 25#include <asm-generic/unistd.h>
24 26
25#define __NR_or1k_atomic __NR_arch_specific_syscall 27#define __NR_or1k_atomic __NR_arch_specific_syscall
diff --git a/arch/openrisc/kernel/entry.S b/arch/openrisc/kernel/entry.S
index dce86aef8aba..c60a09df323f 100644
--- a/arch/openrisc/kernel/entry.S
+++ b/arch/openrisc/kernel/entry.S
@@ -1083,10 +1083,6 @@ ENTRY(sys_fork)
1083 l.j _fork_save_extra_regs_and_call 1083 l.j _fork_save_extra_regs_and_call
1084 l.addi r3,r1,0 1084 l.addi r3,r1,0
1085 1085
1086ENTRY(sys_execve)
1087 l.j _sys_execve
1088 l.addi r6,r1,0
1089
1090ENTRY(sys_sigaltstack) 1086ENTRY(sys_sigaltstack)
1091 l.j _sys_sigaltstack 1087 l.j _sys_sigaltstack
1092 l.addi r5,r1,0 1088 l.addi r5,r1,0
diff --git a/arch/openrisc/kernel/process.c b/arch/openrisc/kernel/process.c
index a0f467e438fc..e0874b8e09e4 100644
--- a/arch/openrisc/kernel/process.c
+++ b/arch/openrisc/kernel/process.c
@@ -251,30 +251,6 @@ void dump_elf_thread(elf_greg_t *dest, struct pt_regs* regs)
251 dest[35] = 0; 251 dest[35] = 0;
252} 252}
253 253
254/*
255 * sys_execve() executes a new program.
256 */
257asmlinkage long _sys_execve(const char __user *name,
258 const char __user * const __user *argv,
259 const char __user * const __user *envp,
260 struct pt_regs *regs)
261{
262 int error;
263 struct filename *filename;
264
265 filename = getname(name);
266 error = PTR_ERR(filename);
267
268 if (IS_ERR(filename))
269 goto out;
270
271 error = do_execve(filename->name, argv, envp, regs);
272 putname(filename);
273
274out:
275 return error;
276}
277
278unsigned long get_wchan(struct task_struct *p) 254unsigned long get_wchan(struct task_struct *p)
279{ 255{
280 /* TODO */ 256 /* TODO */