Re: [PATCH for 6.19 4/4] PM: EM: Add dump to get-perf-domains in the EM YNL spec

From: Changwoo Min
Date: Tue Jan 06 2026 - 03:25:34 EST


Hi Donald,

On 1/5/26 8:19 PM, Donald Hunter wrote:
Changwoo Min <changwoo@xxxxxxxxxx> writes:

Add dump to get-perf-domains, so that a user can fetch either information
about a specific performance domain with do or information about all
performance domains with dump. The YNL spec, autogenerated files, and
the do implementation are updated, and the dump implementation is added.

Suggested-by: Donald Hunter <donald.hunter@xxxxxxxxx>
Signed-off-by: Changwoo Min <changwoo@xxxxxxxxxx>
---
.../netlink/specs/dev-energymodel.yaml | 12 ++++
include/uapi/linux/dev_energymodel.h | 3 +-
kernel/power/em_netlink.c | 58 +++++++++++++++++--
kernel/power/em_netlink_autogen.c | 16 ++++-
kernel/power/em_netlink_autogen.h | 2 +
5 files changed, 82 insertions(+), 9 deletions(-)

diff --git a/Documentation/netlink/specs/dev-energymodel.yaml b/Documentation/netlink/specs/dev-energymodel.yaml
index af8b8f72f722..1843e68faacf 100644
--- a/Documentation/netlink/specs/dev-energymodel.yaml
+++ b/Documentation/netlink/specs/dev-energymodel.yaml
@@ -47,6 +47,11 @@ attribute-sets:
doc: >-
Information on all the performance domains.
attributes:
+ -
+ name: perf-domain-id
+ type: u32
+ doc: >-
+ A unique ID number for each performance domain.
-
name: perf-domain
type: nest
@@ -136,6 +141,13 @@ operations:
attribute-set: perf-domains

I think this can be changed to 'perf-domain' and you could remove
the 'perf-domains' attribute-set.

doc: Get the list of information for all performance domains.
do:
+ request:
+ attributes:
+ - perf-domain-id
+ reply:
+ attributes:
+ - perf-domain

If you use 'perf-domain' then the reply attributes would be:

reply:
attributes: &perf-domain-attrs
- pad
- perf-domain-id
- flags
- cpus

+ dump:
reply:
attributes:
- perf-domain

You can then change the dump reply to be:

dump:
reply:
attributes: *perf-domain-attrs

The dump reply for multiple perf domains would then look like this, no
need for the 'perf-domains' wrapper:

[{'perf-domain-id': ...,
'flags': ...,
'cpus': [1, 2, 3]},
{'perf-domain-id': ...,
'flags': ...,
'cpus': [1, 2, 3]}]


Thank you for the suggestion. I will send v2 soon with your suggested changes.

Regards,
Changwoo Min