summaryrefslogtreecommitdiffstats
path: root/arch/alpha/kernel/process.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-08-27 07:10:40 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-08-27 07:10:40 -0700
commit8f8b77bfdce811acbcf2248219a7aab5f92de938 (patch)
treec76c736bdb931d5de55a0de20cd9822d7b48ce8b /arch/alpha/kernel/process.c
parentd602a064f9818819d6c99d99f101bc6b1ae1540d (diff)
parentfea7a08acb13524b47711625eebea40a0ede69a0 (diff)
Merge 3.6-rc3 into staging-next
This picks up fixes we want in this branch to allow us to properly test. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/alpha/kernel/process.c')
-rw-r--r--arch/alpha/kernel/process.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c
index 153d3fce3e8..d6fde98b74b 100644
--- a/arch/alpha/kernel/process.c
+++ b/arch/alpha/kernel/process.c
@@ -455,3 +455,22 @@ get_wchan(struct task_struct *p)
}
return pc;
}
+
+int kernel_execve(const char *path, const char *const argv[], const char *const envp[])
+{
+ /* Avoid the HAE being gratuitously wrong, which would cause us
+ to do the whole turn off interrupts thing and restore it. */
+ struct pt_regs regs = {.hae = alpha_mv.hae_cache};
+ int err = do_execve(path, argv, envp, &regs);
+ if (!err) {
+ struct pt_regs *p = current_pt_regs();
+ /* copy regs to normal position and off to userland we go... */
+ *p = regs;
+ __asm__ __volatile__ (
+ "mov %0, $sp;"
+ "br $31, ret_from_sys_call"
+ : : "r"(p));
+ }
+ return err;
+}
+EXPORT_SYMBOL(kernel_execve);