diff options
author | Dirk Brandewie <dirk.brandewie@gmail.com> | 2013-02-15 22:55:10 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-02-15 22:55:10 +0100 |
commit | 6be264986152c498562f26b15ed73c70aa37ce48 (patch) | |
tree | 98d9a397ca627d67a9fbd117a23b8acbfd69622a /drivers/cpufreq/intel_pstate.c | |
parent | da0d9fda3743769484d3db5a17a121599076e869 (diff) |
cpufreq / intel_pstate: Add kernel command line option disable intel_pstate.
When intel_pstate is configured into the kernel it will become the
preferred scaling driver for processors that it supports. Allow the
user to override this by adding:
intel_pstate=disable
on the kernel command line.
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/intel_pstate.c')
-rw-r--r-- | drivers/cpufreq/intel_pstate.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index e87996355da0..096fde0ebcb5 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -773,11 +773,16 @@ static void intel_pstate_exit(void) } module_exit(intel_pstate_exit); +static int __initdata no_load; + static int __init intel_pstate_init(void) { int rc = 0; const struct x86_cpu_id *id; + if (no_load) + return -ENODEV; + id = x86_match_cpu(intel_pstate_cpu_ids); if (!id) return -ENODEV; @@ -802,6 +807,17 @@ out: } device_initcall(intel_pstate_init); +static int __init intel_pstate_setup(char *str) +{ + if (!str) + return -EINVAL; + + if (!strcmp(str, "disable")) + no_load = 1; + return 0; +} +early_param("intel_pstate", intel_pstate_setup); + MODULE_AUTHOR("Dirk Brandewie <dirk.j.brandewie@intel.com>"); MODULE_DESCRIPTION("'intel_pstate' - P state driver Intel Core processors"); MODULE_LICENSE("GPL"); |