Skip to content

Commit

Permalink
powerpc/entry: Remove unneeded need_resched() loop
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Valentin Schneider <valentin.schneider@arm.com>
[mpe: Rebase since CURRENT_THREAD_INFO() removal]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
Valentin Schneider authored and Michael Ellerman committed May 2, 2019
1 parent 32eebf9 commit 90437bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
5 changes: 1 addition & 4 deletions arch/powerpc/kernel/entry_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -906,10 +906,7 @@ resume_kernel:
*/
bl trace_hardirqs_off
#endif
1: bl preempt_schedule_irq
lwz r3,TI_FLAGS(r2)
andi. r0,r3,_TIF_NEED_RESCHED
bne- 1b
bl preempt_schedule_irq
#ifdef CONFIG_TRACE_IRQFLAGS
/* And now, to properly rebalance the above, we tell lockdep they
* are being turned back on, which will happen when we return
Expand Down
8 changes: 1 addition & 7 deletions arch/powerpc/kernel/entry_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -865,13 +865,7 @@ resume_kernel:
* sure we are soft-disabled first and reconcile irq state.
*/
RECONCILE_IRQ_STATE(r3,r4)
1: bl preempt_schedule_irq

/* Re-test flags and eventually loop */
ld r9, PACA_THREAD_INFO(r13)
ld r4,TI_FLAGS(r9)
andi. r0,r4,_TIF_NEED_RESCHED
bne 1b
bl preempt_schedule_irq

/*
* arch_local_irq_restore() from preempt_schedule_irq above may
Expand Down

0 comments on commit 90437bf

Please sign in to comment.