1#ifndef _ASM_POWERPC_SYNCH_H 2#define _ASM_POWERPC_SYNCH_H 3#ifdef __KERNEL__ 4 5#include <linux/stringify.h> 6 7#ifdef __powerpc64__ 8#define __SUBARCH_HAS_LWSYNC 9#endif 10 11#ifdef __SUBARCH_HAS_LWSYNC 12# define LWSYNC lwsync 13#else 14# define LWSYNC sync 15#endif 16 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 24 25static inline void eieio(void) 26{ 27 __asm__ __volatile__ ("eieio" : : : "memory"); 28} 29 30static inline void isync(void) 31{ 32 __asm__ __volatile__ ("isync" : : : "memory"); 33} 34 35#endif /* __KERNEL__ */ 36#endif /* _ASM_POWERPC_SYNCH_H */ 37