The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 1/2] x86/cpu/hygon: Introduce macros for hygon family numbers
@ 2026-08-03  5:12 Chaohong Guo
  2026-08-03  5:12 ` [PATCH 2/2] sched/numa: Apply remote socket distance averaging for Hygon 7447V Chaohong Guo
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Chaohong Guo @ 2026-08-03  5:12 UTC (permalink / raw)
  To: peterz, tim.c.chen, bp; +Cc: x86, linux-kernel

Consolidate all magic numbers of hygon CPUs into a header file,
The macros describe the family/model numbers of hygon CPUs.

Signed-off-by: Chaohong Guo <guochaohong@open-hieco.net>
Co-developed-by: Zhiquan Li <lizhiquan@open-hieco.net>
Signed-off-by: Zhiquan Li <lizhiquan@open-hieco.net>
---
 arch/x86/include/asm/cpu_device_id.h   |  2 ++
 arch/x86/include/asm/processor-hygon.h | 20 ++++++++++++++++++++
 2 files changed, 22 insertions(+)
 create mode 100644 arch/x86/include/asm/processor-hygon.h

diff --git a/arch/x86/include/asm/cpu_device_id.h b/arch/x86/include/asm/cpu_device_id.h
index c62d8fae52c3..447837d15f87 100644
--- a/arch/x86/include/asm/cpu_device_id.h
+++ b/arch/x86/include/asm/cpu_device_id.h
@@ -44,6 +44,8 @@
 #include <asm/intel-family.h>
 /* And the X86_VENDOR_* ones */
 #include <asm/processor.h>
+/* Hygon HFM model defines */
+#include <asm/processor-hygon.h>
 
 /* Centaur FAM6 models */
 #define X86_CENTAUR_FAM6_C7_A		0xa
diff --git a/arch/x86/include/asm/processor-hygon.h b/arch/x86/include/asm/processor-hygon.h
new file mode 100644
index 000000000000..08150e3ea379
--- /dev/null
+++ b/arch/x86/include/asm/processor-hygon.h
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * The helpers to support Hygon CPU specific code path.
+ */
+
+#ifndef _ASM_X86_PROCESSOR_HYGON_H
+#define _ASM_X86_PROCESSOR_HYGON_H
+
+#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)
+
+
+#define	HYGON_7447V		HYGON_F18_M07
+
+#endif /*  _ASM_X86_PROCESSOR_HYGON_H */
-- 
2.18.2


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

end of thread, other threads:[~2026-08-05  2:33 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-03  5:12 [PATCH 1/2] x86/cpu/hygon: Introduce macros for hygon family numbers Chaohong Guo
2026-08-03  5:12 ` [PATCH 2/2] sched/numa: Apply remote socket distance averaging for Hygon 7447V Chaohong Guo
2026-08-03  6:10   ` Ingo Molnar
2026-08-03  6:10 ` [PATCH 1/2] x86/cpu/hygon: Introduce macros for hygon family numbers Peter Zijlstra
2026-08-03  6:25   ` Borislav Petkov
2026-08-04  2:57   ` Guo Chaohong
2026-08-04 17:55     ` Ingo Molnar
2026-08-03  6:30 ` Ingo Molnar
2026-08-04  3:11   ` Guo Chaohong
2026-08-04 17:53     ` Ingo Molnar
2026-08-05  1:35       ` Guo Chaohong
2026-08-05  2:33         ` Guo Chaohong

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