aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorValentin Schneider <valentin.schneider@arm.com>2019-09-23 15:36:17 +0100
committerPaul Walmsley <paul.walmsley@sifive.com>2019-10-09 16:48:27 -0700
commitcd9e72b80090a8cd7d84a47a30a06fa92ff277d1 (patch)
tree0e4c829c10514379d9d9635d7e0bbc09ad7b1e65
parent8bb0daef64e5a92db63ad1d3bbf9e280a7b3612a (diff)
downloadlinux-cd9e72b80090a8cd7d84a47a30a06fa92ff277d1.tar.gz
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 <palmer@sifive.com> Signed-off-by: Valentin Schneider <valentin.schneider@arm.com> Cc: Albert Ou <aou@eecs.berkeley.edu> Cc: linux-riscv@lists.infradead.org Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
-rw-r--r--arch/riscv/kernel/entry.S3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/riscv/kernel/entry.S b/arch/riscv/kernel/entry.S
index 2d592da1e7762..8ca4798311429 100644
--- a/arch/riscv/kernel/entry.S
+++ b/arch/riscv/kernel/entry.S
@@ -273,12 +273,11 @@ restore_all:
resume_kernel:
REG_L s0, TASK_TI_PREEMPT_COUNT(tp)
bnez s0, restore_all
-need_resched:
REG_L s0, TASK_TI_FLAGS(tp)
andi s0, s0, _TIF_NEED_RESCHED
beqz s0, restore_all
call preempt_schedule_irq
- j need_resched
+ j restore_all
#endif
work_pending: