diff options
Diffstat (limited to 'arch/arm/kernel/entry-common.S')
-rw-r--r-- | arch/arm/kernel/entry-common.S | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index 9a48b7a577e7..4a6e46a9a3d7 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S | |||
@@ -103,6 +103,18 @@ ENTRY(ret_from_kernel_thread) | |||
103 | UNWIND(.fnend) | 103 | UNWIND(.fnend) |
104 | ENDPROC(ret_from_kernel_thread) | 104 | ENDPROC(ret_from_kernel_thread) |
105 | 105 | ||
106 | /* | ||
107 | * turn a kernel thread into userland process | ||
108 | * use: ret_from_kernel_execve(struct pt_regs *normal) | ||
109 | */ | ||
110 | ENTRY(ret_from_kernel_execve) | ||
111 | mov why, #0 @ not a syscall | ||
112 | str why, [r0, #S_R0] @ ... and we want 0 in ->ARM_r0 as well | ||
113 | get_thread_info tsk @ thread structure | ||
114 | mov sp, r0 @ stack pointer just under pt_regs | ||
115 | b ret_slow_syscall | ||
116 | ENDPROC(ret_from_kernel_execve) | ||
117 | |||
106 | .equ NR_syscalls,0 | 118 | .equ NR_syscalls,0 |
107 | #define CALL(x) .equ NR_syscalls,NR_syscalls+1 | 119 | #define CALL(x) .equ NR_syscalls,NR_syscalls+1 |
108 | #include "calls.S" | 120 | #include "calls.S" |