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 * Feature section common macros
21 * Note that the entries now contain offsets between the table entry
22 * and the code rather than absolute code pointers in order to be
23 * useable with the vdso shared library. There is also an assumption
24 * that values will be negative, that is, the fixup table has to be
25 * located after the code it fixes up.
29 /* 64 bits kernel, 64 bits code */
30 #define MAKE_FTR_SECTION_ENTRY(msk, val, label, sect) \
37 .llong label##b-98b; \
40 #else /* __powerpc64__ */
41 /* 64 bits kernel, 32 bits code (ie. vdso32) */
42 #define MAKE_FTR_SECTION_ENTRY(msk, val, label, sect) \
54 #endif /* !__powerpc64__ */
55 #else /* CONFIG_PPC64 */
56 /* 32 bits kernel, 32 bits code */
57 #define MAKE_FTR_SECTION_ENTRY(msk, val, label, sect) \
67 #endif /* !CONFIG_PPC64 */
71 /* operations for longs and pointers */
72 #define PPC_LL stringify_in_c(ld)
73 #define PPC_STL stringify_in_c(std)
74 #define PPC_LCMPI stringify_in_c(cmpdi)
75 #define PPC_LONG stringify_in_c(.llong)
76 #define PPC_TLNEI stringify_in_c(tdnei)
77 #define PPC_LLARX stringify_in_c(ldarx)
78 #define PPC_STLCX stringify_in_c(stdcx.)
79 #define PPC_CNTLZL stringify_in_c(cntlzd)
83 /* operations for longs and pointers */
84 #define PPC_LL stringify_in_c(lwz)
85 #define PPC_STL stringify_in_c(stw)
86 #define PPC_LCMPI stringify_in_c(cmpwi)
87 #define PPC_LONG stringify_in_c(.long)
88 #define PPC_TLNEI stringify_in_c(twnei)
89 #define PPC_LLARX stringify_in_c(lwarx)
90 #define PPC_STLCX stringify_in_c(stwcx.)
91 #define PPC_CNTLZL stringify_in_c(cntlzw)
96 #ifdef CONFIG_IBM405_ERR77
97 /* Erratum #77 on the 405 means we need a sync or dcbt before every
98 * stwcx. The old ATOMIC_SYNC_FIX covered some but not all of this.
100 #define PPC405_ERR77(ra,rb) stringify_in_c(dcbt ra, rb;)
101 #define PPC405_ERR77_SYNC stringify_in_c(sync;)
103 #define PPC405_ERR77(ra,rb)
104 #define PPC405_ERR77_SYNC
108 #endif /* _ASM_POWERPC_ASM_COMPAT_H */