mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Muralidhara M K <muralidhara.mk@amd.com>
Cc: Mario.Limonciello@amd.com, platform-driver-x86@vger.kernel.org,
	 LKML <linux-kernel@vger.kernel.org>,
	 Mario Limonciello <superm1@kernel.org>
Subject: Re: [PATCH v5 3/4] platform/x86/amd/hsmp: Add ACPI client support for Family 1Ah
Date: Fri, 18 Sep 2026 14:43:07 +0300 (EEST)	[thread overview]
Message-ID: <af7a2864-a632-7c5a-1c69-11a968839ca2@linux.intel.com> (raw)
In-Reply-To: <20260901045134.2833282-4-muralidhara.mk@amd.com>

On Tue, 1 Sep 2026, Muralidhara M K wrote:

> 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 platforms don't report a server protocol version, so also gate
> the metric table DRAM base lookup on is_client_platform() alongside
> the existing proto_ver check, so client platforms get their metric
> table base initialized too.
> 
> hsmp_pdev->proto_ver holds the Ryzen Master SMC interface version on
> client platforms, a separate numbering space from the server protocol
> versions in enum hsmp_proto_versions, so gate on it using its own
> RYZEN_MASTER_PROTO_VER1 rather than assuming every client platform is
> ready for the metric table lookup regardless of interface version.
> 
> Signed-off-by: Muralidhara M K <muralidhara.mk@amd.com>
> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
> ---
>  arch/x86/include/uapi/asm/amd_hsmp.h | 9 +++++++++
>  drivers/platform/x86/amd/hsmp/acpi.c | 3 ++-
>  2 files changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/include/uapi/asm/amd_hsmp.h b/arch/x86/include/uapi/asm/amd_hsmp.h
> index 00ca7855ca00..3e1b7cbe0f04 100644
> --- a/arch/x86/include/uapi/asm/amd_hsmp.h
> +++ b/arch/x86/include/uapi/asm/amd_hsmp.h
> @@ -95,6 +95,15 @@ enum hsmp_proto_versions {
>  	HSMP_PROTO_VER7
>  };
>  
> +/*
> + * The Ryzen Master SMC interface versions its own way, reported by
> + * HSMP_CLIENT_GET_INTERFACE_VER. It is a separate numbering space from
> + * enum hsmp_proto_versions above, which only applies to the server set.
> + */
> +enum ryzen_master_proto_versions {
> +	RYZEN_MASTER_PROTO_VER1 = 1,
> +};
> +
>  struct hsmp_msg_desc {
>  	int num_args;
>  	int response_sz;
> diff --git a/drivers/platform/x86/amd/hsmp/acpi.c b/drivers/platform/x86/amd/hsmp/acpi.c
> index 8257cd1da48e..43d746546536 100644
> --- a/drivers/platform/x86/amd/hsmp/acpi.c
> +++ b/drivers/platform/x86/amd/hsmp/acpi.c
> @@ -557,7 +557,8 @@ 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 >= RYZEN_MASTER_PROTO_VER1) ||
> +	    hsmp_pdev->proto_ver >= HSMP_PROTO_VER6) {

sashiko also warns that !is_client_platform() is not done for the second 
part of the check, which may eventually lead to spurious matches on the 
second check on a client platform.


-- 
 i.


  parent reply	other threads:[~2026-09-18 11:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-01  4:51 [PATCH v5 0/4] platform/x86/amd/hsmp: Family 1Ah client support Muralidhara M K
2026-09-01  4:51 ` [PATCH v5 1/4] platform/x86/amd/hsmp: Add HSMP client support for Family 1Ah Muralidhara M K
2026-09-18 11:34   ` Ilpo Järvinen
2026-09-19  5:32     ` M K, Muralidhara
2026-09-18 11:46   ` Ilpo Järvinen
2026-09-01  4:51 ` [PATCH v5 2/4] platform/x86/amd/hsmp: Route metric table through the client messages Muralidhara M K
2026-09-01  4:51 ` [PATCH v5 3/4] platform/x86/amd/hsmp: Add ACPI client support for Family 1Ah Muralidhara M K
2026-09-18 11:39   ` Ilpo Järvinen
2026-09-19  5:30     ` M K, Muralidhara
2026-09-18 11:43   ` Ilpo Järvinen [this message]
2026-09-01  4:51 ` [PATCH v5 4/4] platform/x86/amd/hsmp: Document and expose client telemetry table in UAPI Muralidhara M K
2026-09-01 12:24 ` [PATCH v5 0/4] platform/x86/amd/hsmp: Family 1Ah client support Mario Limonciello

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=af7a2864-a632-7c5a-1c69-11a968839ca2@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=Mario.Limonciello@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=muralidhara.mk@amd.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=superm1@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

all inboxes | Powered by JetHome®