1 #ifndef _ASM_POWERPC_SYNCH_H
2 #define _ASM_POWERPC_SYNCH_H
4 #include <linux/config.h>
7 #define __SUBARCH_HAS_LWSYNC
10 #ifdef __SUBARCH_HAS_LWSYNC
11 # define LWSYNC lwsync
18 * Arguably the bitops and *xchg operations don't imply any memory barrier
19 * or SMP ordering, but in fact a lot of drivers expect them to imply
20 * both, since they do on x86 cpus.
23 #define EIEIO_ON_SMP "eieio\n"
24 #define ISYNC_ON_SMP "\n\tisync"
25 #define SYNC_ON_SMP __stringify(LWSYNC) "\n"
32 static inline void eieio(void)
34 __asm__
__volatile__ ("eieio" : : : "memory");
37 static inline void isync(void)
39 __asm__
__volatile__ ("isync" : : : "memory");
43 #define eieio_on_smp() eieio()
44 #define isync_on_smp() isync()
46 #define eieio_on_smp() __asm__ __volatile__("": : :"memory")
47 #define isync_on_smp() __asm__ __volatile__("": : :"memory")
50 #endif /* _ASM_POWERPC_SYNCH_H */