]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARC: Simplify branch for in-kernel preemption
authorVineet Gupta <vgupta@synopsys.com>
Tue, 14 May 2013 13:00:50 +0000 (18:30 +0530)
committerVineet Gupta <vgupta@synopsys.com>
Sat, 25 May 2013 08:58:29 +0000 (14:28 +0530)
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
arch/arc/kernel/entry.S

index 0c6d664d4a8379512c32c7b52d8fbd0d321cf70e..1c50c50e49870f6c83834acfdd51261625ea9b79 100644 (file)
@@ -589,11 +589,7 @@ ARC_ENTRY ret_from_exception
        ; Pre-{IRQ,Trap,Exception} K/U mode from pt_regs->status32
        ld  r8, [sp, PT_status32]   ; returning to User/Kernel Mode
 
-#ifdef CONFIG_PREEMPT
        bbit0  r8, STATUS_U_BIT, resume_kernel_mode
-#else
-       bbit0  r8, STATUS_U_BIT, restore_regs
-#endif
 
        ; Before returning to User mode check-for-and-complete any pending work
        ; such as rescheduling/signal-delivery etc.
@@ -653,10 +649,10 @@ resume_user_mode_begin:
        b      resume_user_mode_begin   ; unconditionally back to U mode ret chks
                                        ; for single exit point from this block
 
-#ifdef CONFIG_PREEMPT
-
 resume_kernel_mode:
 
+#ifdef CONFIG_PREEMPT
+
        ; Can't preempt if preemption disabled
        GET_CURR_THR_INFO_FROM_SP   r10
        ld  r8, [r10, THREAD_INFO_PREEMPT_COUNT]