Skip to content

Commit fdbe094

Browse files
committed
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
2 parents 60a406d + 6be2649 commit fdbe094

3 files changed

Lines changed: 22 additions & 6 deletions

File tree

‎Documentation/kernel-parameters.txt‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,6 +1131,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
11311131
0 disables intel_idle and fall back on acpi_idle.
11321132
1 to 6 specify maximum depth of C-state.
11331133

1134+
intel_pstate= [X86]
1135+
disable
1136+
Do not enable intel_pstate as the default
1137+
scaling driver for the supported processors
1138+
11341139
intremap= [X86-64, Intel-IOMMU]
11351140
on enable Interrupt Remapping (default)
11361141
off disable Interrupt Remapping

‎drivers/cpufreq/Kconfig.x86‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44

55
config X86_INTEL_PSTATE
6-
tristate "Intel P state control"
6+
bool "Intel P state control"
77
depends on X86
88
help
99
This driver provides a P state for Intel core processors.
@@ -13,11 +13,6 @@ config X86_INTEL_PSTATE
1313
When this driver is enabled it will become the perferred
1414
scaling driver for Sandy bridge processors.
1515

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-
2116
If in doubt, say N.
2217

2318
config X86_PCC_CPUFREQ

‎drivers/cpufreq/intel_pstate.c‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,11 +773,16 @@ static void intel_pstate_exit(void)
773773
}
774774
module_exit(intel_pstate_exit);
775775

776+
static int __initdata no_load;
777+
776778
static int __init intel_pstate_init(void)
777779
{
778780
int rc = 0;
779781
const struct x86_cpu_id *id;
780782

783+
if (no_load)
784+
return -ENODEV;
785+
781786
id = x86_match_cpu(intel_pstate_cpu_ids);
782787
if (!id)
783788
return -ENODEV;
@@ -802,6 +807,17 @@ static int __init intel_pstate_init(void)
802807
}
803808
device_initcall(intel_pstate_init);
804809

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+
805821
MODULE_AUTHOR("Dirk Brandewie <dirk.j.brandewie@intel.com>");
806822
MODULE_DESCRIPTION("'intel_pstate' - P state driver Intel Core processors");
807823
MODULE_LICENSE("GPL");

0 commit comments

Comments
 (0)