synch.h 678 字节
Newer Older
1 2
#ifndef _ASM_POWERPC_SYNCH_H 
#define _ASM_POWERPC_SYNCH_H 
3
#ifdef __KERNEL__
4

5 6
#include <linux/stringify.h>

7
#if defined(__powerpc64__) || defined(CONFIG_PPC_E500MC)
8 9 10 11 12 13 14 15 16 17
#define __SUBARCH_HAS_LWSYNC
#endif

#ifdef __SUBARCH_HAS_LWSYNC
#    define LWSYNC	lwsync
#else
#    define LWSYNC	sync
#endif

#ifdef CONFIG_SMP
18
#define ISYNC_ON_SMP	"\n\tisync\n"
19
#define LWSYNC_ON_SMP	__stringify(LWSYNC) "\n"
20 21
#else
#define ISYNC_ON_SMP
22
#define LWSYNC_ON_SMP
23 24 25 26 27 28 29 30 31 32 33 34
#endif

static inline void eieio(void)
{
	__asm__ __volatile__ ("eieio" : : : "memory");
}

static inline void isync(void)
{
	__asm__ __volatile__ ("isync" : : : "memory");
}

35
#endif /* __KERNEL__ */
36
#endif	/* _ASM_POWERPC_SYNCH_H */