aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-09-29 14:49:48 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-10-16 19:03:53 -0400
commitf7200d4c504a385b1b70f3bab379f99745f7ef6a (patch)
treedfdf424a9f4fc80d502e2afc7defe03565939abe /arch/sparc
parentab3486813bbbd9e74efb4c130183f3994dada4bd (diff)
sparc32: switch to generic sys_execve()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/include/asm/syscalls.h4
-rw-r--r--arch/sparc/include/asm/unistd.h2
-rw-r--r--arch/sparc/kernel/entry.S19
-rw-r--r--arch/sparc/kernel/process_32.c28
4 files changed, 4 insertions, 49 deletions
diff --git a/arch/sparc/include/asm/syscalls.h b/arch/sparc/include/asm/syscalls.h
index 4b05df397740..bf8972adea17 100644
--- a/arch/sparc/include/asm/syscalls.h
+++ b/arch/sparc/include/asm/syscalls.h
@@ -8,8 +8,4 @@ extern asmlinkage long sparc_do_fork(unsigned long clone_flags,
8 struct pt_regs *regs, 8 struct pt_regs *regs,
9 unsigned long stack_size); 9 unsigned long stack_size);
10 10
11#ifndef __arch64__
12extern asmlinkage int sparc_execve(struct pt_regs *regs);
13#endif
14
15#endif /* _SPARC64_SYSCALLS_H */ 11#endif /* _SPARC64_SYSCALLS_H */
diff --git a/arch/sparc/include/asm/unistd.h b/arch/sparc/include/asm/unistd.h
index 32bd0aaeedfa..c3e5d8b64171 100644
--- a/arch/sparc/include/asm/unistd.h
+++ b/arch/sparc/include/asm/unistd.h
@@ -45,8 +45,8 @@
45#define __ARCH_WANT_COMPAT_SYS_TIME 45#define __ARCH_WANT_COMPAT_SYS_TIME
46#define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND 46#define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND
47#define __ARCH_WANT_COMPAT_SYS_SENDFILE 47#define __ARCH_WANT_COMPAT_SYS_SENDFILE
48#define __ARCH_WANT_SYS_EXECVE
49#endif 48#endif
49#define __ARCH_WANT_SYS_EXECVE
50 50
51/* 51/*
52 * "Conditional" syscalls 52 * "Conditional" syscalls
diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S
index 36b35e54a6de..21fd1a8f47d2 100644
--- a/arch/sparc/kernel/entry.S
+++ b/arch/sparc/kernel/entry.S
@@ -806,23 +806,10 @@ sys_nis_syscall:
806 call c_sys_nis_syscall 806 call c_sys_nis_syscall
807 mov %l5, %o7 807 mov %l5, %o7
808 808
809 .align 4
810 .globl sys_execve
811sys_execve:
812 mov %o7, %l5
813 add %sp, STACKFRAME_SZ, %o0 ! pt_regs *regs arg
814 call sparc_execve
815 mov %l5, %o7
816
817 .globl sunos_execv
818sunos_execv: 809sunos_execv:
819 st %g0, [%sp + STACKFRAME_SZ + PT_I2] 810 .globl sunos_execv
820 811 b sys_execve
821 call sparc_execve 812 clr %i2
822 add %sp, STACKFRAME_SZ, %o0
823
824 b ret_sys_call
825 ld [%sp + STACKFRAME_SZ + PT_I0], %o0
826 813
827 .align 4 814 .align 4
828 .globl sys_sparc_pipe 815 .globl sys_sparc_pipe
diff --git a/arch/sparc/kernel/process_32.c b/arch/sparc/kernel/process_32.c
index 72764356d308..bf4c6addce7b 100644
--- a/arch/sparc/kernel/process_32.c
+++ b/arch/sparc/kernel/process_32.c
@@ -476,34 +476,6 @@ int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs)
476 return 1; 476 return 1;
477} 477}
478 478
479/*
480 * sparc_execve() executes a new program after the asm stub has set
481 * things up for us. This should basically do what I want it to.
482 */
483asmlinkage int sparc_execve(struct pt_regs *regs)
484{
485 int error, base = 0;
486 struct filename *filename;
487
488 /* Check for indirect call. */
489 if(regs->u_regs[UREG_G1] == 0)
490 base = 1;
491
492 filename = getname((char __user *)regs->u_regs[base + UREG_I0]);
493 error = PTR_ERR(filename);
494 if(IS_ERR(filename))
495 goto out;
496 error = do_execve(filename->name,
497 (const char __user *const __user *)
498 regs->u_regs[base + UREG_I1],
499 (const char __user *const __user *)
500 regs->u_regs[base + UREG_I2],
501 regs);
502 putname(filename);
503out:
504 return error;
505}
506
507unsigned long get_wchan(struct task_struct *task) 479unsigned long get_wchan(struct task_struct *task)
508{ 480{
509 unsigned long pc, fp, bias = 0; 481 unsigned long pc, fp, bias = 0;