Commit bfa54a3a authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'pm-4.18-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management fix from Rafael Wysocki:
 "Fix a relatively old initialization issue in intel_pstate causing the
  pcc-cpufreq driver to be used instead of it on some HP Proliant
  systems.

  This turned into a functional regression during the 4.17 cycle,
  because pcc-cpufreq is a scalability disaster and that was amplified
  by the idle loop rework done at that time (Rafael Wysocki).

* tag 'pm-4.18-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  cpufreq: intel_pstate: Register when ACPI PCCH is present
parents 73894397 95d6c085
...@@ -2394,6 +2394,18 @@ static bool __init intel_pstate_no_acpi_pss(void) ...@@ -2394,6 +2394,18 @@ static bool __init intel_pstate_no_acpi_pss(void)
return true; return true;
} }
static bool __init intel_pstate_no_acpi_pcch(void)
{
acpi_status status;
acpi_handle handle;
status = acpi_get_handle(NULL, "\\_SB", &handle);
if (ACPI_FAILURE(status))
return true;
return !acpi_has_method(handle, "PCCH");
}
static bool __init intel_pstate_has_acpi_ppc(void) static bool __init intel_pstate_has_acpi_ppc(void)
{ {
int i; int i;
...@@ -2453,7 +2465,10 @@ static bool __init intel_pstate_platform_pwr_mgmt_exists(void) ...@@ -2453,7 +2465,10 @@ static bool __init intel_pstate_platform_pwr_mgmt_exists(void)
switch (plat_info[idx].data) { switch (plat_info[idx].data) {
case PSS: case PSS:
return intel_pstate_no_acpi_pss(); if (!intel_pstate_no_acpi_pss())
return false;
return intel_pstate_no_acpi_pcch();
case PPC: case PPC:
return intel_pstate_has_acpi_ppc() && !force_load; return intel_pstate_has_acpi_ppc() && !force_load;
} }
......
...@@ -580,6 +580,10 @@ static int __init pcc_cpufreq_init(void) ...@@ -580,6 +580,10 @@ static int __init pcc_cpufreq_init(void)
{ {
int ret; int ret;
/* Skip initialization if another cpufreq driver is there. */
if (cpufreq_get_current_driver())
return 0;
if (acpi_disabled) if (acpi_disabled)
return 0; return 0;
......
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