From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753480AbcAUV0F (ORCPT ); Thu, 21 Jan 2016 16:26:05 -0500 Received: from terminus.zytor.com ([198.137.202.10]:59937 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751633AbcAUV0C (ORCPT ); Thu, 21 Jan 2016 16:26:02 -0500 Subject: Re: [PATCH V2] x86: use enum cpuid_leafs instead of magic numbers To: Borislav Petkov References: <1453374160-4648-1-git-send-email-huaitong.han@intel.com> <20160121114250.GD21930@pd.tnic> <56A147F9.1000306@zytor.com> <20160121212109.GK21930@pd.tnic> Cc: Huaitong Han , 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: <56A14CC2.7090607@zytor.com> Date: Thu, 21 Jan 2016 13:25:22 -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: <20160121212109.GK21930@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 13:21, Borislav Petkov wrote: > On Thu, Jan 21, 2016 at 01:04:57PM -0800, H. Peter Anvin wrote: >> 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. > > What concrete use case do you have in mind, i.e., example? > See X86_CAPABILITY in head_32.S for example. -hpa