summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/amd_node.h
diff options
context:
space:
mode:
authorYazen Ghannam <yazen.ghannam@amd.com>2024-12-06 16:11:59 +0000
committerBorislav Petkov (AMD) <bp@alien8.de>2025-01-08 10:48:03 +0100
commit40a5f6ffdfc8f8ed0d8c535dfa3733b31c66a88c (patch)
tree102d04fd9f83ceaa4b294d826983b7f9e2a69f25 /arch/x86/include/asm/amd_node.h
parent962f1970a32430ce6c75ea23cbc59d68346481fd (diff)
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
Diffstat (limited to 'arch/x86/include/asm/amd_node.h')
-rw-r--r--arch/x86/include/asm/amd_node.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/include/asm/amd_node.h b/arch/x86/include/asm/amd_node.h
index 622bd3038eeb..3f097dd479f8 100644
--- a/arch/x86/include/asm/amd_node.h
+++ b/arch/x86/include/asm/amd_node.h
@@ -23,5 +23,6 @@
#define AMD_NODE0_PCI_SLOT 0x18
struct pci_dev *amd_node_get_func(u16 node, u8 func);
+struct pci_dev *amd_node_get_root(u16 node);
#endif /*_ASM_X86_AMD_NODE_H_*/