aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/kernel/entry-common.S
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-07-19 17:48:21 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-07-28 11:11:52 +0100
commit81783786d5cf4aa0d3e15bb0fac856aa8ebf1a76 (patch)
treeea1266df42b055ef03df4f3937f6c6b4326bafc7 /arch/arm/kernel/entry-common.S
parent0a267fa6a15d41c4061358bf2e67c633fdbffc90 (diff)
downloadlinux-linaro-stable-81783786d5cf4aa0d3e15bb0fac856aa8ebf1a76.tar.gz
ARM: 7473/1: deal with handlerless restarts without leaving the kernel
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/entry-common.S')
-rw-r--r--arch/arm/kernel/entry-common.S7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index 1873f653641c..8ae58c47dce6 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -54,7 +54,11 @@ work_pending:
mov r0, sp @ 'regs'
mov r2, why @ 'syscall'
bl do_work_pending
- b no_work_pending
+ tst r0, #1
+ beq no_work_pending
+ ldmia sp, {r0 - r6} @ have to reload r0 - r6
+ b local_restart @ ... and off we go
+
/*
* "slow" syscall return path. "why" tells us if this was a real syscall.
*/
@@ -396,6 +400,7 @@ ENTRY(vector_swi)
eor scno, scno, #__NR_SYSCALL_BASE @ check OS number
#endif
+local_restart:
ldr r10, [tsk, #TI_FLAGS] @ check for syscall tracing
stmdb sp!, {r4, r5} @ push fifth and sixth args