Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3801495imm; Tue, 17 Jul 2018 10:29:35 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdYfuR9X3BnQSGscFYeUY7zFCOSckCVkzei0+Q/8ncrwzfb9JZMELskgn8yNB1ibFoEnws7 X-Received: by 2002:a62:404e:: with SMTP id n75-v6mr1596465pfa.232.1531848575161; Tue, 17 Jul 2018 10:29:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531848575; cv=none; d=google.com; s=arc-20160816; b=c+Ljbx+XYHd5R+H1mdLG8V+oVDtfb4OQpbESdnlGDQ3qkEIYM7KFtfKZBU2CorzKOx N4WS3ITqyC0jBc3N5D/LbstCK1MUG8M5k746vykuX5ejx1uLhVIMcIGwtFNL+rxdbs8O 4xTvnshECioEhQljHdCHm/MuoRDIOkULgiIBtsCUAMuAVRLdmI/tiQeNdc+NnpEoUwpd 3g/5DnFxL/aRExfHl/DLDp+Zi5zyyD2BfMpuYkqiyzGCRC2BLpvAF/6JxpeSs3f1iWnk d+f1ZXCt8GR+Bpi/dS+ah/eOjCwdc0JtZoDZ8yY2xLG9KDwwA6Ic88almCpZn6tvkuw5 dgSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=aDyDjwaAD1SIN1UC3ibG05PEbeLGqp2u0SKPH49Fp64=; b=rjJat2JUZZ+rIXj/EWzCxnFKC4N+Y/znanSxRxDwQblym56RivVHlT9joDvhfPLsIj 1Hvnq6gJqW3XxtHaYDs2TSxkI8qAw8w4yve4EY0b9XIl/74QRShBdgrhKv8BPcZaesxa s2pLjU3Mj+twL8eRM1CAz/VuPPYR78Ocl6IgMVIALguWLWjPUf8BKQ76m2+QgWEY7qdy Q08CAoA0i7XTh39RPNwQBrU5cOOe8mwFw19/1TAs6zs5mCRAuDajEmS5/4uZZQxeemC+ ufG8MjGG8lTZ1QwMoLk6+n9yKbqGpoQBtKWwT1j+cptKcirAhAJ+cbiaJhJpNpvIrYQQ tbXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=qqi3oLnm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n13-v6si1416601pfd.50.2018.07.17.10.29.18; Tue, 17 Jul 2018 10:29:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=qqi3oLnm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730123AbeGQSCW (ORCPT + 99 others); Tue, 17 Jul 2018 14:02:22 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:33375 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729713AbeGQSCW (ORCPT ); Tue, 17 Jul 2018 14:02:22 -0400 Received: by mail-oi0-f67.google.com with SMTP id l10-v6so3555820oii.0; Tue, 17 Jul 2018 10:28:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=aDyDjwaAD1SIN1UC3ibG05PEbeLGqp2u0SKPH49Fp64=; b=qqi3oLnmjCtwGtO3McdCraYlirZDpq22NeggAju7+AXNXf1BwhrrVrG8Us9MyxRVmq T8NGAIdCToJC596c6Au2bdVlam+S2BLgFWAdJWRiiFXYNX+96P5vyuJt0v2S8S7aPoOv 0+tWwGdggEN/VLdj4Y7o4LDPBJWat367HP7uOH5wxWrLvL9qC+CaaQehAPYsSpZi2seq P+JuQ6fMUu/p0C5i0GRgml8PbO2jWYWbieuCiexKj5kTgCXd4FVihtX+KNs+QD1zdlVG SWhrhXGyMGG/hUv+j5qI8//UDHGusKOZoe4CHHG5Ksp1YNzwRFDCdSI0MZIfsshNeGTx vAdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=aDyDjwaAD1SIN1UC3ibG05PEbeLGqp2u0SKPH49Fp64=; b=acvIe2a7QDzr9oiufICaBYnSGVLrF8YONkYMZ1a6YM2PMmAMIF7PrBzx7G5hvjsV2m xbb8x9p8l13S1ODp7g0Rti3/5H+Ijx6U7lbAdFXCa2r5VPm27PQ1vx1xhGgFka36ox3k 8UPFZlNgrajFLXKeGYaS9rKEqlTqzv33Oci9Xse6dBQFKl5oY1bZoC3sJCnQMfchOqpR S5QBAf7lo9efaVKLbN8sqQL77TFCLD0kgiK2riBsgnsohe4+VwaS+LBAxO6WoXW5eB7M XOfdimdSH35swzSZI6szxV9mQVJP24WoNBBoLVBt7ZntICmxFdTJXCCLV7cgQc0Pfgjo geRg== X-Gm-Message-State: AOUpUlHvdwcsmJLH2xzci2ULN+/ZGdbPNnCU2DEAYFF6KIqtaa9XVZ/w mec4WtCeYJrhWSiFCWaTaStymFEZucnvDRLjcnU= X-Received: by 2002:aca:42:: with SMTP id 63-v6mr2480708oia.154.1531848522082; Tue, 17 Jul 2018 10:28:42 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:63d2:0:0:0:0:0 with HTTP; Tue, 17 Jul 2018 10:28:41 -0700 (PDT) In-Reply-To: References: <20180717065048.74mmgk4t5utjaa6a@suselix> <20180717102136.snayvzmv2h3dcwiq@suselix> <20180717140336.ayovaz4ksdlak6bb@suselix> <8115130.Fhkpr82c7G@aspire.rjw.lan> From: "Rafael J. Wysocki" Date: Tue, 17 Jul 2018 19:28:41 +0200 X-Google-Sender-Auth: pR0jJz_m99TcP714uIawkhVnvJI Message-ID: Subject: Re: [PATCH] cpufreq: intel_pstate: Load when ACPI PCCH is present To: Srinivas Pandruvada Cc: "Rafael J. Wysocki" , Andreas Herrmann , "Rafael J. Wysocki" , Peter Zijlstra , Frederic Weisbecker , Viresh Kumar , Linux PM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 17, 2018 at 7:23 PM, Srinivas Pandruvada wrote: > On Tue, 2018-07-17 at 18:13 +0200, Rafael J. Wysocki wrote: >> From: Rafael J. Wysocki >> >> Currently, intel_pstate doesn't load if _PSS is not present on >> HP Proliant systems, because it expects the firmware to take over >> CPU performance scaling in that case. However, if ACPI PCCH is >> present, the firmware expects the kernel to use it for CPU >> performance scaling and the pcc-cpufreq driver is loaded for that. >> >> Unfortunately, the firmware interface used by that driver is not >> scalable for fundamental reasons, so pcc-cpufreq is way suboptimal >> on systems with more than just a few CPUs. In fact, it is better to >> avoid using it at all. >> >> For this reason, modify intel_pstate to look for ACPI PCCH if _PSS >> is not present and load if it is there. >> >> Fixes: fbbcdc0744da (intel_pstate: skip the driver if ACPI has power >> mgmt option) >> Reported-by: Andreas Herrmann >> Tested-by: Andreas Herrmann >> Reviewed-by: Andreas Herrmann >> Cc: 4.17+ # 4.17+ >> Signed-off-by: Rafael J. Wysocki > Acked-by: Srinivas Pandruvada > > But do we need a change as done by the following commit in in pcc- > cpufreq.c? > > " > commit 8a61e12e84597b5f8155ac91b44dea866ccfaac2 > Author: Yinghai Lu > Date: Fri Sep 20 10:43:56 2013 -0700 > > acpi-cpufreq: skip loading acpi_cpufreq after intel_pstate > > " Quite likely yes, good point! >> --- >> drivers/cpufreq/intel_pstate.c | 17 ++++++++++++++++- >> 1 file changed, 16 insertions(+), 1 deletion(-) >> >> Index: linux-pm/drivers/cpufreq/intel_pstate.c >> =================================================================== >> --- linux-pm.orig/drivers/cpufreq/intel_pstate.c >> +++ linux-pm/drivers/cpufreq/intel_pstate.c >> @@ -2391,6 +2391,18 @@ static bool __init intel_pstate_no_acpi_ >> 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; >> @@ -2450,7 +2462,10 @@ static bool __init intel_pstate_platform >> >> 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; >> } >>