From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753186AbcAUVFo (ORCPT ); Thu, 21 Jan 2016 16:05:44 -0500 Received: from terminus.zytor.com ([198.137.202.10]:59611 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751162AbcAUVFk (ORCPT ); Thu, 21 Jan 2016 16:05:40 -0500 Subject: Re: [PATCH V2] x86: use enum cpuid_leafs instead of magic numbers To: Borislav Petkov , Huaitong Han References: <1453374160-4648-1-git-send-email-huaitong.han@intel.com> <20160121114250.GD21930@pd.tnic> Cc: tglx@linutronix.de, mingo@redhat.com, david.vrabel@citrix.com, rusty@rustcorp.com.au, x86@kernel.org, linux-kernel@vger.kernel.org From: "H. Peter Anvin" Message-ID: <56A147F9.1000306@zytor.com> Date: Thu, 21 Jan 2016 13:04:57 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <20160121114250.GD21930@pd.tnic> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >> --- >> 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. -hpa