Add sysfs interfaces for Minimum Performance, Maximum Performance
and Performance Limited Register in the cppc_cpufreq driver.
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
---
.../ABI/testing/sysfs-devices-system-cpu | 42 +++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu
index 3a05604c21bf..b022cbf46adc 100644
--- a/Documentation/ABI/testing/sysfs-devices-system-cpu
+++ b/Documentation/ABI/testing/sysfs-devices-system-cpu
@@ -327,6 +327,48 @@ Description: Energy performance preference
This file is only present if the cppc-cpufreq driver is in use.
+What: /sys/devices/system/cpu/cpuX/cpufreq/min_perf
+Date: February 2026
+Contact: linux-pm@vger.kernel.org
+Description: Minimum Performance Frequency
+
+ Read/write a frequency value in kHz from/to this file. This
+ file sets the minimum performance level (as frequency) at
+ which the platform may run. The frequency value is internally
+ converted to a performance value and must be in the range
+ [cpuinfo_min_freq, cpuinfo_max_freq], inclusive.
+
+ This file is only present if the cppc-cpufreq driver is in use.
+
+What: /sys/devices/system/cpu/cpuX/cpufreq/max_perf
+Date: February 2026
+Contact: linux-pm@vger.kernel.org
+Description: Maximum Performance Frequency
+
+ Read/write a frequency value in kHz from/to this file. This
+ file sets the maximum performance level (as frequency) at
+ which the platform may run. The frequency value is internally
+ converted to a performance value and must be in the range
+ [cpuinfo_min_freq, cpuinfo_max_freq], inclusive.
+
+ This file is only present if the cppc-cpufreq driver is in use.
+
+What: /sys/devices/system/cpu/cpuX/cpufreq/perf_limited
+Date: February 2026
+Contact: linux-pm@vger.kernel.org
+Description: Performance Limited
+
+ Read to check if platform throttling (thermal/power/current
+ limits) caused delivered performance to fall below the
+ requested level. A non-zero value indicates throttling occurred.
+
+ Write the bitmask of bits to clear:
+ 1 = clear bit 0 (desired performance excursion)
+ 2 = clear bit 1 (minimum performance excursion)
+ 3 = clear both bits
+ The platform sets these bits; OSPM can only clear them.
+
+ This file is only present if the cppc-cpufreq driver is in use.
What: /sys/devices/system/cpu/cpu*/cache/index3/cache_disable_{0,1}
Date: August 2008
--
2.34.1
On Tue, Dec 23, 2025 at 05:43:03PM +0530, Sumit Gupta wrote: > + Write the bitmask of bits to clear: > + 1 = clear bit 0 (desired performance excursion) > + 2 = clear bit 1 (minimum performance excursion) > + 3 = clear both bits > + The platform sets these bits; OSPM can only clear them. Sphinx reports htmldocs warning: Documentation/ABI/testing/sysfs-devices-system-cpu:356: WARNING: Definition list ends without a blank line; unexpected unindent. [docutils] I have to fix up the bitmask list: ---- >8 ---- diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu index b022cbf46adcfe..8cda698019922b 100644 --- a/Documentation/ABI/testing/sysfs-devices-system-cpu +++ b/Documentation/ABI/testing/sysfs-devices-system-cpu @@ -363,9 +363,11 @@ Description: Performance Limited requested level. A non-zero value indicates throttling occurred. Write the bitmask of bits to clear: - 1 = clear bit 0 (desired performance excursion) - 2 = clear bit 1 (minimum performance excursion) - 3 = clear both bits + + - 1 = clear bit 0 (desired performance excursion) + - 2 = clear bit 1 (minimum performance excursion) + - 3 = clear both bits + The platform sets these bits; OSPM can only clear them. This file is only present if the cppc-cpufreq driver is in use. Thanks. -- An old man doll... just what I always wanted! - Clara
On 26/12/25 05:50, Bagas Sanjaya wrote: > On Tue, Dec 23, 2025 at 05:43:03PM +0530, Sumit Gupta wrote: >> + Write the bitmask of bits to clear: >> + 1 = clear bit 0 (desired performance excursion) >> + 2 = clear bit 1 (minimum performance excursion) >> + 3 = clear both bits >> + The platform sets these bits; OSPM can only clear them. > Sphinx reports htmldocs warning: > > Documentation/ABI/testing/sysfs-devices-system-cpu:356: WARNING: Definition list ends without a blank line; unexpected unindent. [docutils] > > I have to fix up the bitmask list: > > ---- >8 ---- > diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu > index b022cbf46adcfe..8cda698019922b 100644 > --- a/Documentation/ABI/testing/sysfs-devices-system-cpu > +++ b/Documentation/ABI/testing/sysfs-devices-system-cpu > @@ -363,9 +363,11 @@ Description: Performance Limited > requested level. A non-zero value indicates throttling occurred. > > Write the bitmask of bits to clear: > - 1 = clear bit 0 (desired performance excursion) > - 2 = clear bit 1 (minimum performance excursion) > - 3 = clear both bits > + > + - 1 = clear bit 0 (desired performance excursion) > + - 2 = clear bit 1 (minimum performance excursion) > + - 3 = clear both bits > + > The platform sets these bits; OSPM can only clear them. > > This file is only present if the cppc-cpufreq driver is in use. > > Thanks. > Thanks for the change.
Hi Sumit, kernel test robot noticed the following build warnings: [auto build test WARNING on rafael-pm/linux-next] [also build test WARNING on rafael-pm/bleeding-edge linus/master v6.19-rc2 next-20251219] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Sumit-Gupta/cpufreq-CPPC-Add-generic-helpers-for-sysfs-show-store/20251224-001833 base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next patch link: https://lore.kernel.org/r/20251223121307.711773-8-sumitg%40nvidia.com patch subject: [PATCH v5 07/11] cpufreq: CPPC: Add sysfs for min/max_perf and perf_limited reproduce: (https://download.01.org/0day-ci/archive/20251224/202512241930.heuhsbt9-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202512241930.heuhsbt9-lkp@intel.com/ All warnings (new ones prefixed by >>): Using alabaster theme ERROR: Cannot find file ./include/linux/pci.h WARNING: No kernel-doc for file ./include/linux/pci.h ERROR: Cannot find file ./include/linux/mod_devicetable.h WARNING: No kernel-doc for file ./include/linux/mod_devicetable.h >> Documentation/ABI/testing/sysfs-devices-system-cpu:356: WARNING: Definition list ends without a blank line; unexpected unindent. [docutils] ERROR: Cannot find file ./include/linux/bootconfig.h WARNING: No kernel-doc for file ./include/linux/bootconfig.h ERROR: Cannot find file ./include/linux/pstore_zone.h ERROR: Cannot find file ./include/linux/pstore_zone.h WARNING: No kernel-doc for file ./include/linux/pstore_zone.h vim +356 Documentation/ABI/testing/sysfs-devices-system-cpu 347 348 Read/write a frequency value in kHz from/to this file. This 349 file sets the maximum performance level (as frequency) at 350 which the platform may run. The frequency value is internally 351 converted to a performance value and must be in the range 352 [cpuinfo_min_freq, cpuinfo_max_freq], inclusive. 353 354 This file is only present if the cppc-cpufreq driver is in use. 355 > 356 What: /sys/devices/system/cpu/cpuX/cpufreq/perf_limited 357 Date: February 2026 358 Contact: linux-pm@vger.kernel.org 359 Description: Performance Limited 360 361 Read to check if platform throttling (thermal/power/current 362 limits) caused delivered performance to fall below the 363 requested level. A non-zero value indicates throttling occurred. 364 365 Write the bitmask of bits to clear: 366 1 = clear bit 0 (desired performance excursion) 367 2 = clear bit 1 (minimum performance excursion) 368 3 = clear both bits 369 The platform sets these bits; OSPM can only clear them. 370 371 This file is only present if the cppc-cpufreq driver is in use. 372 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
© 2016 - 2026 Red Hat, Inc.