Skip to content

Commit d64c3b0

Browse files
kaccardirafaeljw
authored andcommitted
intel_pstate: provide option to only use intel_pstate with HWP
Allow users the option to disable the driver for any hardware which does not support HWP. Signed-off-by: Kristen Carlson Accardi <kristen@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 17ad13b commit d64c3b0

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

‎Documentation/kernel-parameters.txt‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1469,6 +1469,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
14691469
no_hwp
14701470
Do not enable hardware P state control (HWP)
14711471
if available.
1472+
hwp_only
1473+
Only load intel_pstate on systems which support
1474+
hardware P state control (HWP) if available.
14721475

14731476
intremap= [X86-64, Intel-IOMMU]
14741477
on enable Interrupt Remapping (default)

‎drivers/cpufreq/intel_pstate.c‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,6 +1019,7 @@ static struct cpufreq_driver intel_pstate_driver = {
10191019

10201020
static int __initdata no_load;
10211021
static int __initdata no_hwp;
1022+
static int __initdata hwp_only;
10221023
static unsigned int force_load;
10231024

10241025
static int intel_pstate_msrs_not_valid(void)
@@ -1216,6 +1217,9 @@ static int __init intel_pstate_init(void)
12161217
if (cpu_has(c,X86_FEATURE_HWP) && !no_hwp)
12171218
intel_pstate_hwp_enable();
12181219

1220+
if (!hwp_active && hwp_only)
1221+
goto out;
1222+
12191223
rc = cpufreq_register_driver(&intel_pstate_driver);
12201224
if (rc)
12211225
goto out;
@@ -1250,6 +1254,8 @@ static int __init intel_pstate_setup(char *str)
12501254
no_hwp = 1;
12511255
if (!strcmp(str, "force"))
12521256
force_load = 1;
1257+
if (!strcmp(str, "hwp_only"))
1258+
hwp_only = 1;
12531259
return 0;
12541260
}
12551261
early_param("intel_pstate", intel_pstate_setup);

0 commit comments

Comments
 (0)