Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964897AbVLUWn7 (ORCPT ); Wed, 21 Dec 2005 17:43:59 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S964868AbVLUWn7 (ORCPT ); Wed, 21 Dec 2005 17:43:59 -0500 Received: from relais.videotron.ca ([24.201.245.36]:30154 "EHLO relais.videotron.ca") by vger.kernel.org with ESMTP id S964897AbVLUWn5 (ORCPT ); Wed, 21 Dec 2005 17:43:57 -0500 Date: Wed, 21 Dec 2005 17:43:56 -0500 (EST) From: Nicolas Pitre Subject: [patch 1/3] mutex subsystem: fix additions to the ARM atomic.h In-reply-to: <20051221155411.GA7243@elte.hu> X-X-Sender: nico@localhost.localdomain To: Ingo Molnar Cc: Linus Torvalds , lkml , Andrew Morton , Arjan van de Ven , Jes Sorensen , Zwane Mwaikambo , Oleg Nesterov , David Howells , Alan Cox , Benjamin LaHaise , Steven Rostedt , Christoph Hellwig , Andi Kleen , Russell King Message-id: MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII Content-transfer-encoding: 7BIT References: <20051221155411.GA7243@elte.hu> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1952 Lines: 58 The original patch added new definitions to include/asm-arm/atomic.h inside the #if __LINUX_ARM_ARCH__ >= 6 and therefore they were unavailable on non ARMv6 builds. Move them outside that #if. Signed-off-by: Nicolas Pitre --- Index: linux-2.6/include/asm-arm/atomic.h =================================================================== --- linux-2.6.orig/include/asm-arm/atomic.h +++ linux-2.6/include/asm-arm/atomic.h @@ -99,19 +99,6 @@ static inline int atomic_cmpxchg(atomic_ return oldval; } -#define atomic_xchg(v, new) (xchg(&((v)->counter), new)) - -/* - * Pull in the generic wrappers for atomic_dec_call_if_negative() and - * atomic_inc_call_if_nonpositive(). - * - * TODO: implement optimized primitives instead, or leave the generic - * implementation in place, or use the ARCH_IMPLEMENTS_MUTEX_FASTPATH - * mechanism to override the generic mutex_lock()/mutex_unlock() - * functions. - */ -#include - static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr) { unsigned long tmp, tmp2; @@ -188,6 +175,19 @@ static inline void atomic_clear_mask(uns #endif /* __LINUX_ARM_ARCH__ */ +#define atomic_xchg(v, new) (xchg(&((v)->counter), new)) + +/* + * Pull in the generic wrappers for atomic_dec_call_if_negative() and + * atomic_inc_call_if_nonpositive(). + * + * TODO: implement optimized primitives instead, or leave the generic + * implementation in place, or use the ARCH_IMPLEMENTS_MUTEX_FASTPATH + * mechanism to override the generic mutex_lock()/mutex_unlock() + * functions. + */ +#include + static inline int atomic_add_unless(atomic_t *v, int a, int u) { int c, old; - 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/