Linux Hardware Monitor development
 help / color / mirror / Atom feed
* [PATCH v5 0/8] x86/hygon: Add Family 0x18 DF node enumeration and SMN access
@ 2026-09-10  8:27 Lin Wang
  2026-09-10  8:27 ` [PATCH v5 1/8] x86/hygon: Add Family 0x18 DF node enumeration Lin Wang
                   ` (7 more replies)
  0 siblings, 8 replies; 19+ messages in thread
From: Lin Wang @ 2026-09-10  8:27 UTC (permalink / raw)
  To: Borislav Petkov, Yazen Ghannam, Mario Limonciello
  Cc: Pu Wen, Thomas Gleixner, Ingo Molnar, Dave Hansen, H. Peter Anvin,
	Tony Luck, Clemens Ladisch, Guenter Roeck, x86, linux-edac,
	linux-hwmon, linux-kernel

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@open-hieco.net/ [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


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2026-09-11  1:11 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-10  8:27 [PATCH v5 0/8] x86/hygon: Add Family 0x18 DF node enumeration and SMN access Lin Wang
2026-09-10  8:27 ` [PATCH v5 1/8] x86/hygon: Add Family 0x18 DF node enumeration Lin Wang
2026-09-10  8:32   ` sashiko-bot
2026-09-10  8:27 ` [PATCH v5 2/8] x86/hygon: Map CPU NodeIds to DF nodes Lin Wang
2026-09-10  8:32   ` sashiko-bot
2026-09-10  8:27 ` [PATCH v5 3/8] EDAC/amd64: Stop matching Hygon CPUs Lin Wang
2026-09-10  8:33   ` sashiko-bot
2026-09-10  8:27 ` [PATCH v5 4/8] RAS/AMD/ATL: Match AMD CPUs only Lin Wang
2026-09-10  8:34   ` sashiko-bot
2026-09-10  8:27 ` [PATCH v5 5/8] hwmon: (k10temp) Stop matching Hygon devices Lin Wang
2026-09-10  8:36   ` sashiko-bot
2026-09-11  0:52   ` Guenter Roeck
2026-09-11  1:10     ` Lin Wang
2026-09-10  8:27 ` [PATCH v5 6/8] x86/amd_nb: Restrict the northbridge framework to AMD CPUs Lin Wang
2026-09-10  8:37   ` sashiko-bot
2026-09-10  8:27 ` [PATCH v5 7/8] x86/amd_node: Restrict SMN setup " Lin Wang
2026-09-10  8:43   ` sashiko-bot
2026-09-10  8:27 ` [PATCH v5 8/8] x86/hygon: Add Family 0x18 SMN access Lin Wang
2026-09-10  8:38   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox