[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ed090643-09da-cde7-6edd-970d973afd4d@redhat.com>
Date: Tue, 24 Jul 2018 20:14:29 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Pu Wen <puwen@...on.cn>, tglx@...utronix.de, bp@...en8.de,
thomas.lendacky@....com, mingo@...hat.com, hpa@...or.com,
peterz@...radead.org, tony.luck@...el.com, rkrcmar@...hat.com,
boris.ostrovsky@...cle.com, jgross@...e.com, rjw@...ysocki.net,
lenb@...nel.org, viresh.kumar@...aro.org, mchehab@...nel.org,
trenn@...e.com, shuah@...nel.org, JBeulich@...e.com, x86@...nel.org
Cc: linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
kvm@...r.kernel.org, xen-devel@...ts.xenproject.org
Subject: Re: [PATCH v2 01/17] x86/cpu: create Dhyana init file and register
new cpu_dev to system
On 23/07/2018 15:20, Pu Wen wrote:
> Add x86 architecture support for new processor Hygon Dhyana Family 18h.
> Rework to create a separated file(arch/x86/kernel/cpu/hygon.c) from the
> AMD init one(arch/x86/kernel/cpu/amd.c) to initialize Dhyana CPU. In
> this way we can remove old AMD architecture support codes from Hygon
> code path and generate a clear initialization flow for Hygon processors,
> it also reduce long-term maintenance effort.
> Also add hygon.c Maintainer information in accordance.
>
> To identify Hygon processors, add a new vendor type X86_VENDOR_HYGON(9)
> for system recognition.
>
> To enable Hygon processor config, add a separated Kconfig entry(CPU_SUP_
> HYGON) for Dhyana CPU in kernel config setup.
If Hygon processors are currently the same as AMD, I don't see the point
in creating a new file just for them. Likewise for example in patch 6
+ case X86_VENDOR_HYGON:
+ ideal_nops = p6_nops;
+ return;
+
case X86_VENDOR_AMD:
if (boot_cpu_data.x86 > 0xf) {
ideal_nops = p6_nops;
Should only need to add "case X86_VENDOR_HYGON:". Or you could even
reuse X86_VENDOR_AMD.
Paolo
Powered by blists - more mailing lists