diff options
author | Deepthi Dharwar <deepthi@linux.vnet.ibm.com> | 2011-11-29 21:47:03 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-12-07 21:57:34 -0500 |
commit | e8bb3e00cff93ef2a0cfc09c3294aa37b4737e09 (patch) | |
tree | 3d9e72c1a6f600c90a93213a7b450afed39ea789 /arch/powerpc | |
parent | e179816ce60033ce560b28e01bc555ed5116cbe9 (diff) |
powerpc/cpuidle: Handle power_save=off
This patch makes pseries_idle_driver not to be registered when
power_save=off kernel boot option is specified. The
cpuidle_disable variable used here is similar to
its usage on x86. If cpuidle_disable is set then
sysfs entries for cpuidle framework are not created
and the required drivers are not loaded.
Signed-off-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
Signed-off-by: Trinabh Gupta <g.trinabh@gmail.com>
Signed-off-by: Arun R Bharadwaj <arun.r.bharadwaj@gmail.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/include/asm/processor.h | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/processor_idle.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h index 811b7e74437..b585bff1a02 100644 --- a/arch/powerpc/include/asm/processor.h +++ b/arch/powerpc/include/asm/processor.h | |||
@@ -382,6 +382,7 @@ static inline unsigned long get_clean_sp(struct pt_regs *regs, int is_32) | |||
382 | } | 382 | } |
383 | #endif | 383 | #endif |
384 | 384 | ||
385 | extern unsigned long cpuidle_disable; | ||
385 | enum idle_boot_override {IDLE_NO_OVERRIDE = 0, IDLE_POWERSAVE_OFF}; | 386 | enum idle_boot_override {IDLE_NO_OVERRIDE = 0, IDLE_POWERSAVE_OFF}; |
386 | 387 | ||
387 | #endif /* __KERNEL__ */ | 388 | #endif /* __KERNEL__ */ |
diff --git a/arch/powerpc/platforms/pseries/processor_idle.c b/arch/powerpc/platforms/pseries/processor_idle.c index f7e3e877cb6..085fd3f45ad 100644 --- a/arch/powerpc/platforms/pseries/processor_idle.c +++ b/arch/powerpc/platforms/pseries/processor_idle.c | |||
@@ -269,6 +269,9 @@ static int pseries_idle_probe(void) | |||
269 | if (!firmware_has_feature(FW_FEATURE_SPLPAR)) | 269 | if (!firmware_has_feature(FW_FEATURE_SPLPAR)) |
270 | return -ENODEV; | 270 | return -ENODEV; |
271 | 271 | ||
272 | if (cpuidle_disable != IDLE_NO_OVERRIDE) | ||
273 | return -ENODEV; | ||
274 | |||
272 | if (max_idle_state == 0) { | 275 | if (max_idle_state == 0) { |
273 | printk(KERN_DEBUG "pseries processor idle disabled.\n"); | 276 | printk(KERN_DEBUG "pseries processor idle disabled.\n"); |
274 | return -EPERM; | 277 | return -EPERM; |