Commit 1740f21a authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

Merge branch 'pm-cpufreq'

* pm-cpufreq:
  cpufreq: intel_pstate: Fix active mode setting from command line
parents a6c99daa 39a188b8
...@@ -2464,7 +2464,7 @@ static struct cpufreq_driver intel_cpufreq = { ...@@ -2464,7 +2464,7 @@ static struct cpufreq_driver intel_cpufreq = {
.name = "intel_cpufreq", .name = "intel_cpufreq",
}; };
static struct cpufreq_driver *default_driver = &intel_pstate; static struct cpufreq_driver *default_driver;
static void intel_pstate_driver_cleanup(void) static void intel_pstate_driver_cleanup(void)
{ {
...@@ -2758,6 +2758,7 @@ static int __init intel_pstate_init(void) ...@@ -2758,6 +2758,7 @@ static int __init intel_pstate_init(void)
hwp_active++; hwp_active++;
hwp_mode_bdw = id->driver_data; hwp_mode_bdw = id->driver_data;
intel_pstate.attr = hwp_cpufreq_attrs; intel_pstate.attr = hwp_cpufreq_attrs;
default_driver = &intel_pstate;
goto hwp_cpu_matched; goto hwp_cpu_matched;
} }
} else { } else {
...@@ -2775,6 +2776,7 @@ static int __init intel_pstate_init(void) ...@@ -2775,6 +2776,7 @@ static int __init intel_pstate_init(void)
return -ENODEV; return -ENODEV;
} }
/* Without HWP start in the passive mode. */ /* Without HWP start in the passive mode. */
if (!default_driver)
default_driver = &intel_cpufreq; default_driver = &intel_cpufreq;
hwp_cpu_matched: hwp_cpu_matched:
...@@ -2820,6 +2822,8 @@ static int __init intel_pstate_setup(char *str) ...@@ -2820,6 +2822,8 @@ static int __init intel_pstate_setup(char *str)
if (!strcmp(str, "disable")) { if (!strcmp(str, "disable")) {
no_load = 1; no_load = 1;
} else if (!strcmp(str, "active")) {
default_driver = &intel_pstate;
} else if (!strcmp(str, "passive")) { } else if (!strcmp(str, "passive")) {
default_driver = &intel_cpufreq; default_driver = &intel_cpufreq;
no_hwp = 1; no_hwp = 1;
......
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