platform/x86/amd/hsmp: Check num_sockets against MAX_AMD_SOCKETS
authorSuma Hegde <suma.hegde@amd.com>
Sat, 6 Jan 2024 02:25:30 +0000 (02:25 +0000)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Wed, 31 Jan 2024 08:31:07 +0000 (10:31 +0200)
commitef6e98177f8d331cdcbe18125a1e2da82f6ede34
tree5577254902eeb3bb56590aebe26bbf09998cf06d
parentd2bf115115d556a5a50cec9dd63cb5f64f10de87
platform/x86/amd/hsmp: Check num_sockets against MAX_AMD_SOCKETS

AMD supports connecting up to 8 AMD EPYCs in a system.
Hence, verify the num_sockets returned from amd_nb_num().
Also remove the WARN_ON() since the num_sockets is already verified.

Signed-off-by: Suma Hegde <suma.hegde@amd.com>
Reviewed-by: Naveen Krishna Chatradhi <nchatrad@amd.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20240106022532.1746932-9-suma.hegde@amd.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/amd/hsmp.c