Skip to content

Interface to represent PAPR firmware attributes

Pratik R. Sampat kvm-ppc linux-kselftest linuxppc-dev lkml 9 versions – Applied

Status from this message: Applied to powerpc/next.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v9 Latest2 patches 1 replyApplied
  2. v82 patches 5 repliesSuperseded
  3. v71 patch 2 repliesSuperseded
Earlier versions · 6
VersionPostedPatchesRepliesStatus
v61 patch2 repliesSuperseded
v51 patch2 repliesSuperseded
v41 patch2 repliesSuperseded
v31 patch4 repliesSuperseded
v21 patch2 repliesSuperseded
v11 patch3 repliesSuperseded

Patches in v9 Applied

#Subject and filesSizeRepliesApplied
1/2powerpc/pseries: Interface to represent PAPR firmware attributesDocumentation/ABI/testing/sysfs-firmware-papr-energy-scale-info arch/powerpc/include/asm/firmware.h arch/powerpc/include/asm/hvcall.h +4 more+399 -30 replies
2/2selftest/powerpc: Add PAPR sysfs attributes sniff testtools/testing/selftests/powerpc/Makefile tools/testing/selftests/powerpc/papr_attributes/.gitignore tools/testing/selftests/powerpc/papr_attributes/Makefile +1 more+117 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v9 yet.

Read the v9 thread

Cover letter [PATCH v9 0/2] Interface to represent PAPR firmware attributes

RFC: https://lkml.org/lkml/2021/6/4/791
PATCH v1: https://lkml.org/lkml/2021/6/16/805
PATCH v2: https://lkml.org/lkml/2021/7/6/138
PATCH v3: https://lkml.org/lkml/2021/7/12/2799
PATCH v4: https://lkml.org/lkml/2021/7/16/532
PATCH v5: https://lkml.org/lkml/2021/7/19/247
PATCH v6: https://lkml.org/lkml/2021/7/20/36
PATCH v7: https://lkml.org/lkml/2021/7/23/26
PATCH v8: https://lkml.org/lkml/2021/9/28/554

Changelog v8-->v9
1. Edited interface documentation to be in line with the current formatting
2. Created a parent abstraction for cleaning up the functions exporting energy scale information. Also commented the need to make a new hcall each time instead of caching objects as energy modes may change dynamically
3. Added a dynamically reallocating buffer for the hcall return attributes in the case of H_PARTIAL and H_P4
4. Added support to discover H_GET_ENERGY_SCALE_INFO feature via the ibm,hypertas-function device tree property
5. Removed versioning check for hcall as the PAPR documents backward compatibility support for this hcall
6. Decoupled allocation and registering for sysfs interfaces for handling faliures gracefully
7. Cleaned up functions, return codes, variable and label naming as per comments

Additional comment:
Currently the interface is modeled to calling it as papr_platform_attributes.c as to keep it open to adding more attributes in the future. However, if believed that its not necessary then I could rename it to energy_scale_info.c instead and remove the "papr" parent directory from the interface as well.

Pratik R. Sampat (2):
powerpc/pseries: Interface to represent PAPR firmware attributes selftest/powerpc: Add PAPR sysfs attributes sniff test

 .../sysfs-firmware-papr-energy-scale-info     |  29 ++
 arch/powerpc/include/asm/firmware.h           |   4 +-
 arch/powerpc/include/asm/hvcall.h             |   3 +-
 arch/powerpc/kvm/trace_hv.h                   |   1 +
 arch/powerpc/platforms/pseries/Makefile       |   3 +-
 arch/powerpc/platforms/pseries/firmware.c     |   1 +
 .../pseries/papr_platform_attributes.c        | 361 ++++++++++++++++++
 tools/testing/selftests/powerpc/Makefile      |   1 +
 .../powerpc/papr_attributes/.gitignore        |   2 +
 .../powerpc/papr_attributes/Makefile          |   7 +
 .../powerpc/papr_attributes/attr_test.c       | 107 ++++++
 11 files changed, 516 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-firmware-papr-energy-scale-info
 create mode 100644 arch/powerpc/platforms/pseries/papr_platform_attributes.c
 create mode 100644 tools/testing/selftests/powerpc/papr_attributes/.gitignore
 create mode 100644 tools/testing/selftests/powerpc/papr_attributes/Makefile
 create mode 100644 tools/testing/selftests/powerpc/papr_attributes/attr_test.c
Signature · 1 line
2.34.1