summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-02-17 14:38:13 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-02-17 14:38:13 +0100
commitfdbe0946d4c35d4cc784cfe0a5322708cfb7ade8 (patch)
treefca3ebcb96916e052b4e569d36900fc6bff2b2d7 /drivers/cpufreq
parent60a406d1de227037193db6790a1a8650ea51dc93 (diff)
parent6be264986152c498562f26b15ed73c70aa37ce48 (diff)
downloadtalos-op-linux-fdbe0946d4c35d4cc784cfe0a5322708cfb7ade8.tar.gz
talos-op-linux-fdbe0946d4c35d4cc784cfe0a5322708cfb7ade8.zip
Merge branch 'pm-cpufreq'
* pm-cpufreq: cpufreq / intel_pstate: Add kernel command line option disable intel_pstate. cpufreq / intel_pstate: Change to disallow module build
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r--drivers/cpufreq/Kconfig.x867
-rw-r--r--drivers/cpufreq/intel_pstate.c16
2 files changed, 17 insertions, 6 deletions
diff --git a/drivers/cpufreq/Kconfig.x86 b/drivers/cpufreq/Kconfig.x86
index 6aa7053ce2ef..98e5abbe8f26 100644
--- a/drivers/cpufreq/Kconfig.x86
+++ b/drivers/cpufreq/Kconfig.x86
@@ -3,7 +3,7 @@
#
config X86_INTEL_PSTATE
- tristate "Intel P state control"
+ bool "Intel P state control"
depends on X86
help
This driver provides a P state for Intel core processors.
@@ -13,11 +13,6 @@ config X86_INTEL_PSTATE
When this driver is enabled it will become the perferred
scaling driver for Sandy bridge processors.
- Note: This driver should be built with the same settings as
- the other scaling drivers configured into the system
- (module/built-in) in order for the driver to register itself
- as the scaling driver on the system.
-
If in doubt, say N.
config X86_PCC_CPUFREQ
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");
OpenPOWER on IntegriCloud