Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S269212AbUINJML (ORCPT ); Tue, 14 Sep 2004 05:12:11 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S269221AbUINJML (ORCPT ); Tue, 14 Sep 2004 05:12:11 -0400 Received: from holomorphy.com ([207.189.100.168]:21394 "EHLO holomorphy.com") by vger.kernel.org with ESMTP id S269212AbUINJMF (ORCPT ); Tue, 14 Sep 2004 05:12:05 -0400 Date: Tue, 14 Sep 2004 02:10:45 -0700 From: William Lee Irwin III To: Roman Zippel Cc: Alex Zarochentsev , Hugh Dickins , Paul Jackson , Hans Reiser , linux-kernel@vger.kernel.org, Andrew Morton , Martin Schwidefsky Subject: Re: 2.6.9-rc1-mm4 sparc reiser4 build broken - undefined atomic_sub_and_test Message-ID: <20040914091045.GL9106@holomorphy.com> References: <20040913171936.GC2252@backtop.namesys.com> <20040914020614.GI9106@holomorphy.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: The Domain of Holomorphy User-Agent: Mutt/1.5.6+20040722i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1577 Lines: 36 On Mon, 13 Sep 2004, William Lee Irwin III wrote: >> sparc32 is very legacy; On Tue, Sep 14, 2004 at 11:00:50AM +0200, Roman Zippel wrote: > Sparc is not really relevant in this case, as it basically uses > atomic_sub_return() anyway, but i386 or m68k can benefit from avoiding > atomic_sub_return() if it's possible and that not only in reiserfs. The only point I had to make was that I'd rather avoid adding arch hooks for code that will never be run on the arch. I suppose for the sake of compiletesting... -- wli Add atomic_sub_and_test() to sparc32, implemented in terms of atomic_sub_return(), so reiser4 can be simultaneously microoptimized and made to pass compilation testing on sparc32. Index: mm5-2.6.9-rc1/include/asm-sparc/atomic.h =================================================================== --- mm5-2.6.9-rc1.orig/include/asm-sparc/atomic.h 2004-08-13 22:37:25.000000000 -0700 +++ mm5-2.6.9-rc1/include/asm-sparc/atomic.h 2004-09-14 01:59:51.579542880 -0700 @@ -46,6 +46,7 @@ #define atomic_inc_and_test(v) (atomic_inc_return(v) == 0) #define atomic_dec_and_test(v) (atomic_dec_return(v) == 0) +#define atomic_sub_and_test(v) (atomic_sub_return(v) == 0) /* This is the old 24-bit implementation. It's still used internally * by some sparc-specific code, notably the semaphore implementation. - 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/