summaryrefslogtreecommitdiff
path: root/arch/hexagon/kernel/syscall.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/hexagon/kernel/syscall.c')
-rw-r--r--arch/hexagon/kernel/syscall.c27
1 files changed, 2 insertions, 25 deletions
diff --git a/arch/hexagon/kernel/syscall.c b/arch/hexagon/kernel/syscall.c
index 25a9bfe3445d..120f1a5e9f3d 100644
--- a/arch/hexagon/kernel/syscall.c
+++ b/arch/hexagon/kernel/syscall.c
@@ -39,7 +39,7 @@ asmlinkage int sys_execve(char __user *ufilename,
const char __user *const __user *argv,
const char __user *const __user *envp)
{
- struct pt_regs *pregs = current_thread_info()->regs;
+ struct pt_regs *pregs = current_pt_regs();
struct filename *filename;
int retval;
@@ -57,33 +57,10 @@ asmlinkage int sys_execve(char __user *ufilename,
asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp,
unsigned long parent_tidp, unsigned long child_tidp)
{
- struct pt_regs *pregs = current_thread_info()->regs;
+ struct pt_regs *pregs = current_pt_regs();
if (!newsp)
newsp = pregs->SP;
return do_fork(clone_flags, newsp, pregs, 0, (int __user *)parent_tidp,
(int __user *)child_tidp);
}
-
-/*
- * Do a system call from the kernel, so as to have a proper pt_regs
- * and recycle the sys_execvpe infrustructure.
- */
-int kernel_execve(const char *filename,
- const char *const argv[], const char *const envp[])
-{
- register unsigned long __a0 asm("r0") = (unsigned long) filename;
- register unsigned long __a1 asm("r1") = (unsigned long) argv;
- register unsigned long __a2 asm("r2") = (unsigned long) envp;
- int retval;
-
- __asm__ volatile(
- " R6 = #%4;\n"
- " trap0(#1);\n"
- " %0 = R0;\n"
- : "=r" (retval)
- : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_execve)
- );
-
- return retval;
-}