diff options
author | Len Brown <len.brown@intel.com> | 2011-04-02 00:13:10 +0200 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2011-08-04 01:06:36 +0200 |
commit | 62027aea23fcd14478abdddd3b74a4e0f5fb2984 (patch) | |
tree | 1aaa5c1872e296f3448ae6c126175ac9d998e3b4 /drivers/cpuidle/governor.c | |
parent | mrst_pmu: driver for Intel Moorestown Power Management Unit (diff) | |
download | linux-62027aea23fcd14478abdddd3b74a4e0f5fb2984.tar.xz linux-62027aea23fcd14478abdddd3b74a4e0f5fb2984.zip |
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/governor.c')
-rw-r--r-- | drivers/cpuidle/governor.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/cpuidle/governor.c b/drivers/cpuidle/governor.c index 724c164d31c9..ea2f8e7aa24a 100644 --- a/drivers/cpuidle/governor.c +++ b/drivers/cpuidle/governor.c @@ -81,6 +81,9 @@ int cpuidle_register_governor(struct cpuidle_governor *gov) if (!gov || !gov->select) return -EINVAL; + if (cpuidle_disabled()) + return -ENODEV; + mutex_lock(&cpuidle_lock); if (__cpuidle_find_governor(gov->name) == NULL) { ret = 0; |