Power management fix for 4.18-rc6

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, which 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).
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJbUZFtAAoJEILEb/54YlRx1OQP/jX6+uaIOtiDP24LByroWaG7
 BXRxxh530PRSUYzmgqxX22w4vsnty611Dprr8wZgg05mR5g+2erGVy20Z9va7aje
 7g5obpRvRrP2g4sxjgaG9Xza27yjwd1+ZmkpzIudDaHiv0WePUbJJjDLULJUi43X
 ynRGdZnHIYjOnCVV4nvkRiMzxgv5kfYRPYTaGjawTRCt9v9cQOPvvEHe+qG+uloO
 kBGKdFnNQPRHspRV2X5T0J1lXEdb6HaEBWQOabjbWAxaTLGvNBWg6c2FuN0mIpmq
 jKEhi2o4lH+X4XsmP3GPK4Spl0l4gSAIvaI5wrb+XNPmdDeBMcSECf0HSSabOPa6
 CLfjfmWH8BNZmLOWq8Wmn3OF9UsMtzoMTUqglWEJaCLTAQXkAgvusb8ZTajNnYX8
 LmcDeICT96+jzpZM99wbUAu/4/a/WSc1r56+qeJP1Nejo9QgnstvxSllx6FQzIYX
 tXqezvXOhtgTjZU+Td46SIkjKlR4Ebwknjjl3RGmJwahjZVcBLj65oMK+dH9W/Iu
 vy5l2+PI1kG+hGXRyQZ/pPpNamAMuq5SlDiqWbwoogeOq1ZLz0NF9OVjUgNAeO8C
 Kbfa3ezQYjW3/ZhHjnIgnzliHYeg/4Y6SjZerXOd6m1qkYsxHR7oy2KwHgH/6ATi
 PYtu6T8OHl+XrCidPFXy
 =h+O6
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Linus Torvalds 2018-07-20 11:12:27 -07:00
commit bfa54a3a00
2 changed files with 20 additions and 1 deletions

View File

@ -2394,6 +2394,18 @@ static bool __init intel_pstate_no_acpi_pss(void)
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)
{
int i;
@ -2453,7 +2465,10 @@ static bool __init intel_pstate_platform_pwr_mgmt_exists(void)
switch (plat_info[idx].data) {
case PSS:
return intel_pstate_no_acpi_pss();
if (!intel_pstate_no_acpi_pss())
return false;
return intel_pstate_no_acpi_pcch();
case PPC:
return intel_pstate_has_acpi_ppc() && !force_load;
}

View File

@ -580,6 +580,10 @@ static int __init pcc_cpufreq_init(void)
{
int ret;
/* Skip initialization if another cpufreq driver is there. */
if (cpufreq_get_current_driver())
return 0;
if (acpi_disabled)
return 0;