ARM: 7473/1: deal with handlerless restarts without leaving the kernel
[pandora-kernel.git] / arch / arm / kernel / entry-common.S
index 1873f65..8ae58c4 100644 (file)
@@ -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