Skip to content

Commit bfa54a3

Browse files
committed
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
2 parents 7389439 + 95d6c08 commit bfa54a3

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

‎drivers/cpufreq/intel_pstate.c‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2394,6 +2394,18 @@ static bool __init intel_pstate_no_acpi_pss(void)
23942394
return true;
23952395
}
23962396

2397+
static bool __init intel_pstate_no_acpi_pcch(void)
2398+
{
2399+
acpi_status status;
2400+
acpi_handle handle;
2401+
2402+
status = acpi_get_handle(NULL, "\\_SB", &handle);
2403+
if (ACPI_FAILURE(status))
2404+
return true;
2405+
2406+
return !acpi_has_method(handle, "PCCH");
2407+
}
2408+
23972409
static bool __init intel_pstate_has_acpi_ppc(void)
23982410
{
23992411
int i;
@@ -2453,7 +2465,10 @@ static bool __init intel_pstate_platform_pwr_mgmt_exists(void)
24532465

24542466
switch (plat_info[idx].data) {
24552467
case PSS:
2456-
return intel_pstate_no_acpi_pss();
2468+
if (!intel_pstate_no_acpi_pss())
2469+
return false;
2470+
2471+
return intel_pstate_no_acpi_pcch();
24572472
case PPC:
24582473
return intel_pstate_has_acpi_ppc() && !force_load;
24592474
}

‎drivers/cpufreq/pcc-cpufreq.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,10 @@ static int __init pcc_cpufreq_init(void)
580580
{
581581
int ret;
582582

583+
/* Skip initialization if another cpufreq driver is there. */
584+
if (cpufreq_get_current_driver())
585+
return 0;
586+
583587
if (acpi_disabled)
584588
return 0;
585589

0 commit comments

Comments
 (0)