Skip to content

platform/x86/amd/hsmp: Family 1Ah Model 50h-5Fh HSMP and metrics

Muralidhara M K lkml platform-driver-x86 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest5 patches 1 replyIn review
  2. v68 patches 3 repliesSuperseded
  3. v58 patches 4 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v47 patches12 repliesSuperseded
v37 patches11 repliesSuperseded
v27 patches19 repliesSuperseded

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5platform/x86/amd/hsmp: Add HSMP messages for Family 1Ah, Model 50h-5Fharch/x86/include/uapi/asm/amd_hsmp.h+158 -140 replies
2/5platform/x86/amd/hsmp: Unify response_sz validation to an upper-bound checkdrivers/platform/x86/amd/hsmp/hsmp.c+9 -130 replies
3/5platform/x86/amd/hsmp: Source metric-table size from firmwarearch/x86/include/uapi/asm/amd_hsmp.h drivers/platform/x86/amd/hsmp/hsmp.c drivers/platform/x86/amd/hsmp/hsmp.h+21 -60 replies
4/5platform/x86/amd/hsmp: Add IOCTL_GET_TELEMETRY_DATA for metric table readsDocumentation/arch/x86/amd_hsmp.rst arch/x86/include/uapi/asm/amd_hsmp.h drivers/platform/x86/amd/hsmp/hsmp.c+220 -40 replies
5/5platform/x86/amd/hsmp: Enable protocol version 7 metric tables on the ACPI driverdrivers/platform/x86/amd/hsmp/acpi.c+20 -20 replies

Reviews trailers per patch

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

Read the v7 thread

Cover letter [PATCH v7 0/5] platform/x86/amd/hsmp: Family 1Ah Model 50h-5Fh HSMP and metrics

This series extends the AMD HSMP platform driver and UAPI for Family 1Ah, Model 50h-5Fh: new HSMP message IDs (including the PQoS-related IDs), relaxed response_sz handling against the descriptor table, firmware-reported metric table sizing for ioremap and reads, HSMP_IOCTL_GET_TELEMETRY_DATA on the existing character device for a single-shot full-table copy, and ACPI enablement for protocol version 7 tables. Documentation is updated in Documentation/arch/x86/amd_hsmp.rst.

The motivation for the new ioctl is that the sysfs metrics_bin path cannot serve the newer tables. It is a file read, so userspace can read it in chunks and observe a torn snapshot if an SMU refresh lands between read() calls, and it is bounded by PAGE_SIZE, so the ~13 KB table used by protocol version 7 on Family 1Ah Model 50h-5Fh cannot be returned at all. Rather than extend sysfs to lift both restrictions, the metric table is exposed through /dev/hsmp with an ioctl that always copies the table in one shot.

v6 submission (lore.kernel.org)

https://lore.kernel.org/platform-driver-x86/[email protected]/T/#m2fd6e85bd5fda3cf66fbdee3d8e34ccebef64dd3

This series applies on top of the HSMP concurrency series. The series is bisect-safe: each commit was built with
make W=1 drivers/platform/x86/amd/hsmp/
on top of the previous commits with no warnings, and scripts/checkpatch.pl --strict -g <rev> was run on each change (0 errors / 0 warnings / 0 checks).

Muralidhara M K (5):
platform/x86/amd/hsmp: Add HSMP messages for Family 1Ah, Model 50h-5Fh platform/x86/amd/hsmp: Unify response_sz validation to an upper-bound
check
platform/x86/amd/hsmp: Source metric-table size from firmware platform/x86/amd/hsmp: Add IOCTL_GET_TELEMETRY_DATA for metric table
reads
platform/x86/amd/hsmp: Enable protocol version 7 metric tables on the
ACPI driver

 Documentation/arch/x86/amd_hsmp.rst  |  35 ++++-
 arch/x86/include/uapi/asm/amd_hsmp.h | 222 +++++++++++++++++++++++++--
 drivers/platform/x86/amd/hsmp/acpi.c |  22 ++-
 drivers/platform/x86/amd/hsmp/hsmp.c | 183 +++++++++++++++++++---
 drivers/platform/x86/amd/hsmp/hsmp.h |   5 +-
 5 files changed, 428 insertions(+), 39 deletions(-)

base-commit: da97ec927e4441fed07044e3fed59763d7e07c3b

Signature · 1 line
2.34.1