Committer: Michael Beasley <mike@snafu.setup>
[mikesnafu-overlay.git] / include / asm-powerpc / synch.h
blob2cda3c38a9fa10afa8816eaaea6197e78ff64b51
1 #ifndef _ASM_POWERPC_SYNCH_H
2 #define _ASM_POWERPC_SYNCH_H
3 #ifdef __KERNEL__
5 #include <linux/stringify.h>
7 #ifdef __powerpc64__
8 #define __SUBARCH_HAS_LWSYNC
9 #endif
11 #ifdef __SUBARCH_HAS_LWSYNC
12 # define LWSYNC lwsync
13 #else
14 # define LWSYNC sync
15 #endif
17 #ifdef CONFIG_SMP
18 #define ISYNC_ON_SMP "\n\tisync\n"
19 #define LWSYNC_ON_SMP __stringify(LWSYNC) "\n"
20 #else
21 #define ISYNC_ON_SMP
22 #define LWSYNC_ON_SMP
23 #endif
25 static inline void eieio(void)
27 __asm__ __volatile__ ("eieio" : : : "memory");
30 static inline void isync(void)
32 __asm__ __volatile__ ("isync" : : : "memory");
35 #endif /* __KERNEL__ */
36 #endif /* _ASM_POWERPC_SYNCH_H */