[PATCH v2 5/5] Documentation/ABI: Add sysfs-class-amd_hsmp

From: Erwan Velu

Date: Mon Nov 16 2026 - 10:52:56 EST


From: Erwan Velu <e.velu@xxxxxxxxxx>

The per-socket HSMP attributes are only described in
Documentation/arch/x86/amd_hsmp.rst, and have no entry in
Documentation/ABI/.

Document /sys/class/amd_hsmp/socketX/ and its attributes as the
interface for userspace, whichever driver probed. The historical
/sys/devices/platform/AMDI0097:0X/ and
/sys/devices/platform/amd_hsmp/socketX/ locations keep working.

Assisted-by: claude-opus-5-5
Signed-off-by: Erwan Velu <e.velu@xxxxxxxxxx>
---
.../ABI/testing/sysfs-class-amd_hsmp | 120 ++++++++++++++++++
MAINTAINERS | 1 +
2 files changed, 121 insertions(+)
create mode 100644 Documentation/ABI/testing/sysfs-class-amd_hsmp

diff --git a/Documentation/ABI/testing/sysfs-class-amd_hsmp b/Documentation/ABI/testing/sysfs-class-amd_hsmp
new file mode 100644
index 000000000000..32da798dd2ad
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-amd_hsmp
@@ -0,0 +1,120 @@
+What: /sys/class/amd_hsmp/socketX/
+Date: November 2026
+KernelVersion: 7.5
+Contact: platform-driver-x86@xxxxxxxxxxxxxxx
+Description: One directory per CPU socket exposing the AMD Host System
+ Management Port (HSMP) per-socket attributes. X is the socket
+ index, starting at 0.
+
+ The directory is a link to a device whose parent is the device
+ of the driver that probed the socket, so the attributes below
+ are the same whichever driver is in use:
+
+ - ACPI driver:
+ /sys/devices/platform/AMDI0097:0X/amd_hsmp/socketX/
+ - plat driver:
+ /sys/devices/platform/amd_hsmp/amd_hsmp/socketX/
+
+ The historical /sys/devices/platform/AMDI0097:0X/ attributes
+ and /sys/devices/platform/amd_hsmp/socketX/ (now a symlink to
+ the socket device) keep working.
+
+ On client platforms, only smu_fw_version and protocol_version
+ are visible.
+
+What: /sys/class/amd_hsmp/socketX/metrics_bin
+Date: November 2026
+KernelVersion: 7.5
+Contact: platform-driver-x86@xxxxxxxxxxxxxxx
+Description: (RO) Binary HSMP metrics table of the socket, as defined by
+ struct hsmp_metric_table in arch/x86/include/uapi/asm/amd_hsmp.h.
+
+ Only supported with HSMP protocol version 6. On protocol version
+ 7 and later, a read returns -EOPNOTSUPP and the table must be
+ read with the HSMP_IOCTL_GET_TELEMETRY_DATA ioctl on /dev/hsmp.
+ lseek() is not supported, the whole table is read at once.
+
+What: /sys/class/amd_hsmp/socketX/smu_fw_version
+Date: November 2026
+KernelVersion: 7.5
+Contact: platform-driver-x86@xxxxxxxxxxxxxxx
+Description: (RO) SMU firmware version, as "major.minor.debug".
+
+What: /sys/class/amd_hsmp/socketX/protocol_version
+Date: November 2026
+KernelVersion: 7.5
+Contact: platform-driver-x86@xxxxxxxxxxxxxxx
+Description: (RO) HSMP interface version.
+
+What: /sys/class/amd_hsmp/socketX/c0_residency_input
+Date: November 2026
+KernelVersion: 7.5
+Contact: platform-driver-x86@xxxxxxxxxxxxxxx
+Description: (RO) Percentage of cores in C0 state.
+
+What: /sys/class/amd_hsmp/socketX/prochot_status
+Date: November 2026
+KernelVersion: 7.5
+Contact: platform-driver-x86@xxxxxxxxxxxxxxx
+Description: (RO) 1 if the processor is at its thermal threshold value
+ (PROCHOT asserted), 0 otherwise.
+
+What: /sys/class/amd_hsmp/socketX/ddr_max_bw
+What: /sys/class/amd_hsmp/socketX/ddr_utilised_bw_input
+What: /sys/class/amd_hsmp/socketX/ddr_utilised_bw_perc_input
+Date: November 2026
+KernelVersion: 7.5
+Contact: platform-driver-x86@xxxxxxxxxxxxxxx
+Description: (RO) DDR bandwidth of the socket:
+
+ ========================== =================================
+ ddr_max_bw Theoretical maximum, in GB/s
+ ddr_utilised_bw_input Currently utilized, in GB/s
+ ddr_utilised_bw_perc_input Currently utilized, in percent
+ ========================== =================================
+
+What: /sys/class/amd_hsmp/socketX/mclk_input
+What: /sys/class/amd_hsmp/socketX/fclk_input
+Date: November 2026
+KernelVersion: 7.5
+Contact: platform-driver-x86@xxxxxxxxxxxxxxx
+Description: (RO) Memory clock (mclk_input) and fabric clock (fclk_input),
+ in MHz.
+
+What: /sys/class/amd_hsmp/socketX/clk_fmax
+What: /sys/class/amd_hsmp/socketX/clk_fmin
+Date: November 2026
+KernelVersion: 7.5
+Contact: platform-driver-x86@xxxxxxxxxxxxxxx
+Description: (RO) Maximum (clk_fmax) and minimum (clk_fmin) frequency of
+ the socket, in MHz.
+
+What: /sys/class/amd_hsmp/socketX/cclk_freq_limit_input
+Date: November 2026
+KernelVersion: 7.5
+Contact: platform-driver-x86@xxxxxxxxxxxxxxx
+Description: (RO) Core clock frequency limit of the socket, in MHz.
+
+What: /sys/class/amd_hsmp/socketX/pwr_current_active_freq_limit
+Date: November 2026
+KernelVersion: 7.5
+Contact: platform-driver-x86@xxxxxxxxxxxxxxx
+Description: (RO) Current active frequency limit of the socket, in MHz.
+
+What: /sys/class/amd_hsmp/socketX/pwr_current_active_freq_limit_source
+Date: November 2026
+KernelVersion: 7.5
+Contact: platform-driver-x86@xxxxxxxxxxxxxxx
+Description: (RO) Sources of the current active frequency limit, one name
+ per line, among: cHTC-Active, PROCHOT, TDC limit, PPT Limit,
+ OPN Max, Reliability Limit, APML Agent, HSMP Agent.
+
+What: /sys/class/amd_hsmp/socketX/pwr_current_active_freq_limit_source_raw
+Date: November 2026
+KernelVersion: 7.5
+Contact: platform-driver-x86@xxxxxxxxxxxxxxx
+Description: (RO) Sources of the current active frequency limit, as a
+ hexadecimal bitmask (e.g. "0x0003"). Bits 0 to 7 are, in order:
+ cHTC-Active, PROCHOT, TDC limit, PPT Limit, OPN Max, Reliability
+ Limit, APML Agent, HSMP Agent. The bit assignment comes from the
+ HSMP specification: new sources are only appended.
diff --git a/MAINTAINERS b/MAINTAINERS
index ccbcdc0799b9..1e23f4e5c902 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1193,6 +1193,7 @@ M: Naveen Krishna Chatradhi <naveenkrishna.chatradhi@xxxxxxx>
R: Carlos Bilbao <carlos.bilbao@xxxxxxxxxx>
L: platform-driver-x86@xxxxxxxxxxxxxxx
S: Maintained
+F: Documentation/ABI/testing/sysfs-class-amd_hsmp
F: Documentation/arch/x86/amd_hsmp.rst
F: arch/x86/include/asm/amd/hsmp.h
F: arch/x86/include/uapi/asm/amd_hsmp.h
--
2.53.0