linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cpuidle/powernv: Enter fastsleep on checking if deep idle states are allowed
@ 2014-09-12 11:01 Preeti U Murthy
  2014-09-15  6:59 ` Michael Ellerman
  0 siblings, 1 reply; 5+ messages in thread
From: Preeti U Murthy @ 2014-09-12 11:01 UTC (permalink / raw)
  To: mikey, mpe, rjw, linux-kernel, benh, linuxppc-dev; +Cc: linux-pm

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;
 

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-01-30  5:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-12 11:01 [PATCH] cpuidle/powernv: Enter fastsleep on checking if deep idle states are allowed Preeti U Murthy
2014-09-15  6:59 ` 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

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).