Re: [PATCH v5 1/3] cpuid: cleanup cpuid_regs definitions

From: Borislav Petkov
Date: Thu Nov 10 2016 - 05:45:08 EST


On Wed, Nov 09, 2016 at 07:05:26PM +0800, He Chen wrote:
> make cpuid_regs more clear and avoid potential name clash.
>
> Signed-off-by: He Chen <he.chen@xxxxxxxxxxxxxxx>

Btw, please name your subjects like this:

x86/cpuid: Cleanup ...

Also the name should be a complete sentence starting with a capital
letter.

The last patch, the 3/3 should be called something like "x86/kvm: ..."
or so.

...

> @@ -31,14 +24,14 @@ void init_scattered_cpuid_features(struct cpuinfo_x86 *c)
> const struct cpuid_bit *cb;
>
> static const struct cpuid_bit cpuid_bits[] = {
> - { X86_FEATURE_INTEL_PT, CR_EBX,25, 0x00000007, 0 },
> - { X86_FEATURE_AVX512_4VNNIW, CR_EDX, 2, 0x00000007, 0 },
> - { X86_FEATURE_AVX512_4FMAPS, CR_EDX, 3, 0x00000007, 0 },
> - { X86_FEATURE_APERFMPERF, CR_ECX, 0, 0x00000006, 0 },
> - { X86_FEATURE_EPB, CR_ECX, 3, 0x00000006, 0 },
> - { X86_FEATURE_HW_PSTATE, CR_EDX, 7, 0x80000007, 0 },
> - { X86_FEATURE_CPB, CR_EDX, 9, 0x80000007, 0 },
> - { X86_FEATURE_PROC_FEEDBACK, CR_EDX,11, 0x80000007, 0 },
> + { X86_FEATURE_INTEL_PT, CPUID_EBX,25, 0x00000007, 0 },
> + { X86_FEATURE_AVX512_4VNNIW, CPUID_EDX, 2, 0x00000007, 0 },
> + { X86_FEATURE_AVX512_4FMAPS, CPUID_EDX, 3, 0x00000007, 0 },
> + { X86_FEATURE_APERFMPERF, CPUID_ECX, 0, 0x00000006, 0 },
> + { X86_FEATURE_EPB, CPUID_ECX, 3, 0x00000006, 0 },
> + { X86_FEATURE_HW_PSTATE, CPUID_EDX, 7, 0x80000007, 0 },
> + { X86_FEATURE_CPB, CPUID_EDX, 9, 0x80000007, 0 },
> + { X86_FEATURE_PROC_FEEDBACK, CPUID_EDX,11, 0x80000007, 0 },

ERROR: space required after that ',' (ctx:VxV)
#150: FILE: arch/x86/kernel/cpu/scattered.c:27:
+ { X86_FEATURE_INTEL_PT, CPUID_EBX,25, 0x00000007, 0 },
^

ERROR: space required after that ',' (ctx:VxV)
#157: FILE: arch/x86/kernel/cpu/scattered.c:34:
+ { X86_FEATURE_PROC_FEEDBACK, CPUID_EDX,11, 0x80000007, 0 },
^

--
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.