summaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/entry-common.S
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-08-02 11:46:39 +0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-09-30 22:21:36 -0400
commit583d632fb3f6d7e9d133a7260829dd7565f8cc99 (patch)
tree57760f02b8f9aa876a08e309f0ff258442bfa639 /arch/arm/kernel/entry-common.S
parent9e14f828ee4a7a4a98703e380d180717a579fb35 (diff)
downloadop-kernel-dev-583d632fb3f6d7e9d133a7260829dd7565f8cc99.zip
op-kernel-dev-583d632fb3f6d7e9d133a7260829dd7565f8cc99.tar.gz
arm: introduce ret_from_kernel_execve(), switch to generic kernel_execve()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/entry-common.S')
-rw-r--r--arch/arm/kernel/entry-common.S12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index 9a48b7a..4a6e46a 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -103,6 +103,18 @@ ENTRY(ret_from_kernel_thread)
UNWIND(.fnend)
ENDPROC(ret_from_kernel_thread)
+/*
+ * turn a kernel thread into userland process
+ * use: ret_from_kernel_execve(struct pt_regs *normal)
+ */
+ENTRY(ret_from_kernel_execve)
+ mov why, #0 @ not a syscall
+ str why, [r0, #S_R0] @ ... and we want 0 in ->ARM_r0 as well
+ get_thread_info tsk @ thread structure
+ mov sp, r0 @ stack pointer just under pt_regs
+ b ret_slow_syscall
+ENDPROC(ret_from_kernel_execve)
+
.equ NR_syscalls,0
#define CALL(x) .equ NR_syscalls,NR_syscalls+1
#include "calls.S"
OpenPOWER on IntegriCloud