From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2AAFDDE060 for ; Thu, 22 May 2008 06:16:49 +1000 (EST) In-Reply-To: <20080521141231.GD8897@wotan.suse.de> References: <20080521141056.GC8897@wotan.suse.de> <20080521141231.GD8897@wotan.suse.de> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <376f1f8b20b4be2a5f1e57afbf245add@kernel.crashing.org> From: Segher Boessenkool Subject: Re: [patch 2/2] powerpc: optimise smp_wmb Date: Wed, 21 May 2008 22:16:31 +0200 To: Nick Piggin Cc: linuxppc-dev@ozlabs.org, paulus@samba.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , > +#ifdef __SUBARCH_HAS_LWSYNC > +# define SMPWMB lwsync > +#else > +# define SMPWMB eieio > +#endif > + > #define smp_mb() mb() > #define smp_rmb() rmb() > -#define smp_wmb() eieio() > +#define smp_wmb() __asm__ __volatile__ (__stringify(SMPWMB) : : > :"memory") SMPWMB is used only here. Why not just #ifdef __SUBARCH_HAS_LWSYNC #define smp_wmb() lwsync() #else #define smp_wmb() eieio() #endif ? Segher