Re: [PATCH 1/2] x86/cpu/hygon: Introduce macros for hygon family numbers
From: Ingo Molnar
Date: Tue Aug 04 2026 - 14:49:24 EST
* Guo Chaohong <guochaohong@xxxxxxxxxxxxxx> wrote:
> hi, Ingo,
>
>
> 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.
Understood - but my point is that the "HYGON_7447V" symbol name
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.
Thanks,
Ingo