mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/8] ACPI: CPPC: Resource Priority Register support and sysfs interface
@ 2026-07-17  2:44 Lifeng Zheng
  2026-07-17  2:44 ` [PATCH 1/8] ACPI: CPPC: Prepare cpc_register_resource for Package-type entries Lifeng Zheng
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Lifeng Zheng @ 2026-07-17  2:44 UTC (permalink / raw)
  To: rafael, viresh.kumar, saket.dumbre, lenb, zhanjie9,
	pierre.gondois, sumitg
  Cc: linux-acpi, linux-kernel, linux-pm, acpica-devel, linuxarm,
	lihuisong, yubowen8, zhangpengjie2, wangzhi12, linhongye,
	zhenglifeng1

This series implements support for the CPPC v4 Resource Priority Register
mechanism defined in ACPI 6.6, Section 8.4.6.1.2.7, and exposes it to
userspace via sysfs.

Resource Priority allows OSPM to control the relative priority among
processors for shared resources.  The controlled resource types include
processor boost, throttle, L2 cache, L3 cache, and memory bandwidth.
Each Resource Priority group consists of:

  - CONTROLLED_RESOURCES: which resource types the group affects
  - ENABLE_VALUE / ENABLE_REGISTER: enable/disable the group
  - PRIORITY_COUNT / PRIORITY_REGISTER: read/write the priority level

The patch series is organized in three parts:

  - patches 1-4 extend the CPPC data structures and _CPC parser to handle
    Package-type entries and parse Resource Priority sub-packages into
    structured descriptors.

  - patches 5-7 refactor existing register I/O helpers to support direct
    register access and add accessor functions for Resource Priority
    attributes (enable, priority count, priority value).

  - patch 8 creates a "resource_priority" sysfs hierarchy under each
    cpufreq policy to expose the Resource Priority attributes to userspace.

---

RFC: sysfs placement

The sysfs interface is currently placed under /sys/devices/system/cpu/cpufreq/
(i.e. the cpufreq policy directory). I am unsure whether this is the best
location and would appreciate reviewer feedback.

The concern is that Resource Priority covers resource types beyond CPU
frequency control:

  - PROCESSOR_BOOST, PROCESSOR_THROTTLE -- clearly CPU-frequency related
  - L2_CACHE, L3_CACHE -- cache partitioning, not frequency
  - MEMORY_BANDWIDTH -- memory QoS, not frequency

Placing the attributes under cpufreq makes sense for boost/throttle but
feels semantically wrong for cache and memory bandwidth resources.

I would appreciate feedback on whether cpufreq is the right home for
this interface, or whether a different location would be more appropriate.

Lifeng Zheng (8):
  ACPI: CPPC: Prepare cpc_register_resource for Package-type entries
  ACPI: CPPC: Refactor element parsing into parse_cpc_element()
  ACPI: CPPC: Refactor resource cleanup into free_reg_resource()
  ACPI: CPPC: Parse Resource Priority Register entries from _CPC package
  ACPI: CPPC: Store optional flag in cpc_register_resource
  ACPI: CPPC: Factor out cpc_read_reg() and cpc_write_reg()
  ACPI: CPPC: Add Resource Priority accessors
  cpufreq: cppc: Expose Resource Priority attributes via sysfs

 drivers/acpi/cppc_acpi.c       | 729 +++++++++++++++++++++++++++------
 drivers/cpufreq/cppc_cpufreq.c | 270 ++++++++++++
 include/acpi/cppc_acpi.h       |  60 +++
 3 files changed, 927 insertions(+), 132 deletions(-)

-- 
2.33.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-07-24  6:54 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-17  2:44 [PATCH 0/8] ACPI: CPPC: Resource Priority Register support and sysfs interface Lifeng Zheng
2026-07-17  2:44 ` [PATCH 1/8] ACPI: CPPC: Prepare cpc_register_resource for Package-type entries Lifeng Zheng
2026-07-21 19:04   ` Rafael J. Wysocki (Intel)
2026-07-24  6:54     ` zhenglifeng (A)
2026-07-17  2:44 ` [PATCH 2/8] ACPI: CPPC: Refactor element parsing into parse_cpc_element() Lifeng Zheng
2026-07-17  2:44 ` [PATCH 3/8] ACPI: CPPC: Refactor resource cleanup into free_reg_resource() Lifeng Zheng
2026-07-17  2:44 ` [PATCH 4/8] ACPI: CPPC: Parse Resource Priority Register entries from _CPC package Lifeng Zheng
2026-07-17  2:44 ` [PATCH 5/8] ACPI: CPPC: Store optional flag in cpc_register_resource Lifeng Zheng
2026-07-17  2:45 ` [PATCH 6/8] ACPI: CPPC: Factor out cpc_read_reg() and cpc_write_reg() Lifeng Zheng
2026-07-17  2:45 ` [PATCH 7/8] ACPI: CPPC: Add Resource Priority accessors Lifeng Zheng
2026-07-17  2:45 ` [PATCH 8/8] cpufreq: cppc: Expose Resource Priority attributes via sysfs Lifeng Zheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®