diff options
author | Preeti U Murthy <preeti@linux.vnet.ibm.com> | 2014-03-03 15:12:48 +0530 |
---|---|---|
committer | Eli Qiao <taget@linux.vnet.ibm.com> | 2014-03-04 12:02:34 +0800 |
commit | 76048e836ff1b1136ca7f770820f99223105c5d8 (patch) | |
tree | f1b4af5ce8ef2cfbf8247f39587c809226c51984 | |
parent | 3b170b050d689ed3707db0c82528af2f2c4affac (diff) | |
download | powerkvm-76048e836ff1b1136ca7f770820f99223105c5d8.tar.gz |
cpuidle/powernv: Enable Fastsleep at boot time
Fast sleep can be enabled today, only after writing into the proc interface
/proc/sys/kernel/powersave-nap with a value greater than 1. Remove this
constraint, now that we have a stable framework to support fast sleep, so
that it is enabled by default at boot.
However the same proc interface is also used to convey if deep idle states
beyond snooze can be entered into or not. Hence retain the check on
powersave-nap in fast sleep to verify if this is the case.
Signed-off-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
-rw-r--r-- | drivers/cpuidle/cpuidle-powerpc-book3s.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/cpuidle/cpuidle-powerpc-book3s.c b/drivers/cpuidle/cpuidle-powerpc-book3s.c index 880ef307551007..f549cd6c391692 100644 --- a/drivers/cpuidle/cpuidle-powerpc-book3s.c +++ b/drivers/cpuidle/cpuidle-powerpc-book3s.c @@ -270,7 +270,10 @@ static int fastsleep_loop(struct cpuidle_device *dev, unsigned long wakeup_srr1=0; char *srr1_wakeup_bits[]={"???","NoNAP","NAP","SLEEP"}; - if (powersave_nap < 2) + /* + * Verify if snooze is the only valid cpuidle state + */ + if (!(powersave_nap > 0)) return index; /* Wait until system is up; having nap active during |