]> git.apps.os.sepia.ceph.com Git - ceph-client.git/commit
x86/amd_nb: Simplify root device search
authorYazen Ghannam <yazen.ghannam@amd.com>
Fri, 6 Dec 2024 16:11:59 +0000 (16:11 +0000)
committerBorislav Petkov (AMD) <bp@alien8.de>
Wed, 8 Jan 2025 09:48:03 +0000 (10:48 +0100)
commit40a5f6ffdfc8f8ed0d8c535dfa3733b31c66a88c
tree102d04fd9f83ceaa4b294d826983b7f9e2a69f25
parent962f1970a32430ce6c75ea23cbc59d68346481fd
x86/amd_nb: Simplify root device search

The "root" device search was introduced to support SMN access for Zen
systems. This device represents a PCIe root complex. It is not the
same as the "CPU/node" devices found at slots 0x18-0x1F.

There may be multiple PCIe root complexes within an AMD node. Such is
the case with server or High-end Desktop (HEDT) systems, etc. Therefore
it is not enough to assume "root <-> AMD node" is a 1-to-1 association.

Currently, this is handled by skipping "extra" root complexes during the
search. However, the hardware provides the PCI bus number of an AMD
node's root device.

Use the hardware info to get the root device's bus and drop the extra
search code and PCI IDs.

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