platform/x86/amd/hsmp: add support for metrics tbl
authorSuma Hegde <suma.hegde@amd.com>
Tue, 10 Oct 2023 12:03:09 +0000 (12:03 +0000)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Thu, 12 Oct 2023 13:29:58 +0000 (16:29 +0300)
commit5150542b8ec5fb561be080ed0ef3bab8598154c3
tree711966c68853dae66ba05dbd101403ffc8ba68ef
parent01d2adcfe0f1bc0f08d822a04b2c354c106d4d2f
platform/x86/amd/hsmp: add support for metrics tbl

AMD MI300 MCM provides GET_METRICS_TABLE message to retrieve
all the system management information from SMU.

The metrics table is made available as hexadecimal sysfs binary file
under per socket sysfs directory created at
/sys/devices/platform/amd_hsmp/socket%d/metrics_bin

Metrics table definitions will be documented as part of Public PPR.
The same is defined in the amd_hsmp.h header.

Signed-off-by: Suma Hegde <suma.hegde@amd.com>
Reviewed-by: Naveen Krishna Chatradhi <nchatrad@amd.com>
Link: https://lore.kernel.org/r/20231010120310.3464066-2-suma.hegde@amd.com
[ij: lseek -> lseek(), dram -> DRAM in dev_err()]
[ij: added period to terminate a documentation sentence]
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Documentation/arch/x86/amd_hsmp.rst
arch/x86/include/uapi/asm/amd_hsmp.h
drivers/platform/x86/amd/hsmp.c