Re: [PATCH V2] x86: use enum cpuid_leafs instead of magic numbers
From: H. Peter Anvin
Date: Thu Jan 21 2016 - 16:05:46 EST
On 01/21/16 03:42, Borislav Petkov wrote:
> On Thu, Jan 21, 2016 at 07:02:40PM +0800, Huaitong Han wrote:
>> v2:add a commit message.
>> Most of magic numbers of x86_capability have been converted to enum
>> cpuid_leafs, and this patch does update the remaining part.
>> Signed-off-by: Huaitong Han <huaitong.han@xxxxxxxxx>
>> arch/x86/include/asm/elf.h | 2 +-
>> arch/x86/kernel/mpparse.c | 2 +-
>> arch/x86/lguest/boot.c | 2 +-
>> arch/x86/xen/enlighten.c | 2 +-
>> 4 files changed, 4 insertions(+), 4 deletions(-)
I'm wondering, though, if it wouldn't be better to turn these into
macros so that they can be used in assembly code. That way the
definitions can be interspersed with the X86_FEATURE_ definitions, too.