Commit d64c3b0b authored by Kristen Carlson Accardi's avatar Kristen Carlson Accardi Committed by Rafael J. Wysocki

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: default avatarKristen Carlson Accardi <kristen@linux.intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 17ad13ba
...@@ -1469,6 +1469,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted. ...@@ -1469,6 +1469,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
no_hwp no_hwp
Do not enable hardware P state control (HWP) Do not enable hardware P state control (HWP)
if available. if available.
hwp_only
Only load intel_pstate on systems which support
hardware P state control (HWP) if available.
intremap= [X86-64, Intel-IOMMU] intremap= [X86-64, Intel-IOMMU]
on enable Interrupt Remapping (default) on enable Interrupt Remapping (default)
......
...@@ -1019,6 +1019,7 @@ static struct cpufreq_driver intel_pstate_driver = { ...@@ -1019,6 +1019,7 @@ static struct cpufreq_driver intel_pstate_driver = {
static int __initdata no_load; static int __initdata no_load;
static int __initdata no_hwp; static int __initdata no_hwp;
static int __initdata hwp_only;
static unsigned int force_load; static unsigned int force_load;
static int intel_pstate_msrs_not_valid(void) static int intel_pstate_msrs_not_valid(void)
...@@ -1216,6 +1217,9 @@ static int __init intel_pstate_init(void) ...@@ -1216,6 +1217,9 @@ static int __init intel_pstate_init(void)
if (cpu_has(c,X86_FEATURE_HWP) && !no_hwp) if (cpu_has(c,X86_FEATURE_HWP) && !no_hwp)
intel_pstate_hwp_enable(); intel_pstate_hwp_enable();
if (!hwp_active && hwp_only)
goto out;
rc = cpufreq_register_driver(&intel_pstate_driver); rc = cpufreq_register_driver(&intel_pstate_driver);
if (rc) if (rc)
goto out; goto out;
...@@ -1250,6 +1254,8 @@ static int __init intel_pstate_setup(char *str) ...@@ -1250,6 +1254,8 @@ static int __init intel_pstate_setup(char *str)
no_hwp = 1; no_hwp = 1;
if (!strcmp(str, "force")) if (!strcmp(str, "force"))
force_load = 1; force_load = 1;
if (!strcmp(str, "hwp_only"))
hwp_only = 1;
return 0; return 0;
} }
early_param("intel_pstate", intel_pstate_setup); early_param("intel_pstate", intel_pstate_setup);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment