From: Peter Zijlstra <peterz@infradead.org>
To: Chaohong Guo <guochaohong@open-hieco.net>
Cc: tim.c.chen@linux.intel.com, bp@alien8.de, x86@kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] x86/cpu/hygon: Introduce macros for hygon family numbers
Date: Mon, 3 Aug 2026 08:10:22 +0200 [thread overview]
Message-ID: <20260803061022.GS49951@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20260803051248.3684453-1-guochaohong@open-hieco.net>
On Mon, Aug 03, 2026 at 01:12:47PM +0800, Chaohong Guo wrote:
> 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>
I'll take these, but Boris, should I rename this to hygon-family.h to
match intel-family.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
>
next prev parent reply other threads:[~2026-08-03 6:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Peter Zijlstra [this message]
2026-08-03 6:25 ` [PATCH 1/2] x86/cpu/hygon: Introduce macros for hygon family numbers 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260803061022.GS49951@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bp@alien8.de \
--cc=guochaohong@open-hieco.net \
--cc=linux-kernel@vger.kernel.org \
--cc=tim.c.chen@linux.intel.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox