]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/amd_nb: Use topology info to get AMD node count
authorYazen Ghannam <yazen.ghannam@amd.com>
Tue, 7 Jan 2025 22:28:41 +0000 (22:28 +0000)
committerBorislav Petkov (AMD) <bp@alien8.de>
Wed, 8 Jan 2025 09:49:20 +0000 (10:49 +0100)
commitbc7b2e629e0c9251ba96d864a30d34d1497b1b1b
treea660d0c1df4d9f4bba8ff50d7bc7e7c8f97d3fd5
parent40a5f6ffdfc8f8ed0d8c535dfa3733b31c66a88c
x86/amd_nb: Use topology info to get AMD node count

Currently, the total AMD node count is determined by searching and counting
CPU/node devices using PCI IDs.

However, AMD node information is already available through topology
CPUID/MSRs. The recent topology rework has made this info easier to access.

Replace the node counting code with a simple product of topology info.

Every node/northbridge is expected to have a 'misc' device. Clear everything
out if a 'misc' device isn't found on a node.

Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20250107222847.3300430-7-yazen.ghannam@amd.com
arch/x86/include/asm/amd_node.h
arch/x86/kernel/amd_nb.c