From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CF32630E0C0 for ; Mon, 3 Aug 2026 06:10:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785737437; cv=none; b=loJkgOmMGL6AxPuO0ltBpLu4hRYFhefHWEaCgDgG3IR6JerbFLl5bKphCg82qPzmt2qqyuYplVQ4lnLulGIyIbbz9gSdqC3Jnfmw6T4UPeba+7c1E+5QFznmZJRyKldlGaKcc9dyM5IKv7nXVbbx7bs1w5AvD19vxcOKw+TOf3U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785737437; c=relaxed/simple; bh=JVmWKG3VoAx9niBSrIcQqFs6eeV6OGRg7a4aSLoKED8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=uGWJIChdOrApGzHOGC6ua2evbZLvVt67LnDjwe+/dui+3VKm33RRhEzAelbrnOL9QnQFeOD/kvWaiQx9c2noo0gyz+evSS14E78PBAukBI0S3GfYMyG2d4DM8eLNmYqWDDHnkx5dbJdhvTk4U79dx9gAdsTo0CvAK8e24UXpD9s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=pass smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=fclQtFAy; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="fclQtFAy" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=sPxoNXFJfR1NW34t6MHhHtKdZymbYzdE50nqr/hdpTM=; b=fclQtFAy3AfbRbKrGTwHlk+HBn Py/GO3FTqwwdQsi5ygRxNlUCshJV39DYnl0nrQ1YwN0qc2Rtq41sCVDvmtJJA82LX/yVkzBCYebQ9 eTqgHSeiaU2OiYoAgNtxYpreZ5qfbaO607H17mCLDed8b/LUkOp3aA+KYTCPgiywsGXaVyx+oriKm 3akz13etFIX1kHNwQkHwF45k5G7IifYULuSx7545Ma7tHX0Z4l3RIFU2qAuF0d0P6WfjNVDCHohxv OmIC9W5Ntmu2/3X3v9F5OvnncMRs4gOjKgnU3bjCHg+64TlQmF4fzBHRs1pweQV4Qa7tcl7f7QfZS c6mnOFFg==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.99.1 #2 (Red Hat Linux)) id 1wqlsV-00000006F3S-2Q5T; Mon, 03 Aug 2026 06:10:23 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 3ED4830063F; Mon, 03 Aug 2026 08:10:22 +0200 (CEST) Date: Mon, 3 Aug 2026 08:10:22 +0200 From: Peter Zijlstra To: Chaohong Guo 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 Message-ID: <20260803061022.GS49951@noisy.programming.kicks-ass.net> References: <20260803051248.3684453-1-guochaohong@open-hieco.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 > Co-developed-by: Zhiquan Li > Signed-off-by: Zhiquan Li > --- > 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 > /* And the X86_VENDOR_* ones */ > #include > +/* Hygon HFM model defines */ > +#include 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 > + > +#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 >