Skip to content

Commit 8aa67d1

Browse files
Valentin Schneiderctmarinas
authored andcommitted
arm64: 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. Reported-by: Julien Thierry <[email protected]> Reported-by: Will Deacon <[email protected]> Reviewed-by: Julien Thierry <[email protected]> Acked-by: Will Deacon <[email protected]> Signed-off-by: Valentin Schneider <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Marc Zyngier <[email protected]> Cc: Julien Grall <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent 67f52a9 commit 8aa67d1

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

arch/arm64/kernel/entry.S

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ el1_irq:
611611
#ifdef CONFIG_PREEMPT
612612
ldr x24, [tsk, #TSK_TI_PREEMPT] // get preempt count
613613
cbnz x24, 1f // preempt count != 0
614-
bl el1_preempt
614+
bl preempt_schedule_irq // irq en/disable is done inside
615615
1:
616616
#endif
617617
#ifdef CONFIG_TRACE_IRQFLAGS
@@ -620,15 +620,6 @@ el1_irq:
620620
kernel_exit 1
621621
ENDPROC(el1_irq)
622622

623-
#ifdef CONFIG_PREEMPT
624-
el1_preempt:
625-
mov x24, lr
626-
1: bl preempt_schedule_irq // irq en/disable is done inside
627-
ldr x0, [tsk, #TSK_TI_FLAGS] // get new tasks TI_FLAGS
628-
tbnz x0, #TIF_NEED_RESCHED, 1b // needs rescheduling?
629-
ret x24
630-
#endif
631-
632623
/*
633624
* EL0 mode handlers.
634625
*/

0 commit comments

Comments
 (0)