[PATCH v7 0/3] ACPI / cpufreq: CPPC: Add ospm_nominal_perf support

Sumit Gupta <[email protected]> Sat, 8 Aug 2026 03:18:34 +0530
Newsgroups org.kernel.vger.linux-tegra,dev.linux.lists.acpica-devel,org.kernel.vger.linux-acpi,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pm
Message-ID <[email protected]>
This series adds support for the OSPM Nominal Performance register
(ACPI 6.6, Section 8.4.6.1.2.6) to the CPPC ACPI and cpufreq drivers.

Unlike the read-only Nominal Performance register, OSPM Nominal
Performance is writable and lets OSPM request a nominal level below
the platform-reported nominal. The platform treats performance above
this level as boost and below as throttle for its power and thermal
decisions.

 - Patch 1: adds cppc_set_ospm_nominal_perf() and
   cppc_ospm_nominal_perf_supported().

 - Patch 2: adds the per-policy ospm_nominal_freq attribute in kHz, and
   tracks the register in the OSPM-set save/restore table. The register
   cannot be read back, so the attribute is write-only.

 - Patch 3: reflects the OSPM nominal in the cpufreq policy, so that
   boost and the frequency limits stay consistent with the register.

This series applies on top of the following series, which provides the
save/restore table that patch 2 hooks into:
  cpufreq: CPPC: Preserve OSPM-set registers across hotplug and unload
  https://lore.kernel.org/lkml/[email protected]/

v6[6] -> v7:
 - Split patch 1 into an ACPI patch and a cpufreq patch.
 - Patch 1:
   - drop cppc_get_ospm_nominal_perf(), as the register is write-only.
   - add cppc_ospm_nominal_perf_supported(), sharing the setter's
     writable check via the new cpc_reg_writable() helper.
 - Patch 2:
   - make ospm_nominal_freq write-only, and track the requested value
     in software instead of reading the register back.
   - place the register before auto_sel in the save/restore table.
 - Patch 3:
   - rename *_reflect_nominal() to *_update_nominal_limits().
   - do not fail the sysfs write when cppc_cpufreq_update_nominal_limits()
     fails to update the QoS limit.
   - skip the limit update while boost is enabled.
   - make cppc_cpufreq_effective_nominal() take the value from the
     software-tracked state, so it returns it directly and cannot fail.
   - init() checks cppc_ospm_nominal_perf_supported() directly, instead
     of using cppc_cpufreq_effective_nominal().

Sumit Gupta (3):
  ACPI: CPPC: Add ospm_nominal_perf support
  cpufreq: CPPC: Add ospm_nominal_freq attribute
  cpufreq: CPPC: Reflect the OSPM nominal in boost and limits

 .../ABI/testing/sysfs-devices-system-cpu      |  24 ++++
 drivers/acpi/cppc_acpi.c                      |  48 ++++++-
 drivers/cpufreq/cppc_cpufreq.c                | 135 +++++++++++++++++-
 include/acpi/cppc_acpi.h                      |  10 ++
 4 files changed, 208 insertions(+), 9 deletions(-)

v6: https://lore.kernel.org/lkml/[email protected]/
v5: https://lore.kernel.org/lkml/[email protected]/
v4: https://lore.kernel.org/lkml/[email protected]/
v3: https://lore.kernel.org/lkml/[email protected]/
v2: https://lore.kernel.org/lkml/[email protected]/
v1: https://lore.kernel.org/lkml/[email protected]/

-- 
2.34.1