Skip to content

Commit

Permalink
powerpc/cpuidle: Only clear LPCR decrementer wakeup bit on fast sleep…
Browse files Browse the repository at this point in the history
… entry

Currently when entering fastsleep we clear all LPCR PECE bits.

This patch changes it to only clear the decrementer bit (ie. PECE1), which is
the only bit we really need to clear here.  This is needed if we want to set
other wakeup causes like the PECEDH bit so we can use hypervisor doorbells on
powernv.  Also we no longer clear the MER bit as it should never be set in the
host anyway.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Michael Neuling authored and Benjamin Herrenschmidt committed Jun 11, 2014
1 parent 5c7a35e commit 9b6a68d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions drivers/cpuidle/cpuidle-powernv.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,10 @@ static int fastsleep_loop(struct cpuidle_device *dev,
return index;

new_lpcr = old_lpcr;
new_lpcr &= ~(LPCR_MER | LPCR_PECE); /* lpcr[mer] must be 0 */

/* exit powersave upon external interrupt, but not decrementer
* interrupt.
/* Do not exit powersave upon decrementer as we've setup the timer
* offload.
*/
new_lpcr |= LPCR_PECE0;
new_lpcr &= ~LPCR_PECE1;

mtspr(SPRN_LPCR, new_lpcr);
power7_sleep();
Expand Down

0 comments on commit 9b6a68d

Please sign in to comment.