From: Preeti U Murthy <preeti@linux.vnet.ibm.com>
To: mikey@neuling.org, mpe@ellerman.id.au, rjw@rjwysocki.net,
linux-kernel@vger.kernel.org, benh@kernel.crashing.org,
linuxppc-dev@lists.ozlabs.org
Cc: linux-pm@vger.kernel.org
Subject: [PATCH] cpuidle/powernv: Enter fastsleep on checking if deep idle states are allowed
Date: Fri, 12 Sep 2014 16:31:32 +0530 [thread overview]
Message-ID: <20140912110131.7311.86417.stgit@preeti.in.ibm.com> (raw)
Today the procfs interface /proc/sys/kernel/powersave-nap is used to control
entry into deep idle states beyond snooze. Check for the value of this
parameter before entering fastsleep. We already do this check for nap in
power7_idle().
Signed-off-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
---
drivers/cpuidle/cpuidle-powernv.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/cpuidle/cpuidle-powernv.c b/drivers/cpuidle/cpuidle-powernv.c
index a64be57..b8ba52e 100644
--- a/drivers/cpuidle/cpuidle-powernv.c
+++ b/drivers/cpuidle/cpuidle-powernv.c
@@ -69,6 +69,12 @@ static int fastsleep_loop(struct cpuidle_device *dev,
unsigned long old_lpcr = mfspr(SPRN_LPCR);
unsigned long new_lpcr;
+ /*
+ * Verify if snooze is the only valid cpuidle state
+ */
+ if (!(powersave_nap > 0))
+ return index;
+
if (unlikely(system_state < SYSTEM_RUNNING))
return index;
next reply other threads:[~2014-09-12 11:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-12 11:01 Preeti U Murthy [this message]
2014-09-15 6:59 ` [PATCH] cpuidle/powernv: Enter fastsleep on checking if deep idle states are allowed Michael Ellerman
2014-09-15 8:52 ` Preeti U Murthy
2014-09-15 12:23 ` Benjamin Herrenschmidt
2015-01-30 5:41 ` 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=20140912110131.7311.86417.stgit@preeti.in.ibm.com \
--to=preeti@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mikey@neuling.org \
--cc=mpe@ellerman.id.au \
--cc=rjw@rjwysocki.net \
/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).