diff options
Diffstat (limited to 'arch/sparc/kernel/sys_sparc_32.c')
-rw-r--r-- | arch/sparc/kernel/sys_sparc_32.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/arch/sparc/kernel/sys_sparc_32.c b/arch/sparc/kernel/sys_sparc_32.c index 0c9b31b22e07..a8e6eb0a11d5 100644 --- a/arch/sparc/kernel/sys_sparc_32.c +++ b/arch/sparc/kernel/sys_sparc_32.c | |||
@@ -258,27 +258,3 @@ out: | |||
258 | up_read(&uts_sem); | 258 | up_read(&uts_sem); |
259 | return err; | 259 | return err; |
260 | } | 260 | } |
261 | |||
262 | /* | ||
263 | * Do a system call from kernel instead of calling sys_execve so we | ||
264 | * end up with proper pt_regs. | ||
265 | */ | ||
266 | int kernel_execve(const char *filename, | ||
267 | const char *const argv[], | ||
268 | const char *const envp[]) | ||
269 | { | ||
270 | long __res; | ||
271 | register long __g1 __asm__ ("g1") = __NR_execve; | ||
272 | register long __o0 __asm__ ("o0") = (long)(filename); | ||
273 | register long __o1 __asm__ ("o1") = (long)(argv); | ||
274 | register long __o2 __asm__ ("o2") = (long)(envp); | ||
275 | asm volatile ("t 0x10\n\t" | ||
276 | "bcc 1f\n\t" | ||
277 | "mov %%o0, %0\n\t" | ||
278 | "sub %%g0, %%o0, %0\n\t" | ||
279 | "1:\n\t" | ||
280 | : "=r" (__res), "=&r" (__o0) | ||
281 | : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__g1) | ||
282 | : "cc"); | ||
283 | return __res; | ||
284 | } | ||