]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
powerpc/cpuidle: Only clear LPCR decrementer wakeup bit on fast sleep entry
authorMichael Neuling <mikey@neuling.org>
Wed, 11 Jun 2014 05:59:27 +0000 (15:59 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 11 Jun 2014 07:05:12 +0000 (17:05 +1000)
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>
drivers/cpuidle/cpuidle-powernv.c

index 719f6fb5b1c35d00108c47a61918741200eae75d..74f5788d50b12986c68fdfdda10d92218314c45e 100644 (file)
@@ -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();