[patch 2/2] powerpc: optimise smp_wmb
Segher Boessenkool
segher at kernel.crashing.org
Thu May 22 06:16:31 EST 2008
> +#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
More information about the Linuxppc-dev
mailing list