summaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/entry-common.S
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-10-10 22:23:29 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-10-12 13:35:23 -0400
commit9fff2fa0db911b0b75ec1f9bec72460c0a676ef5 (patch)
tree38fd00adc9bde62de1d5f6346dc670e0e599068f /arch/arm/kernel/entry-common.S
parent22e2430d60dbdfcdd732a086e9ef2dbd74c266d1 (diff)
downloadop-kernel-dev-9fff2fa0db911b0b75ec1f9bec72460c0a676ef5.zip
op-kernel-dev-9fff2fa0db911b0b75ec1f9bec72460c0a676ef5.tar.gz
arm: switch to saner kernel_execve() semantics
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.S29
1 files changed, 4 insertions, 25 deletions
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index ed79412..9106966 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -86,35 +86,14 @@ ENDPROC(ret_to_user)
*/
ENTRY(ret_from_fork)
bl schedule_tail
+ cmp r5, #0
+ movne r0, r4
+ movne lr, pc
+ movne pc, r5
get_thread_info tsk
- mov why, #1
b ret_slow_syscall
ENDPROC(ret_from_fork)
-ENTRY(ret_from_kernel_thread)
- UNWIND(.fnstart)
- UNWIND(.cantunwind)
- bl schedule_tail
- mov r0, r4
- adr lr, BSYM(1f) @ kernel threads should not exit
- mov pc, r5
-1: bl do_exit
- nop
- 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