diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-09-25 14:37:05 +0200 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-09-25 14:37:05 +0200 |
commit | 8e5d0661b3948f3c5a143f32d192710375822af2 (patch) | |
tree | ca18920d3f7219f7ffb7ca2fa372b82558938006 /arch/alpha/kernel/process.c | |
parent | spi/pl022: Devicetree support w/o platform data (diff) | |
parent | Linux 3.6-rc6 (diff) | |
download | linux-8e5d0661b3948f3c5a143f32d192710375822af2.tar.xz linux-8e5d0661b3948f3c5a143f32d192710375822af2.zip |
Merge tag 'v3.6-rc6' into spi-drivers
Linux 3.6-rc6
Conflicts:
drivers/spi/spi-omap2-mcspi.c
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) } 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, ®s); + 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); |