The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Muralidhara M K <muralidhara.mk@amd.com>
To: <ilpo.jarvinen@linux.intel.com>, <Mario.Limonciello@amd.com>
Cc: <platform-driver-x86@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	Muralidhara M K <muralidhara.mk@amd.com>
Subject: [PATCH v3 3/4] platform/x86/amd/hsmp: Add ACPI client support for Family 1Ah
Date: Wed, 19 Aug 2026 13:01:56 +0530	[thread overview]
Message-ID: <20260819073157.2426504-4-muralidhara.mk@amd.com> (raw)
In-Reply-To: <20260819073157.2426504-1-muralidhara.mk@amd.com>

The ACPI HSMP device (HID AMDI0097) on the Family 1Ah client platforms
(Models 80h-8Fh and E0h-E3h) describes its mailbox the same way server
platforms already do, via _CRS/_DSD, so hsmp_parse_acpi_table() and
hsmp_get_uid() need no client-specific handling.

Client firmware does not respond to the interface version query
(HSMP_CLIENT_GET_INTERFACE_VER). Instead, query the metrics table version,
as it is the only version-related request supported by the client firmware.
Server-side behavior remains unchanged.

Signed-off-by: Muralidhara M K <muralidhara.mk@amd.com>
---
 drivers/platform/x86/amd/hsmp/acpi.c | 2 +-
 drivers/platform/x86/amd/hsmp/hsmp.c | 8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/platform/x86/amd/hsmp/acpi.c b/drivers/platform/x86/amd/hsmp/acpi.c
index 8257cd1da48e..275258ee86bf 100644
--- a/drivers/platform/x86/amd/hsmp/acpi.c
+++ b/drivers/platform/x86/amd/hsmp/acpi.c
@@ -557,7 +557,7 @@ static int init_acpi(struct device *dev)
 		return ret;
 	}
 
-	if (hsmp_pdev->proto_ver >= HSMP_PROTO_VER6) {
+	if (is_client_platform() || 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");
diff --git a/drivers/platform/x86/amd/hsmp/hsmp.c b/drivers/platform/x86/amd/hsmp/hsmp.c
index 60889c1b1099..f35a891772e0 100644
--- a/drivers/platform/x86/amd/hsmp/hsmp.c
+++ b/drivers/platform/x86/amd/hsmp/hsmp.c
@@ -196,12 +196,16 @@ static const struct hsmp_plat_desc hsmp_desc_server = {
 	.metric_dram_msg	= HSMP_GET_METRIC_TABLE_DRAM_ADDR,
 };
 
-/* The client drives a different mailbox with the Ryzen Master SMC message set */
+/*
+ * Client firmware queries the metrics table version instead of the
+ * interface version (HSMP_CLIENT_GET_INTERFACE_VER) to provide a unified
+ * interface across multiple client platforms.
+ */
 static const struct hsmp_plat_desc hsmp_desc_client = {
 	.msg_desc		= hsmp_client_msg_desc_table,
 	.num_msgs		= HSMP_CLIENT_MSG_ID_MAX,
 	.test_msg		= HSMP_CLIENT_TEST,
-	.proto_ver_msg		= HSMP_CLIENT_GET_INTERFACE_VER,
+	.proto_ver_msg		= HSMP_CLIENT_GET_METRICS_TABLE_VER,
 	.metric_tbl_msg		= HSMP_CLIENT_GET_METRICS_TABLE,
 	.metric_dram_msg	= HSMP_CLIENT_GET_METRICS_TABLE_DRAM_ADDR,
 };
-- 
2.34.1


  parent reply	other threads:[~2026-08-19  7:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-19  7:31 [PATCH v3 0/4] platform/x86/amd/hsmp: Family 1Ah client support Muralidhara M K
2026-08-19  7:31 ` [PATCH v3 1/4] platform/x86/amd/hsmp: Add HSMP client support for Family 1Ah Muralidhara M K
2026-08-19  7:31 ` [PATCH v3 2/4] platform/x86/amd/hsmp: Route metric table through the client messages Muralidhara M K
2026-08-19  7:31 ` Muralidhara M K [this message]
2026-08-19 16:46   ` [PATCH v3 3/4] platform/x86/amd/hsmp: Add ACPI client support for Family 1Ah Mario Limonciello
2026-08-19  7:31 ` [PATCH v3 4/4] platform/x86/amd/hsmp: Document and expose client telemetry table in UAPI Muralidhara M K
2026-08-19 16:47 ` [PATCH v3 0/4] platform/x86/amd/hsmp: Family 1Ah client support Mario Limonciello
2026-08-24  5:19   ` M K, Muralidhara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260819073157.2426504-4-muralidhara.mk@amd.com \
    --to=muralidhara.mk@amd.com \
    --cc=Mario.Limonciello@amd.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox