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

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to