Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S269229AbUINJRX (ORCPT ); Tue, 14 Sep 2004 05:17:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S269227AbUINJRX (ORCPT ); Tue, 14 Sep 2004 05:17:23 -0400 Received: from holomorphy.com ([207.189.100.168]:24722 "EHLO holomorphy.com") by vger.kernel.org with ESMTP id S269236AbUINJQR (ORCPT ); Tue, 14 Sep 2004 05:16:17 -0400 Date: Tue, 14 Sep 2004 02:15:05 -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: [sparc32] add atomic_sub_and_test() to make reiser4 code microoptimized for x86 compile on sparc32 Message-ID: <20040914091505.GM9106@holomorphy.com> References: <20040913171936.GC2252@backtop.namesys.com> <20040914020614.GI9106@holomorphy.com> <20040914091045.GL9106@holomorphy.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040914091045.GL9106@holomorphy.com> 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: 1385 Lines: 32 On Tue, Sep 14, 2004 at 02:10:45AM -0700, William Lee Irwin III wrote: > 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... Repost with appropriate Subject: line (I'm trying to cut down on these). -- wli Add atomic_sub_and_test() to sparc32, implemented in terms of atomic_sub_return(), so reiser4 can be simultaneously microoptimized for x86 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/