diff options
author | Dirk Brandewie <dirk.brandewie@gmail.com> | 2013-02-15 16:55:10 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-02-15 16:55:10 -0500 |
commit | 6be264986152c498562f26b15ed73c70aa37ce48 (patch) | |
tree | 98d9a397ca627d67a9fbd117a23b8acbfd69622a | |
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>
-rw-r--r-- | Documentation/kernel-parameters.txt | 5 | ||||
-rw-r--r-- | drivers/cpufreq/intel_pstate.c | 16 |
2 files changed, 21 insertions, 0 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 363e348bff9b..b335c456feb9 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -1131,6 +1131,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1131 | 0 disables intel_idle and fall back on acpi_idle. | 1131 | 0 disables intel_idle and fall back on acpi_idle. |
1132 | 1 to 6 specify maximum depth of C-state. | 1132 | 1 to 6 specify maximum depth of C-state. |
1133 | 1133 | ||
1134 | intel_pstate= [X86] | ||
1135 | disable | ||
1136 | Do not enable intel_pstate as the default | ||
1137 | scaling driver for the supported processors | ||
1138 | |||
1134 | intremap= [X86-64, Intel-IOMMU] | 1139 | intremap= [X86-64, Intel-IOMMU] |
1135 | on enable Interrupt Remapping (default) | 1140 | on enable Interrupt Remapping (default) |
1136 | off disable Interrupt Remapping | 1141 | off disable Interrupt Remapping |
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"); |