[lkml]   [2021]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH v4 0/1] Interface to represent PAPR firmware attributes

Changelog v3 --> v4
Based on a comment from Fabiano:
1. Resolved typo in documentation
2. Statically allocate "pgattrs" instead of kmalloc as size known at
compile time
3. Converted sprintf calls to snprintf as size of buffer is known
4. Changed the implementation of "papr_show_desc" function to make an
extra H_CALL as a result of making the scope of esi_hdr and
esi_attrs local
5. Removed bailing out on version mismatch as the documentation states
that the attribute structure can never change, only the data and that
will not break the implementation. Hence just a warning is issued on
version mismatch
6. Avoid passing a statically allocated buf to "pgs[idx]",
instead used kasprintf to allocate and pass the data through

Also, have implemented a POC using this interface for the powerpc-utils'
ppc64_cpu --frequency command-line tool to utilize this information
in userspace.
The POC for the new interface has been hosted here:

Sample output from the powerpc-utils tool is as follows:

# ppc64_cpu --frequency
Power and Performance Mode: XXXX
Idle Power Saver Status : XXXX
Processor Folding Status : XXXX --> Printed if Idle power save status is supported

Platform reported frequencies --> Frequencies reported from the platform's H_CALL i.e PAPR interface
min : NNNN GHz
max : NNNN GHz
static : NNNN GHz

Tool Computed frequencies
min : NNNN GHz (cpu XX)
max : NNNN GHz (cpu XX)
avg : NNNN GHz

Pratik R. Sampat (1):
powerpc/pseries: Interface to represent PAPR firmware attributes

.../sysfs-firmware-papr-energy-scale-info | 26 ++
arch/powerpc/include/asm/hvcall.h | 24 +-
arch/powerpc/kvm/trace_hv.h | 1 +
arch/powerpc/platforms/pseries/Makefile | 3 +-
.../pseries/papr_platform_attributes.c | 331 ++++++++++++++++++
5 files changed, 383 insertions(+), 2 deletions(-)
create mode 100644 Documentation/ABI/testing/sysfs-firmware-papr-energy-scale-info
create mode 100644 arch/powerpc/platforms/pseries/papr_platform_attributes.c


 \ /
  Last update: 2021-07-16 17:24    [W:0.089 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site