Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758073AbYCNTxW (ORCPT ); Fri, 14 Mar 2008 15:53:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754391AbYCNTxK (ORCPT ); Fri, 14 Mar 2008 15:53:10 -0400 Received: from one.firstfloor.org ([213.235.205.2]:60114 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754341AbYCNTxJ (ORCPT ); Fri, 14 Mar 2008 15:53:09 -0400 Date: Fri, 14 Mar 2008 20:55:20 +0100 From: Andi Kleen To: Alexander van Heukelum Cc: Jeremy Fitzhardinge , Alexander van Heukelum , Ingo Molnar , Andi Kleen , Thomas Gleixner , "H. Peter Anvin" , LKML Subject: Re: [PATCH] x86: merge the simple bitops and move them to bitops.h Message-ID: <20080314195520.GV2522@one.firstfloor.org> References: <20080312200128.GA24983@mailshack.com> <47DABEFB.3050704@goop.org> <1205523826.7441.1242464129@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1205523826.7441.1242464129@webmail.messagingengine.com> User-Agent: Mutt/1.4.2.1i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1225 Lines: 33 The CMOV define should probably be dependent on what CPU the kernel is tuned for. It was originally written for when x86-64 was only K8 which has fast CMOV, but e.g. on P4 CMOV is actually deprecated over jumps. > Both define fls64(), but i386 uses a generic one and x86_64 defines > one all by itself. The generic one is currently not suitable for > use by 64-bit archs... that can change. It is very unlikely a generic one will ever be able to compete with a single instruction. > x86_64 defines ARCH_HAS_FAST_MULTIPLIER, i386 not. This affects a > choice of generated code in the (generic) hweight function. It would > be nice if that could move to some other file. It depends on the CPU, but it can be probably safely set on pretty much all modern x86 cores. > x86_64 has a mysterious inline function set_bit_string, which is > only used by pci-calgary_64.c and pci-gart_64.c. Not sure what to > do with it. It's generic and could really live in linux/bitops.h -Andi -- 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/