The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] platform/x86/amd: hfi: Support for ranking table versions
@ 2026-05-07 19:09 Krishnamoorthi M
  2026-05-07 19:25 ` Mario Limonciello
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Krishnamoorthi M @ 2026-05-07 19:09 UTC (permalink / raw)
  To: mario.limonciello, hansg, ilpo.jarvinen
  Cc: Shyam-sundar.S-k, perry.yuan, platform-driver-x86, linux-kernel,
	Krishnamoorthi M

Add changes to support new ranking table version. Version 2 of the
heterogeneous ranking table provides static CPU rankings. Version 3 adds
dynamic ranking table support on newer AMD platforms. These changes ensure
that platforms still reporting version 2 continue to function with the
existing static ranking path, avoiding regressions on older hardware
that does not supply a dynamic ranking table.

Signed-off-by: Krishnamoorthi M <krishnamoorthi.m@amd.com>
---
 drivers/platform/x86/amd/hfi/hfi.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/amd/hfi/hfi.c b/drivers/platform/x86/amd/hfi/hfi.c
index 83863a5e0fbc..e0ebcb0c4acd 100644
--- a/drivers/platform/x86/amd/hfi/hfi.c
+++ b/drivers/platform/x86/amd/hfi/hfi.c
@@ -33,7 +33,8 @@
 
 #define AMD_HFI_DRIVER		"amd_hfi"
 #define AMD_HFI_MAILBOX_COUNT		1
-#define AMD_HETERO_RANKING_TABLE_VER	2
+#define AMD_HETERO_RANKING_TABLE_MIN_VER	2
+#define AMD_HETERO_RANKING_TABLE_MAX_VER	3
 
 #define AMD_HETERO_CPUID_27	0x80000027
 
@@ -158,7 +159,8 @@ static int amd_hfi_fill_metadata(struct amd_hfi_data *amd_hfi_data)
 		dev_err(amd_hfi_data->dev, "invalid signature in shared memory\n");
 		return -EINVAL;
 	}
-	if (amd_hfi_data->shmem->version_number != AMD_HETERO_RANKING_TABLE_VER) {
+	if (amd_hfi_data->shmem->version_number < AMD_HETERO_RANKING_TABLE_MIN_VER ||
+	    amd_hfi_data->shmem->version_number > AMD_HETERO_RANKING_TABLE_MAX_VER) {
 		dev_err(amd_hfi_data->dev, "invalid version %d\n",
 			amd_hfi_data->shmem->version_number);
 		return -EINVAL;
-- 
2.34.1


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

end of thread, other threads:[~2026-05-11 14:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-07 19:09 [PATCH] platform/x86/amd: hfi: Support for ranking table versions Krishnamoorthi M
2026-05-07 19:25 ` Mario Limonciello
2026-05-08 10:11 ` Shyam Sundar S K
2026-05-11 14:20 ` Ilpo Järvinen

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