platform/x86: hfi: Parse CPU core ranking data from shared memory
authorPerry Yuan <Perry.Yuan@amd.com>
Mon, 9 Jun 2025 20:05:10 +0000 (15:05 -0500)
committerBorislav Petkov (AMD) <bp@alien8.de>
Mon, 7 Jul 2025 19:17:16 +0000 (21:17 +0200)
commitd4e95ea7a78e46be2f2fe529fe578d3834c453a2
treea006d6796da3a091204b9118eaf829b7712b8cd4
parent5d902ee5609a299748dc1f9eb56cf36ad3275ea9
platform/x86: hfi: Parse CPU core ranking data from shared memory

When `amd_hfi` driver is loaded, it will use PCCT subspace type 4 table
to retrieve the shared memory address which contains the CPU core ranking
table. This table includes a header that specifies the number of ranking
data entries to be parsed and rank each CPU core with the Performance and
Energy Efficiency capability as implemented by the CPU power management
firmware.

Once the table has been parsed, each CPU is assigned a ranking score
within its class. Subsequently, when the scheduler selects cores, it
chooses from the ranking list based on the assigned scores in each class,
thereby ensuring the optimal selection of CPU cores according to their
predefined classifications and priorities.

Signed-off-by: Perry Yuan <Perry.Yuan@amd.com>
Co-developed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Acked-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/20250609200518.3616080-6-superm1@kernel.org
drivers/platform/x86/amd/hfi/hfi.c