mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/4] platform/x86/amd/hsmp: Unify per-socket sysfs metrics
@ 2026-10-07 12:59 Erwan Velu
  2026-10-07 12:59 ` [PATCH 1/4] platform/x86/amd/hsmp: Move per-socket sysfs attributes to common code Erwan Velu
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Erwan Velu @ 2026-10-07 12:59 UTC (permalink / raw)
  To: platform-driver-x86
  Cc: Naveen Krishna Chatradhi, Carlos Bilbao, Hans de Goede,
	Ilpo Järvinen, linux-kernel

From: Erwan Velu <e.velu@criteo.com>

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-10-07 12:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-07 12:59 [PATCH 0/4] platform/x86/amd/hsmp: Unify per-socket sysfs metrics Erwan Velu
2026-10-07 12:59 ` [PATCH 1/4] platform/x86/amd/hsmp: Move per-socket sysfs attributes to common code Erwan Velu
2026-10-07 12:59 ` [PATCH 2/4] platform/x86/amd/hsmp: Add /sys/devices/amd_hsmp socket devices Erwan Velu
2026-10-07 12:59 ` [PATCH 3/4] platform/x86/amd/hsmp: Expose socket attributes from the platform driver Erwan Velu
2026-10-07 12:59 ` [PATCH 4/4] platform/x86/amd/hsmp: Add pwr_current_active_freq_limit_source_raw Erwan Velu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®