[PATCH 0/3] ACPI: CPPC: Avoid Desired Performance reads on _CPC 4+

Christian Loehle posted 3 patches 1 month, 4 weeks ago
drivers/acpi/cppc_acpi.c       | 36 ++++++++++++++++++++++------------
drivers/cpufreq/cppc_cpufreq.c |  2 +-
2 files changed, 24 insertions(+), 14 deletions(-)
[PATCH 0/3] ACPI: CPPC: Avoid Desired Performance reads on _CPC 4+
Posted by Christian Loehle 1 month, 4 weeks ago
ACPI 6.6 introduced _CPC revision 4 which changed the 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 _CPC revision, but do not attempt the read
on _CPC revision 4 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 v3:
Detect on _CPC revision not ACPI version (Rafael)

Christian Loehle (3):
  ACPI: CPPC: Reject desired_perf reads on _CPC revision 4+
  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, 24 insertions(+), 14 deletions(-)

-- 
2.34.1
Re: [PATCH 0/3] ACPI: CPPC: Avoid Desired Performance reads on _CPC 4+
Posted by Rafael J. Wysocki (Intel) 1 month, 3 weeks ago
On Mon, Aug 3, 2026 at 10:35 PM Christian Loehle
<christian.loehle@arm.com> wrote:
>
> ACPI 6.6 introduced _CPC revision 4 which changed the 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 _CPC revision, but do not attempt the read
> on _CPC revision 4 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 v3:
> Detect on _CPC revision not ACPI version (Rafael)
>
> Christian Loehle (3):
>   ACPI: CPPC: Reject desired_perf reads on _CPC revision 4+
>   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, 24 insertions(+), 14 deletions(-)
>
> --

All applied as 7.3 material, thanks!