]>
git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - include/asm-powerpc/asm-compat.h
1 #ifndef _ASM_POWERPC_ASM_COMPAT_H
2 #define _ASM_POWERPC_ASM_COMPAT_H
7 # define stringify_in_c(...) __VA_ARGS__
8 # define ASM_CONST(x) x
10 /* This version of stringify will deal with commas... */
11 # define __stringify_in_c(...) #__VA_ARGS__
12 # define stringify_in_c(...) __stringify_in_c(__VA_ARGS__) " "
13 # define __ASM_CONST(x) x##UL
14 # define ASM_CONST(x) __ASM_CONST(x)
19 /* operations for longs and pointers */
20 #define PPC_LL stringify_in_c(ld)
21 #define PPC_STL stringify_in_c(std)
22 #define PPC_LCMPI stringify_in_c(cmpdi)
23 #define PPC_LONG stringify_in_c(.llong)
24 #define PPC_TLNEI stringify_in_c(tdnei)
25 #define PPC_LLARX stringify_in_c(ldarx)
26 #define PPC_STLCX stringify_in_c(stdcx.)
27 #define PPC_CNTLZL stringify_in_c(cntlzd)
31 /* operations for longs and pointers */
32 #define PPC_LL stringify_in_c(lwz)
33 #define PPC_STL stringify_in_c(stw)
34 #define PPC_LCMPI stringify_in_c(cmpwi)
35 #define PPC_LONG stringify_in_c(.long)
36 #define PPC_TLNEI stringify_in_c(twnei)
37 #define PPC_LLARX stringify_in_c(lwarx)
38 #define PPC_STLCX stringify_in_c(stwcx.)
39 #define PPC_CNTLZL stringify_in_c(cntlzw)
44 #ifdef CONFIG_IBM405_ERR77
45 /* Erratum #77 on the 405 means we need a sync or dcbt before every
46 * stwcx. The old ATOMIC_SYNC_FIX covered some but not all of this.
48 #define PPC405_ERR77(ra,rb) stringify_in_c(dcbt ra, rb;)
49 #define PPC405_ERR77_SYNC stringify_in_c(sync;)
51 #define PPC405_ERR77(ra,rb)
52 #define PPC405_ERR77_SYNC
56 #endif /* _ASM_POWERPC_ASM_COMPAT_H */