[PATCH v6 0/8] x86/hygon: Add Family 0x18 DF node enumeration and SMN access

From: Lin Wang

Date: Mon Sep 21 2026 - 01:56:34 EST


This series separates the Hygon node and SMN support from the AMD
northbridge and SMN implementations.

The AMD northbridge cache previously discovered Hygon F3 devices by PCI
ID. It now derives the node count from CPU topology and locates DF
functions at fixed PCI slots, removing the Hygon PCI-ID discovery path.
Hygon instead requires F3 discovery by PCI ID and reads node identity
from DF registers. Its PCI slots do not encode node identity, CPU
NodeIds are sparse across sockets, and SMN roots are grouped by socket.

The AMD mapping therefore cannot represent the Hygon topology. The
northbridge cache is discarded before amd64_edac can probe a memory
controller or ATL can register address translation support. k10temp
does not use that cache, but derives an SMN node from the F3 PCI slot
and therefore cannot identify a valid Hygon SMN target. These matches
do not provide usable Hygon support.

The series 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 v6:

- Update the k10temp documentation after removing the Hygon match.
(Sashiko, Guenter)
- Follow tip-tree comment, declaration and whitespace conventions.
(Boris)
- Build and validate the DF cache before publishing it.
- Use the SMN root array directly as the setup state.

Link: https://lore.kernel.org/20260916155956.GBaqq8_BsuLkBKp-Ia@fat_crate.local # v5 review
Link: https://lore.kernel.org/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

Documentation/hwmon/k10temp.rst | 8 +-
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 | 910 ++++++++++++++++++++++++++++++
drivers/edac/amd64_edac.c | 4 -
drivers/hwmon/k10temp.c | 5 +-
drivers/ras/amd/atl/core.c | 9 +-
11 files changed, 1124 insertions(+), 23 deletions(-)
create mode 100644 arch/x86/include/asm/hygon/node.h
create mode 100644 arch/x86/kernel/hygon_node.c

base-commit: 518e5b794c06c0f0eb40df3e202274a66202c137
--
2.43.0