From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id 4A74C68C1 for ; Wed, 2 Apr 2014 13:15:13 +0200 (CEST) Received: from neilslaptop.think-freely.org ([2001:470:8:a08:4a5d:60ff:fe96:79da] helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1WVJ9w-0007Vx-FE; Wed, 02 Apr 2014 07:16:47 -0400 Date: Wed, 2 Apr 2014 07:16:43 -0400 From: Neil Horman To: "H. Peter Anvin" Message-ID: <20140402111643.GB6974@neilslaptop.think-freely.org> References: <20140320163921.GC7721@hmsreliant.think-freely.org> <1395777179-4345-1-git-send-email-nhorman@tuxdriver.com> <5331EC38.2070901@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5331EC38.2070901@linux.intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -2.9 (--) X-Spam-Status: No Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v5] eal_common_cpuflags: Fix %rbx corruption, and simplify the code X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Apr 2014 11:15:13 -0000 On Tue, Mar 25, 2014 at 01:51:04PM -0700, H. Peter Anvin wrote: > On 03/25/2014 12:52 PM, Neil Horman wrote: > > Neil Horman reported that on x86-64 the upper half of %rbx would get > > clobbered when the code was compiled PIC or PIE, because the > > i386-specific code to preserve %ebx was incorrectly compiled. > > > > However, the code is really way more complex than it needs to be. For > > one thing, the CPUID instruction only needs %eax (leaf) and %ecx > > (subleaf) as parameters, and since we are testing for bits, we might > > as well list the bits explicitly. Furthermore, we can use an array > > rather than doing a switch statement inside a structure. > > > > Reported-by: Neil Horman > > Signed-off-by: H. Peter Anvin > > Signed-off-by: Neil Horman > > > > Looks good to me. > > Reviewed-by: H. Peter Anvin > > -hpa > > > Bump, did this get lost somewhere? Its been over a week and I don't see it in the tree Regards Neil