aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m32r/kernel/sys_m32r.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-10-15 16:26:03 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-10-31 22:59:31 -0400
commitea4a1da9b2e6f419526b5fde15cd5563096368eb (patch)
tree470d747b0ea28293467292ac88f083e6b2370a29 /arch/m32r/kernel/sys_m32r.c
parentddffeb8c4d0331609ef2581d84de4d763607bd37 (diff)
m32r: switch to generic kernel_thread()/kernel_execve()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/m32r/kernel/sys_m32r.c')
-rw-r--r--arch/m32r/kernel/sys_m32r.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/arch/m32r/kernel/sys_m32r.c b/arch/m32r/kernel/sys_m32r.c
index d841fb6cc703..c3fdd632fba7 100644
--- a/arch/m32r/kernel/sys_m32r.c
+++ b/arch/m32r/kernel/sys_m32r.c
@@ -88,24 +88,3 @@ asmlinkage int sys_cachectl(char *addr, int nbytes, int op)
88 /* Not implemented yet. */ 88 /* Not implemented yet. */
89 return -ENOSYS; 89 return -ENOSYS;
90} 90}
91
92/*
93 * Do a system call from kernel instead of calling sys_execve so we
94 * end up with proper pt_regs.
95 */
96int kernel_execve(const char *filename,
97 const char *const argv[],
98 const char *const envp[])
99{
100 register long __scno __asm__ ("r7") = __NR_execve;
101 register long __arg3 __asm__ ("r2") = (long)(envp);
102 register long __arg2 __asm__ ("r1") = (long)(argv);
103 register long __res __asm__ ("r0") = (long)(filename);
104 __asm__ __volatile__ (
105 "trap #" SYSCALL_VECTOR "|| nop"
106 : "=r" (__res)
107 : "r" (__scno), "0" (__res), "r" (__arg2),
108 "r" (__arg3)
109 : "memory");
110 return __res;
111}