diff options
Diffstat (limited to 'arch/alpha/kernel/process.c')
-rw-r--r-- | arch/alpha/kernel/process.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c index 153d3fce3e8e..d6fde98b74b3 100644 --- a/arch/alpha/kernel/process.c +++ b/arch/alpha/kernel/process.c | |||
@@ -455,3 +455,22 @@ get_wchan(struct task_struct *p) | |||
455 | } | 455 | } |
456 | return pc; | 456 | return pc; |
457 | } | 457 | } |
458 | |||
459 | int kernel_execve(const char *path, const char *const argv[], const char *const envp[]) | ||
460 | { | ||
461 | /* Avoid the HAE being gratuitously wrong, which would cause us | ||
462 | to do the whole turn off interrupts thing and restore it. */ | ||
463 | struct pt_regs regs = {.hae = alpha_mv.hae_cache}; | ||
464 | int err = do_execve(path, argv, envp, ®s); | ||
465 | if (!err) { | ||
466 | struct pt_regs *p = current_pt_regs(); | ||
467 | /* copy regs to normal position and off to userland we go... */ | ||
468 | *p = regs; | ||
469 | __asm__ __volatile__ ( | ||
470 | "mov %0, $sp;" | ||
471 | "br $31, ret_from_sys_call" | ||
472 | : : "r"(p)); | ||
473 | } | ||
474 | return err; | ||
475 | } | ||
476 | EXPORT_SYMBOL(kernel_execve); | ||