MIPS: entry: Remove unneeded need_resched() loop
Since the enabling and disabling of IRQs within preempt_schedule_irq() is contained in a need_resched() loop, we don't need the outer arch code loop. Note that commita18815abcd("Use preempt_schedule_irq.") initially removed the existing loop, but missed the final branch to restore_all. Commitcdaed73afb("Fix preemption bug.") missed that and reintroduced the loop. Signed-off-by: Valentin Schneider <valentin.schneider@arm.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Paul Burton <paul.burton@mips.com> Cc: James Hogan <jhogan@kernel.org> Cc: linux-mips@vger.kernel.org Signed-off-by: Paul Burton <paul.burton@mips.com> Cc: linux-kernel@vger.kernel.org
This commit is contained in:
committed by
Paul Burton
parent
9e98c678c2
commit
b8f3b15a7b
@@ -58,15 +58,14 @@ resume_kernel:
|
|||||||
local_irq_disable
|
local_irq_disable
|
||||||
lw t0, TI_PRE_COUNT($28)
|
lw t0, TI_PRE_COUNT($28)
|
||||||
bnez t0, restore_all
|
bnez t0, restore_all
|
||||||
need_resched:
|
|
||||||
LONG_L t0, TI_FLAGS($28)
|
LONG_L t0, TI_FLAGS($28)
|
||||||
andi t1, t0, _TIF_NEED_RESCHED
|
andi t1, t0, _TIF_NEED_RESCHED
|
||||||
beqz t1, restore_all
|
beqz t1, restore_all
|
||||||
LONG_L t0, PT_STATUS(sp) # Interrupts off?
|
LONG_L t0, PT_STATUS(sp) # Interrupts off?
|
||||||
andi t0, 1
|
andi t0, 1
|
||||||
beqz t0, restore_all
|
beqz t0, restore_all
|
||||||
jal preempt_schedule_irq
|
PTR_LA ra, restore_all
|
||||||
b need_resched
|
j preempt_schedule_irq
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
FEXPORT(ret_from_kernel_thread)
|
FEXPORT(ret_from_kernel_thread)
|
||||||
|
|||||||
Reference in New Issue
Block a user