drivers/platform/x86/amd/hfi/hfi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
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
On Fri, 08 May 2026 00:39:26 +0530, Krishnamoorthi M wrote:
> 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.
>
> [...]
Thank you for your contribution, it has been applied to my local
review-ilpo-next branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-next branch only once I've pushed my
local branch there, which might take a while.
The list of commits applied:
[1/1] platform/x86/amd: hfi: Support for ranking table versions
commit: 4339fa4fae057c99cbcfd8127769219feb14964b
--
i.
On Fri, 8 May 2026, Krishnamoorthi M wrote:
> 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>
Hi,
Don't we want to have Cc: stable@vger.kernel.org # 6.17 for this?
(I can add it if that's the case, no need to resubmit because of it.)
--
i.
> ---
> 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;
>
Hi, On 5/11/2026 7:50 PM, Ilpo Järvinen wrote: > On Fri, 8 May 2026, Krishnamoorthi M wrote: > >> 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> > Hi, > > Don't we want to have Cc: stable@vger.kernel.org # 6.17 for this? No, Cc: stable is not required. This change enables ranking table support for upcoming AMD platforms(which reports table version 3), so there is no issue to address on stable. Thanks, Krishna > > (I can add it if that's the case, no need to resubmit because of it.) >
On 5/8/2026 00:39, Krishnamoorthi M wrote:
> 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>
Looks good to me.
Reviewed-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Thanks,
Shyam
> ---
> 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;
On 5/7/26 14:09, Krishnamoorthi M wrote:
> 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>
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
> ---
> 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;
© 2016 - 2026 Red Hat, Inc.