Re: [PATCH v2 1/2] x86/cpu/hygon: Introduce macros for hygon family numbers
From: Guo Chaohong
Date: Thu Aug 06 2026 - 04:57:43 EST
I apologize for forgetting the error you pointed out in your previous review. I will correct it,
diff --git a/arch/x86/include/asm/hygon-family.h b/arch/x86/include/asm/hygon-family.h
new file mode 100644
index 000000000000..68e5af310980
--- /dev/null
+++ b/arch/x86/include/asm/hygon-family.h
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _ASM_X86_HYGON_FAMILY_H
+#define _ASM_X86_HYGON_FAMILY_H
+
+/*
+ * The helpers to support Hygon CPU specific code path.
+ */
+
+#include <asm/processor.h>
+
+#define HFM(_family, _model) VFM_MAKE(X86_VENDOR_HYGON, _family, _model)
+
+#define HYGON_F18_M04 HFM(0x18, 4)
+#define HYGON_F18_M06 HFM(0x18, 6)
+#define HYGON_F18_M07 HFM(0x18, 7)
+
+#endif /* _ASM_X86_HYGON_FAMILY_H */
thanks,
-Chaohong
On 8/6/2026 4:22 PM, Ingo Molnar wrote:
* Chaohong Guo <guochaohong@xxxxxxxxxxxxxx> wrote:
--- /dev/null
+++ b/arch/x86/include/asm/hygon-family.h
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * The helpers to support Hygon CPU specific code path.
+ */
+
+#ifndef _ASM_X86_HYGON_FAMILY_H
+#define _ASM_X86_HYGON_FAMILY_H
Why is the header guard ordering different from <asm/intel-family.h>:
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_X86_INTEL_FAMILY_H
#define _ASM_X86_INTEL_FAMILY_H
/*
* "Big Core" Processors (Branded as Core, Xeon, etc...)
*
Please follow the standard header guard ordering in
<asm/hygon-family.h> as well.
Thanks,
Ingo