Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
[deliverable/linux.git] / include / asm-powerpc / synch.h
CommitLineData
feaf7cf1
BB
1#ifndef _ASM_POWERPC_SYNCH_H
2#define _ASM_POWERPC_SYNCH_H
88ced031 3#ifdef __KERNEL__
feaf7cf1 4
144b9c13
AB
5#include <linux/stringify.h>
6
feaf7cf1
BB
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
feaf7cf1 17#ifdef CONFIG_SMP
4f629d7d 18#define ISYNC_ON_SMP "\n\tisync\n"
144b9c13 19#define LWSYNC_ON_SMP __stringify(LWSYNC) "\n"
feaf7cf1 20#else
feaf7cf1 21#define ISYNC_ON_SMP
144b9c13 22#define LWSYNC_ON_SMP
feaf7cf1
BB
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
88ced031 35#endif /* __KERNEL__ */
feaf7cf1 36#endif /* _ASM_POWERPC_SYNCH_H */
This page took 0.210563 seconds and 5 git commands to generate.