Skip to content

Commit cd9e72b

Browse files
Valentin Schneiderpaul-walmsley-sifive
authored andcommitted
RISC-V: 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. Reviewed-by: Palmer Dabbelt <[email protected]> Signed-off-by: Valentin Schneider <[email protected]> Cc: Albert Ou <[email protected]> Cc: [email protected] Signed-off-by: Paul Walmsley <[email protected]>
1 parent 8bb0dae commit cd9e72b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

arch/riscv/kernel/entry.S

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,12 +273,11 @@ restore_all:
273273
resume_kernel:
274274
REG_L s0, TASK_TI_PREEMPT_COUNT(tp)
275275
bnez s0, restore_all
276-
need_resched:
277276
REG_L s0, TASK_TI_FLAGS(tp)
278277
andi s0, s0, _TIF_NEED_RESCHED
279278
beqz s0, restore_all
280279
call preempt_schedule_irq
281-
j need_resched
280+
j restore_all
282281
#endif
283282

284283
work_pending:

0 commit comments

Comments
 (0)