From: Michael Neuling <mikey@neuling.org>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Preeti U Murthy <preeti@linux.vnet.ibm.com>,
linuxppc-dev@lists.ozlabs.org, Paul Mackerras <paulus@samba.org>,
Anton Blanchard <anton@samba.org>
Subject: [PATCH 1/2] powerpc/cpuidle: Only clear LPCR decrementer wakeup bit on fast sleep entry
Date: Wed, 11 Jun 2014 15:59:24 +1000 [thread overview]
Message-ID: <1402466368-22583-2-git-send-email-mikey@neuling.org> (raw)
In-Reply-To: <1402466368-22583-1-git-send-email-mikey@neuling.org>
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>
---
drivers/cpuidle/cpuidle-powernv.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/cpuidle/cpuidle-powernv.c b/drivers/cpuidle/cpuidle-powernv.c
index 719f6fb..74f5788 100644
--- a/drivers/cpuidle/cpuidle-powernv.c
+++ b/drivers/cpuidle/cpuidle-powernv.c
@@ -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();
--
1.9.1
next prev parent reply other threads:[~2014-06-11 5:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-11 5:59 [PATCH 0/2] powerpc/powernv: Enable POWER8 doorbells Michael Neuling
2014-06-11 5:59 ` Michael Neuling [this message]
2014-06-11 5:59 ` [PATCH 2/2] powerpc/powernv: Enable POWER8 doorbell IPIs Michael Neuling
2014-06-11 5:59 ` [PATCH 0/2] powerpc/powernv: Enable POWER8 doorbells Michael Neuling
2014-06-11 5:59 ` [PATCH 1/2] powerpc/cpuidle: Only clear LPCR decrementer wakeup bit on fast sleep entry Michael Neuling
2014-06-11 5:59 ` [PATCH 2/2] powerpc/powernv: Enable POWER8 doorbell IPIs Michael Neuling
-- strict thread matches above, loose matches on Subject: below --
2014-06-02 6:57 [PATCH 1/2] powerpc/cpuidle: Only clear LPCR decrementer wakeup bit on fast sleep entry Michael Neuling
2014-06-05 3:05 ` Preeti U Murthy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1402466368-22583-2-git-send-email-mikey@neuling.org \
--to=mikey@neuling.org \
--cc=anton@samba.org \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.org \
--cc=preeti@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).