diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-02-17 08:38:13 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-02-17 08:38:13 -0500 |
commit | fdbe0946d4c35d4cc784cfe0a5322708cfb7ade8 (patch) | |
tree | fca3ebcb96916e052b4e569d36900fc6bff2b2d7 /drivers/cpufreq | |
parent | 60a406d1de227037193db6790a1a8650ea51dc93 (diff) | |
parent | 6be264986152c498562f26b15ed73c70aa37ce48 (diff) |
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.x86 | 7 | ||||
-rw-r--r-- | drivers/cpufreq/intel_pstate.c | 16 |
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 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | config X86_INTEL_PSTATE | 5 | config X86_INTEL_PSTATE |
6 | tristate "Intel P state control" | 6 | bool "Intel P state control" |
7 | depends on X86 | 7 | depends on X86 |
8 | help | 8 | help |
9 | This driver provides a P state for Intel core processors. | 9 | This driver provides a P state for Intel core processors. |
@@ -13,11 +13,6 @@ config X86_INTEL_PSTATE | |||
13 | When this driver is enabled it will become the perferred | 13 | When this driver is enabled it will become the perferred |
14 | scaling driver for Sandy bridge processors. | 14 | scaling driver for Sandy bridge processors. |
15 | 15 | ||
16 | Note: This driver should be built with the same settings as | ||
17 | the other scaling drivers configured into the system | ||
18 | (module/built-in) in order for the driver to register itself | ||
19 | as the scaling driver on the system. | ||
20 | |||
21 | If in doubt, say N. | 16 | If in doubt, say N. |
22 | 17 | ||
23 | config X86_PCC_CPUFREQ | 18 | 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) | |||
773 | } | 773 | } |
774 | module_exit(intel_pstate_exit); | 774 | module_exit(intel_pstate_exit); |
775 | 775 | ||
776 | static int __initdata no_load; | ||
777 | |||
776 | static int __init intel_pstate_init(void) | 778 | static int __init intel_pstate_init(void) |
777 | { | 779 | { |
778 | int rc = 0; | 780 | int rc = 0; |
779 | const struct x86_cpu_id *id; | 781 | const struct x86_cpu_id *id; |
780 | 782 | ||
783 | if (no_load) | ||
784 | return -ENODEV; | ||
785 | |||
781 | id = x86_match_cpu(intel_pstate_cpu_ids); | 786 | id = x86_match_cpu(intel_pstate_cpu_ids); |
782 | if (!id) | 787 | if (!id) |
783 | return -ENODEV; | 788 | return -ENODEV; |
@@ -802,6 +807,17 @@ out: | |||
802 | } | 807 | } |
803 | device_initcall(intel_pstate_init); | 808 | device_initcall(intel_pstate_init); |
804 | 809 | ||
810 | static int __init intel_pstate_setup(char *str) | ||
811 | { | ||
812 | if (!str) | ||
813 | return -EINVAL; | ||
814 | |||
815 | if (!strcmp(str, "disable")) | ||
816 | no_load = 1; | ||
817 | return 0; | ||
818 | } | ||
819 | early_param("intel_pstate", intel_pstate_setup); | ||
820 | |||
805 | MODULE_AUTHOR("Dirk Brandewie <dirk.j.brandewie@intel.com>"); | 821 | MODULE_AUTHOR("Dirk Brandewie <dirk.j.brandewie@intel.com>"); |
806 | MODULE_DESCRIPTION("'intel_pstate' - P state driver Intel Core processors"); | 822 | MODULE_DESCRIPTION("'intel_pstate' - P state driver Intel Core processors"); |
807 | MODULE_LICENSE("GPL"); | 823 | MODULE_LICENSE("GPL"); |