Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758509Ab0BNMX5 (ORCPT ); Sun, 14 Feb 2010 07:23:57 -0500 Received: from casper.infradead.org ([85.118.1.10]:55020 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752793Ab0BNMX4 (ORCPT ); Sun, 14 Feb 2010 07:23:56 -0500 Subject: Re: [PATCH 2/5] bitops: compile time optimization for hweight_long(CONSTANT) From: Peter Zijlstra To: Borislav Petkov Cc: Borislav Petkov , "H. Peter Anvin" , Andrew Morton , Wu Fengguang , LKML , Jamie Lokier , Roland Dreier , Al Viro , "linux-fsdevel@vger.kernel.org" , Ingo Molnar , Brian Gerst In-Reply-To: <20100214112447.GA8353@liondog.tnic> References: <1265299457.22001.72.camel@laptop> <20100205121139.GA9044@aftab> <4B6C93A2.1090302@zytor.com> <20100206093659.GA28326@aftab> <4B6E1DA3.50204@zytor.com> <20100208092845.GB12618@a1.tnic> <4B6FDAED.9060204@zytor.com> <20100208095945.GA14740@a1.tnic> <20100211172424.GB19779@aftab> <1266142343.5273.419.camel@laptop> <20100214112447.GA8353@liondog.tnic> Content-Type: text/plain; charset="UTF-8" Date: Sun, 14 Feb 2010 13:23:35 +0100 Message-ID: <1266150215.5273.601.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.2 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 853 Lines: 19 On Sun, 2010-02-14 at 12:24 +0100, Borislav Petkov wrote: > > So, if I understand you correctly, your suggestion might work, we > simply need to rename the lib/hweight.c versions to __sw_hweightN > and have have __arch_hweightN -> > __sw_hweightN wrappers in the default case, all arches which have an > optimized version will provide it in their respective bitops header... > I'm not quite sure what the last 'it' refers to, does that refer to: 1) an __arch_hweightN() implementation, or 2) __arch_hweightN() -> __sw_hweightN() wrappers ? If you meant 1, then yes. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/