Commit 147aece2 authored by Vineet Gupta's avatar Vineet Gupta

ARC: Entry Handler tweaks: Simplify branch for in-kernel preemption

Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
parent 1898a959
...@@ -586,11 +586,7 @@ ARC_ENTRY ret_from_exception ...@@ -586,11 +586,7 @@ ARC_ENTRY ret_from_exception
; Pre-{IRQ,Trap,Exception} K/U mode from pt_regs->status32 ; Pre-{IRQ,Trap,Exception} K/U mode from pt_regs->status32
ld r8, [sp, PT_status32] ; returning to User/Kernel Mode ld r8, [sp, PT_status32] ; returning to User/Kernel Mode
#ifdef CONFIG_PREEMPT
bbit0 r8, STATUS_U_BIT, resume_kernel_mode 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 ; Before returning to User mode check-for-and-complete any pending work
; such as rescheduling/signal-delivery etc. ; such as rescheduling/signal-delivery etc.
...@@ -650,10 +646,10 @@ resume_user_mode_begin: ...@@ -650,10 +646,10 @@ resume_user_mode_begin:
b resume_user_mode_begin ; unconditionally back to U mode ret chks b resume_user_mode_begin ; unconditionally back to U mode ret chks
; for single exit point from this block ; for single exit point from this block
#ifdef CONFIG_PREEMPT
resume_kernel_mode: resume_kernel_mode:
#ifdef CONFIG_PREEMPT
; Can't preempt if preemption disabled ; Can't preempt if preemption disabled
GET_CURR_THR_INFO_FROM_SP r10 GET_CURR_THR_INFO_FROM_SP r10
ld r8, [r10, THREAD_INFO_PREEMPT_COUNT] ld r8, [r10, THREAD_INFO_PREEMPT_COUNT]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment