Re: [PATCH v2 2/7] platform/x86/amd/hsmp: Add metrics table support for Family 1Ah Model 50h-5Fh

From: M K, Muralidhara

Date: Tue May 12 2026 - 02:32:09 EST




On 5/11/2026 11:08 PM, Ilpo Järvinen wrote:
Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.


On Mon, 27 Apr 2026, Muralidhara M K wrote:

Define the UAPI structures hsmp_metric_table_zen6_iod,
hsmp_metric_table_zen6_ccd and the top-level hsmp_metric_table_zen6
to describe the per-IOD and per-CCD metrics layout for AMD Family 1Ah
Model 50h-5Fh processors (HSMP protocol version 7). These structures
allow userspace tools to interpret the raw metric table binary exposed
via sysfs.

Widen the ACPI driver protocol version checks from
== HSMP_PROTO_VER6 to >= HSMP_PROTO_VER6 so the metric table
sysfs binary attribute is also created for protocol version 7 and
future versions.

Co-developed-by: Muthusamy Ramalingam <muthusamy.ramalingam@xxxxxxx>
Signed-off-by: Muthusamy Ramalingam <muthusamy.ramalingam@xxxxxxx>
Signed-off-by: Muralidhara M K <muralidhara.mk@xxxxxxx>
---

diff --git a/drivers/platform/x86/amd/hsmp/acpi.c b/drivers/platform/x86/amd/hsmp/acpi.c
index 97ed71593bdf..8044df862275 100644
--- a/drivers/platform/x86/amd/hsmp/acpi.c
+++ b/drivers/platform/x86/amd/hsmp/acpi.c
@@ -244,7 +244,7 @@ static ssize_t hsmp_metric_tbl_acpi_read(struct file *filp, struct kobject *kobj
static umode_t hsmp_is_sock_attr_visible(struct kobject *kobj,
const struct bin_attribute *battr, int id)
{
- if (hsmp_pdev->proto_ver == HSMP_PROTO_VER6)
+ if (hsmp_pdev->proto_ver >= HSMP_PROTO_VER6)
return battr->attr.mode;

return 0;
@@ -491,7 +491,7 @@ static int init_acpi(struct device *dev)
return ret;
}

- if (hsmp_pdev->proto_ver == HSMP_PROTO_VER6) {
+ if (hsmp_pdev->proto_ver >= HSMP_PROTO_VER6) {
ret = hsmp_get_tbl_dram_base(sock_ind);
if (ret)
dev_info(dev, "Failed to init metric table\n");

I'm trying to understand is changing these checks safe at this point of
series, or should it be the last patch of the series? What will occur on
v7 hw when this patch is applied but not the rest of the series, are the
tables returned binary combatible with v6?

Thank you for the feedback. I understand your point and will relocate this to the last patch of the series.
Family 1Ah and Models 50h-5Fh support Protocol version 7.
--
i.