Skip to content

Commit

Permalink
powerpc/book3e: Don't re-trigger decrementer on lazy irq restore
Browse files Browse the repository at this point in the history
The decrementer on BookE acts as a level interrupt and doesn't
need to be re-triggered when going negative. It doesn't go
negative anyways (unless programmed to auto-reload with a
negative value) as it stops when reaching 0.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Benjamin Herrenschmidt committed Jul 9, 2010
1 parent b9f1cd7 commit e8775d4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions arch/powerpc/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,17 @@ notrace void raw_local_irq_restore(unsigned long en)
* use local_paca instead of get_paca() to avoid preemption checking.
*/
local_paca->hard_enabled = en;

#ifndef CONFIG_BOOKE
/* On server, re-trigger the decrementer if it went negative since
* some processors only trigger on edge transitions of the sign bit.
*
* BookE has a level sensitive decrementer (latches in TSR) so we
* don't need that
*/
if ((int)mfspr(SPRN_DEC) < 0)
mtspr(SPRN_DEC, 1);
#endif /* CONFIG_BOOKE */

/*
* Force the delivery of pending soft-disabled interrupts on PS3.
Expand Down

0 comments on commit e8775d4

Please sign in to comment.