From mboxrd@z Thu Jan 1 00:00:00 1970 From: Borislav Petkov Subject: Re: [PATCH 2/5] bitops: compile time optimization for hweight_long(CONSTANT) Date: Thu, 4 Feb 2010 16:54:19 +0100 Message-ID: <20100204155419.GD32711@aftab> References: <20100201124825.cc024f2a.akpm@linux-foundation.org> <20100203133951.GA24357@localhost> <20100203070825.e36b3932.akpm@linux-foundation.org> <1265210157.24455.646.camel@laptop> <20100203074251.e2caa3f3.akpm@linux-foundation.org> <20100203181425.GB1367@aftab> <1265222875.24455.1020.camel@laptop> <4B69D362.10608@zytor.com> <20100204151050.GC32711@aftab> <1265296432.22001.18.camel@laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "H. Peter Anvin" , Andrew Morton , Wu Fengguang , LKML , Jamie Lokier , Roland Dreier , Al Viro , "linux-fsdevel@vger.kernel.org" , Ingo Molnar To: Peter Zijlstra Return-path: Received: from s15228384.onlinehome-server.info ([87.106.30.177]:52141 "EHLO mail.x86-64.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932552Ab0BDPyK (ORCPT ); Thu, 4 Feb 2010 10:54:10 -0500 Content-Disposition: inline In-Reply-To: <1265296432.22001.18.camel@laptop> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, Feb 04, 2010 at 04:13:52PM +0100, Peter Zijlstra wrote: > hweight_long() isn't an arch primitive, only __arch_hweight{8,16,32,64} > are. Yeah, I'm still looking for the proper location. hweight_long() is the generic version so do we want to do the #ifndef __HAVE_ARCH_POPCNT static inline unsigned long hweight_long(unsigned long w) ... #endif thing and define a x86-specific version? -- Regards/Gruss, Boris. -- Advanced Micro Devices, Inc. Operating Systems Research Center