[PATCH v5 7/8] x86/amd_node: Restrict SMN setup to AMD CPUs
From: Lin Wang
Date: Thu Sep 10 2026 - 04:44:09 EST
amd_smn_init() divides host bridge roots among amd_num_nodes() entries
in PCI enumeration order. Hygon DF nodes instead share one SMN ingress
per socket, so the AMD root map cannot provide Hygon SMN access.
The preceding patches remove the Hygon matches from amd64_edac, ATL and
k10temp. Restrict AMD SMN setup and root discovery to AMD CPUs, leaving
the Hygon roots available for the Hygon node layer.
Signed-off-by: Lin Wang <wanglin@xxxxxxxxxxxxxx>
---
arch/x86/kernel/amd_node.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/amd_node.c b/arch/x86/kernel/amd_node.c
index 762585775b5a..a7190cec6995 100644
--- a/arch/x86/kernel/amd_node.c
+++ b/arch/x86/kernel/amd_node.c
@@ -229,8 +229,7 @@ static struct pci_dev *get_next_root(struct pci_dev *root)
if (root->devfn)
continue;
- if (root->vendor != PCI_VENDOR_ID_AMD &&
- root->vendor != PCI_VENDOR_ID_HYGON)
+ if (root->vendor != PCI_VENDOR_ID_AMD)
continue;
break;
@@ -253,6 +252,9 @@ static int __init amd_smn_init(void)
u16 count, num_roots, roots_per_node, node, num_nodes;
struct pci_dev *root;
+ if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD)
+ return 0;
+
if (!cpu_feature_enabled(X86_FEATURE_ZEN))
return 0;
--
2.43.0