[PATCH 0/4] platform/x86/amd/hsmp: Unify per-socket sysfs metrics
From: Erwan Velu
Date: Wed Oct 07 2026 - 09:03:19 EST
From: Erwan Velu <e.velu@xxxxxxxxxx>
The goal of this series is to ease server monitoring, by exposing the
HSMP metrics the same way whatever the driver, in a format that is
straightforward to integrate in metrics exporters.
The per-socket HSMP telemetry attributes (c0_residency_input,
ddr_max_bw, pwr_current_active_freq_limit, ...) are only implemented by
the ACPI driver, although they are plain HSMP messages the platform
driver can send as well. Systems probed by the platform driver therefore
only get metrics_bin.
Their location also depends on the driver: AMDI0097:0X with the ACPI
driver, amd_hsmp/socketN with the platform one.
This series moves the attributes to common code and exposes them from
both drivers under a single /sys/devices/amd_hsmp/socketN location. The
existing ACPI and platform sysfs paths are kept for compatibility.
Patch 1 is a pure code move, patch 2 adds the socket devices and wires
them in the ACPI driver, patch 3 does the same for the platform driver.
Patch 4 exposes the pwr_current_active_freq_limit_source bitmask as a
single hexadecimal value, whose interpretation can be centralized in the
monitoring stack (e.g. Grafana value mappings).
Tested on Zen3 and Zen4 (Family 19h) servers with the platform driver,
and on Zen5 (Family 1Ah) servers with the ACPI driver, in both single
and dual socket configurations.
Erwan Velu (4):
platform/x86/amd/hsmp: Move per-socket sysfs attributes to common code
platform/x86/amd/hsmp: Add /sys/devices/amd_hsmp socket devices
platform/x86/amd/hsmp: Expose socket attributes from the platform
driver
platform/x86/amd/hsmp: Add pwr_current_active_freq_limit_source_raw
Documentation/arch/x86/amd_hsmp.rst | 20 +-
drivers/platform/x86/amd/hsmp/Makefile | 2 +-
drivers/platform/x86/amd/hsmp/acpi.c | 327 +----------------
drivers/platform/x86/amd/hsmp/hsmp.h | 6 +
drivers/platform/x86/amd/hsmp/plat.c | 20 ++
drivers/platform/x86/amd/hsmp/sysfs.c | 466 +++++++++++++++++++++++++
6 files changed, 517 insertions(+), 324 deletions(-)
create mode 100644 drivers/platform/x86/amd/hsmp/sysfs.c
base-commit: 22430ae5d90ab288b0ee2ad99ae941f4a666b694
--
2.53.0