Blame view

include/asm-powerpc/synch.h 642 Bytes
feaf7cf15   Becky Bruce   [PATCH] powerpc: ...
1
2
  #ifndef _ASM_POWERPC_SYNCH_H 
  #define _ASM_POWERPC_SYNCH_H 
88ced0314   Arnd Bergmann   [PATCH] powerpc: ...
3
  #ifdef __KERNEL__
feaf7cf15   Becky Bruce   [PATCH] powerpc: ...
4

144b9c135   Anton Blanchard   [PATCH] powerpc: ...
5
  #include <linux/stringify.h>
feaf7cf15   Becky Bruce   [PATCH] powerpc: ...
6
7
8
9
10
11
12
13
14
  #ifdef __powerpc64__
  #define __SUBARCH_HAS_LWSYNC
  #endif
  
  #ifdef __SUBARCH_HAS_LWSYNC
  #    define LWSYNC	lwsync
  #else
  #    define LWSYNC	sync
  #endif
feaf7cf15   Becky Bruce   [PATCH] powerpc: ...
15
  #ifdef CONFIG_SMP
4f629d7db   Nick Piggin   [PATCH] powerpc: ...
16
17
18
  #define ISYNC_ON_SMP	"
  \tisync
  "
144b9c135   Anton Blanchard   [PATCH] powerpc: ...
19
20
  #define LWSYNC_ON_SMP	__stringify(LWSYNC) "
  "
feaf7cf15   Becky Bruce   [PATCH] powerpc: ...
21
  #else
feaf7cf15   Becky Bruce   [PATCH] powerpc: ...
22
  #define ISYNC_ON_SMP
144b9c135   Anton Blanchard   [PATCH] powerpc: ...
23
  #define LWSYNC_ON_SMP
feaf7cf15   Becky Bruce   [PATCH] powerpc: ...
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");
  }
88ced0314   Arnd Bergmann   [PATCH] powerpc: ...
35
  #endif /* __KERNEL__ */
feaf7cf15   Becky Bruce   [PATCH] powerpc: ...
36
  #endif	/* _ASM_POWERPC_SYNCH_H */