summaryrefslogtreecommitdiffstats
path: root/drivers/cpuidle/driver.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2011-04-01 18:13:10 -0400
committerLen Brown <len.brown@intel.com>2011-08-03 19:06:36 -0400
commit62027aea23fcd14478abdddd3b74a4e0f5fb2984 (patch)
tree1aaa5c1872e296f3448ae6c126175ac9d998e3b4 /drivers/cpuidle/driver.c
parent6dccf9c508d5d773859df1cc2dce75c5b19e35a0 (diff)
downloadop-kernel-dev-62027aea23fcd14478abdddd3b74a4e0f5fb2984.zip
op-kernel-dev-62027aea23fcd14478abdddd3b74a4e0f5fb2984.tar.gz
cpuidle: create bootparam "cpuidle.off=1"
useful for disabling cpuidle to fall back to architecture-default idle loop cpuidle drivers and governors will fail to register. on x86 they'll say so: intel_idle: intel_idle yielding to (null) ACPI: acpi_idle yielding to (null) Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/cpuidle/driver.c')
-rw-r--r--drivers/cpuidle/driver.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c
index fd1601e..3f7e3ce 100644
--- a/drivers/cpuidle/driver.c
+++ b/drivers/cpuidle/driver.c
@@ -26,6 +26,9 @@ int cpuidle_register_driver(struct cpuidle_driver *drv)
if (!drv)
return -EINVAL;
+ if (cpuidle_disabled())
+ return -ENODEV;
+
spin_lock(&cpuidle_driver_lock);
if (cpuidle_curr_driver) {
spin_unlock(&cpuidle_driver_lock);
OpenPOWER on IntegriCloud