Linux ACPI
 help / color / mirror / Atom feed
From: Christian Loehle <christian.loehle@arm.com>
To: christian.loehle@arm.com,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>
Cc: linux-pm@vger.kernel.org, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org, Len Brown <lenb@kernel.org>,
	Jie Zhan <zhanjie9@hisilicon.com>,
	Lifeng Zheng <zhenglifeng1@huawei.com>,
	Pierre Gondois <pierre.gondois@arm.com>,
	Sumit Gupta <sumitg@nvidia.com>,
	Sudeep Holla <sudeep.holla@arm.com>,
	Ionela Voinescu <ionela.voinescu@arm.com>,
	zhongqiu.han@oss.qualcomm.com
Subject: [PATCH v3 0/3] ACPI: CPPC: Avoid Desired Performance reads on ACPI 6.6+
Date: Mon,  3 Aug 2026 11:02:48 +0100	[thread overview]
Message-ID: <cover.1785749175.git.christian.loehle@arm.com> (raw)
In-Reply-To: <20260729100245.2628302-1-christian.loehle@arm.com>

ACPI 6.6 changed the Optional Attribute of Desired Performance from
Read/Write to Write.

cppc-cpufreq reads Desired Performance when feedback counters cannot
provide a usable sample because some older platforms repurpose the
register to report actual delivered performance. Preserve that workaround
on systems reporting an older ACPI revision, but do not attempt the read
on ACPI 6.6 or later, where firmware no longer promises a readable value
and cppc-cpufreq can fall back to its cached OSPM request instead.

cppc_get_perf() also reads Desired Performance while populating the
control values used during cppc-cpufreq initialization. Its only in-tree
caller overwrites that value with highest_perf before the controls are
first written, so the value is never consumed.

Patches 1 and 2 provide minimal, backportable fixes for the two read
paths. Patch 3 simplifies the mainline API by no longer reading
Desired Performance through cppc_get_perf() on any ACPI revision.

Changes since v2:
- Fall back to the cached OSPM request when reading Desired Performance
  returns zero as suggested by Sumit Gupta.
- Pick up Reviewed-by tags from Zhongqiu Han for patches 2 and 3.
- Rebase onto v7.2-rc6

Christian Loehle (3):
  ACPI: CPPC: Reject desired_perf reads on ACPI 6.6+
  ACPI: CPPC: Skip desired_perf read in cppc_get_perf()
  ACPI: CPPC: Stop reading desired_perf in cppc_get_perf()

 drivers/acpi/cppc_acpi.c       | 36 +++++++++++++++++++++-------------
 drivers/cpufreq/cppc_cpufreq.c |  2 +-
 2 files changed, 23 insertions(+), 15 deletions(-)


base-commit: 075b74841bd0065a3bda3440873c747938e69b68
-- 
2.34.1

  parent reply	other threads:[~2026-08-03 10:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-29 10:02 [PATCHv2 0/3] ACPI: CPPC: Avoid Desired Performance reads on ACPI 6.6+ Christian Loehle
2026-07-29 10:02 ` [PATCHv2 1/3] ACPI: CPPC: Reject desired_perf " Christian Loehle
2026-07-31 10:45   ` Zhongqiu Han
2026-08-03  9:12     ` Christian Loehle
2026-07-31 20:52   ` Sumit Gupta
2026-07-29 10:02 ` [PATCHv2 2/3] ACPI: CPPC: Skip desired_perf read in cppc_get_perf() Christian Loehle
2026-07-31 12:38   ` Zhongqiu Han
2026-07-29 10:02 ` [PATCHv2 3/3] ACPI: CPPC: Stop reading desired_perf " Christian Loehle
2026-07-31 13:19   ` Zhongqiu Han
2026-08-03 10:02 ` Christian Loehle [this message]
2026-08-03 10:02   ` [PATCH v3 1/3] ACPI: CPPC: Reject desired_perf reads on ACPI 6.6+ Christian Loehle
2026-08-03 14:38     ` Rafael J. Wysocki (Intel)
2026-08-03 14:44       ` Christian Loehle
2026-08-03 10:02   ` [PATCH v3 2/3] ACPI: CPPC: Skip desired_perf read in cppc_get_perf() Christian Loehle
2026-08-03 14:43     ` Rafael J. Wysocki (Intel)
2026-08-03 10:02   ` [PATCH v3 3/3] ACPI: CPPC: Stop reading desired_perf " Christian Loehle
2026-08-03 13:07   ` [PATCH v3 0/3] ACPI: CPPC: Avoid Desired Performance reads on ACPI 6.6+ Sumit Gupta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1785749175.git.christian.loehle@arm.com \
    --to=christian.loehle@arm.com \
    --cc=ionela.voinescu@arm.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pierre.gondois@arm.com \
    --cc=rafael@kernel.org \
    --cc=sudeep.holla@arm.com \
    --cc=sumitg@nvidia.com \
    --cc=viresh.kumar@linaro.org \
    --cc=zhanjie9@hisilicon.com \
    --cc=zhenglifeng1@huawei.com \
    --cc=zhongqiu.han@oss.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox