aboutsummaryrefslogtreecommitdiffstats
path: root/arch/riscv
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 /arch/riscv
parentriscv: Correct the handling of unexpected ebreak in do_trap_break() (diff)
downloadlinux-dev-cd9e72b80090a8cd7d84a47a30a06fa92ff277d1.tar.xz
linux-dev-cd9e72b80090a8cd7d84a47a30a06fa92ff277d1.zip
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>
Diffstat (limited to 'arch/riscv')
-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 2d592da1e776..8ca479831142 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: