Re: [PATCH 1/2] x86/cpu/hygon: Introduce macros for hygon family numbers
From: Guo Chaohong
Date: Tue Aug 04 2026 - 22:38:17 EST
On 8/5/2026 9:35 AM, Guo Chaohong wrote:
On 8/5/2026 1:53 AM, Ingo Molnar wrote:
* Guo Chaohong <guochaohong@xxxxxxxxxxxxxx> wrote:
hi, Ingo,Understood - but my point is that the "HYGON_7447V" symbol name
Hygon model 7 CPUs have either 4 or 6 dies. All 6‑die variants share the
same interconnect topology.
The Hygon‑4G family includes several model numbers, not just model 7. The
3‑series CPUs are designed
for desktop/workstation use and are only available in single‑socket systems.
The following is a summary of key Hygon models:
Model Name Cores / Threads Clock Speed Target Segment Model
Number
7447V 96 / 192 ~2.6 GHz Enterprise / Cloud
Server 7
7490H 96 / 192 — High‑Density Server
7 (now 7446)
7490 64 / 128 2.7 GHz Enterprise Serve
4
7470 48 / 96 — Enterprise Server
4
Therefore, we will restrict this patch to apply only to model 7 CPUs that
have 6 dies on a multi‑socket
system and add sched domains topology after the change into commit message
in the V2 patch.
is inaccurate:
+#define HYGON_F18_M07 HFM(0x18, 7)
+
+#define HYGON_7447V HYGON_F18_M07
Note how 'HYGON_7447V' also covers 7490H/7446.
IMHO it will be less confusing if you skip the HYGON_7447V interim
symbol and just use HYGON_F18_M07 in arch_sched_node_distance(),
and add a comment that clarifies that the additional conditions
basically filter for the 7447V variant.
Or if you want a clean 7447V enumeration function, add it as
an inline function and use that in arch_sched_node_distance().
Both approaches would be acceptable.
I will remove 7447V macro from the head file, and just use HYGON_F10_M07, and add comments in arch_sched_node_distance() like this: case HYGON_F18_M07: /* * Hygon model 7 CPUs have either 4 or 6 compute dies (aka CDD). All * 6‑die variants share the same interconnect topology. Apply remote * socket distance averaging if the CPU exposes 6 dies when NPS is * enabled. */ if (topology_num_nodes_per_package() >= 6) d = slit_cluster_distance(from, to); break;
Thanks,
sorry, my email client has some issues. Re-send it:
I will remove 7447V macro from the head file, and just use HYGON_F10_M07, and add comments in arch_sched_node_distance()
like this:
case HYGON_F18_M07:
/*
* Hygon model 7 CPUs have either 4 or 6 compute dies (aka CDD). All
* 6‑die variants share the same interconnect topology. Apply remote
* socket distance averaging if the CPU exposes 6 dies when NPS is
* enabled.
*/
if (topology_num_nodes_per_package() >= 6)
d = slit_cluster_distance(from, to);
break;
Ingo