[PATCH v5 0/8] x86/hygon: Add Family 0x18 DF node enumeration and SMN access
From: Lin Wang
Date: Thu Sep 10 2026 - 04:41:18 EST
This revision separates the Hygon node and SMN support from the AMD
northbridge and SMN implementations.
The AMD northbridge cache maps dense node numbers to fixed PCI slots.
Hygon discovers DF F3 devices by PCI ID and obtains node identity from
DF registers. Hygon PCI slots do not encode node identity, CPU NodeIds
are sparse across sockets, and SMN roots are grouped by socket. The AMD
mapping cannot represent this topology.
Sashiko reported that v3 restricted AMD northbridge and SMN
initialization while Hygon callers remained. However, amd64_edac and
ATL obtain their node count and F3/F4 devices from the AMD northbridge
cache. A failed fixed-slot F3 lookup discards the cache, so both stop at
their amd_nb_num() checks. k10temp can bind, but derives an SMN node
from the F3 PCI slot, which does not encode Hygon node identity. These
existing matches do not provide usable Hygon support.
This series therefore stops these drivers from matching Hygon before
restricting AMD northbridge and SMN initialization to AMD CPUs.
Follow-up Hygon support for these drivers will use the interfaces added
here and will be submitted separately. The Hygon MCE decoder is
unchanged.
The node and SMN implementation has been tested on a Family 0x18 Model
0x07 system with two sockets, 12 Core and DDR Dies (CDDs) and four I/O
Dies (IODs).
Changes in v5:
- Stop amd64_edac, ATL and k10temp from matching Hygon before making
AMD northbridge and SMN initialization AMD-only. (Sashiko)
- Remove the model-specific Hygon handoff from amd_smn_init(). (Boris)
- Keep the Hygon DF PCI IDs private to the node implementation. (Bjorn)
- Report the discovered DF topology after cache initialization.
Link: https://sashiko.dev/#/patchset/20260709075549.626095-1-wanglin%40open-hieco.net [Sashiko v3 review]
Link: https://lore.kernel.org/all/20260901071700.3255382-1-wanglin@xxxxxxxxxxxxxx/ [v4]
Lin Wang (8):
x86/hygon: Add Family 0x18 DF node enumeration
x86/hygon: Map CPU NodeIds to DF nodes
EDAC/amd64: Stop matching Hygon CPUs
RAS/AMD/ATL: Match AMD CPUs only
hwmon: (k10temp) Stop matching Hygon devices
x86/amd_nb: Restrict the northbridge framework to AMD CPUs
x86/amd_node: Restrict SMN setup to AMD CPUs
x86/hygon: Add Family 0x18 SMN access
MAINTAINERS | 3 +
arch/x86/Kconfig | 4 +
arch/x86/include/asm/hygon/node.h | 191 ++++++
arch/x86/kernel/Makefile | 1 +
arch/x86/kernel/amd_nb.c | 6 +-
arch/x86/kernel/amd_node.c | 6 +-
arch/x86/kernel/hygon_node.c | 980 ++++++++++++++++++++++++++++++
drivers/edac/amd64_edac.c | 4 -
drivers/hwmon/k10temp.c | 3 +-
drivers/ras/amd/atl/core.c | 9 +-
10 files changed, 1190 insertions(+), 17 deletions(-)
create mode 100644 arch/x86/include/asm/hygon/node.h
create mode 100644 arch/x86/kernel/hygon_node.c
base-commit: 50d05c7c76c96b90462f24debacca971d2e86713
--
2.43.0