diff options
Diffstat (limited to 'arch/arm/kernel/entry-common.S')
-rw-r--r-- | arch/arm/kernel/entry-common.S | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index ed7941277ca2..91069666af9f 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S | |||
@@ -86,35 +86,14 @@ ENDPROC(ret_to_user) | |||
86 | */ | 86 | */ |
87 | ENTRY(ret_from_fork) | 87 | ENTRY(ret_from_fork) |
88 | bl schedule_tail | 88 | bl schedule_tail |
89 | cmp r5, #0 | ||
90 | movne r0, r4 | ||
91 | movne lr, pc | ||
92 | movne pc, r5 | ||
89 | get_thread_info tsk | 93 | get_thread_info tsk |
90 | mov why, #1 | ||
91 | b ret_slow_syscall | 94 | b ret_slow_syscall |
92 | ENDPROC(ret_from_fork) | 95 | ENDPROC(ret_from_fork) |
93 | 96 | ||
94 | ENTRY(ret_from_kernel_thread) | ||
95 | UNWIND(.fnstart) | ||
96 | UNWIND(.cantunwind) | ||
97 | bl schedule_tail | ||
98 | mov r0, r4 | ||
99 | adr lr, BSYM(1f) @ kernel threads should not exit | ||
100 | mov pc, r5 | ||
101 | 1: bl do_exit | ||
102 | nop | ||
103 | UNWIND(.fnend) | ||
104 | ENDPROC(ret_from_kernel_thread) | ||
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 | |||
118 | .equ NR_syscalls,0 | 97 | .equ NR_syscalls,0 |
119 | #define CALL(x) .equ NR_syscalls,NR_syscalls+1 | 98 | #define CALL(x) .equ NR_syscalls,NR_syscalls+1 |
120 | #include "calls.S" | 99 | #include "calls.S" |