Skip to content

Commit b8f3b15

Browse files
Valentin Schneiderpaulburton
authored andcommitted
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 commit a18815a ("Use preempt_schedule_irq.") initially removed the existing loop, but missed the final branch to restore_all. Commit cdaed73 ("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
1 parent 9e98c67 commit b8f3b15

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎arch/mips/kernel/entry.S‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,14 @@ resume_kernel:
5858
local_irq_disable
5959
lw t0, TI_PRE_COUNT($28)
6060
bnez t0, restore_all
61-
need_resched:
6261
LONG_L t0, TI_FLAGS($28)
6362
andi t1, t0, _TIF_NEED_RESCHED
6463
beqz t1, restore_all
6564
LONG_L t0, PT_STATUS(sp) # Interrupts off?
6665
andi t0, 1
6766
beqz t0, restore_all
68-
jal preempt_schedule_irq
69-
b need_resched
67+
PTR_LA ra, restore_all
68+
j preempt_schedule_irq
7069
#endif
7170

7271
FEXPORT(ret_from_kernel_thread)

0 commit comments

Comments
 (0)