diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-08-27 10:15:30 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-08-27 10:15:30 -0400 |
| commit | a7bdf7fa33127bf08eb0810698bca607a9462df4 (patch) | |
| tree | 2f4be686e49710d10cc4f5ebc2d5f06ae030b9bd /arch/alpha/kernel/process.c | |
| parent | 7fda953ffed1b94aa68f80c6c3ab312328aedcb3 (diff) | |
| parent | fea7a08acb13524b47711625eebea40a0ede69a0 (diff) | |
Merge v3.6-rc3 into usb-next
This picks up fixes that we need in this branch for testing.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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); | ||
