From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail202.messagelabs.com (mail202.messagelabs.com [216.82.254.227]) by kanga.kvack.org (Postfix) with ESMTP id 8591D6B01C7 for ; Thu, 14 May 2009 10:22:19 -0400 (EDT) Date: Thu, 14 May 2009 16:27:49 +0200 From: Andi Kleen Subject: Re: [PATCH] x86: Extend test_and_set_bit() test_and_clean_bit() to 64 bits in X86_64 Message-ID: <20090514142749.GE10933@one.firstfloor.org> References: <1242202647-32446-1-git-send-email-sheng@linux.intel.com> <87zldhl7ne.fsf@basil.nowhere.org> <200905141145.05591.sheng@linux.intel.com> <20090514083250.GD19296@one.firstfloor.org> <4A0C262B.3060303@zytor.com> <20090514141649.GD10933@one.firstfloor.org> <4A0C27AA.4010006@zytor.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A0C27AA.4010006@zytor.com> Sender: owner-linux-mm@kvack.org To: "H. Peter Anvin" Cc: Andi Kleen , Sheng Yang , linux-kernel@vger.kernel.org, linux-mm , Ingo Molnar List-ID: On Thu, May 14, 2009 at 07:16:10AM -0700, H. Peter Anvin wrote: > Andi Kleen wrote: > >>> > >> The right way to do it is to pass the proper type of register. > > > > For the input index register you don't actually need 64bit and for the > > value it's typically memory anyways. > > > > If you have a 64-bit operation you have a 64-bit index register. And > you need a 64-bit index for it to handle over 2^31 (since it is signed.) Pretty much all the bit ops and a few other operations currently have 2/4GB limits on x86-64. I don't think that's going to change. In the kernel nothing is ever that big continuously anyways. -Andi -- ak@linux.intel.com -- Speaking for myself only. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org