Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bfa54a3a authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
Loading
Loading
Loading
Loading
+16 −1
Original line number Diff line number Diff line
@@ -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;
	}
+4 −0
Original line number Diff line number Diff line
@@ -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;