1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __PARISC_SPECIAL_INSNS_H
3 #define __PARISC_SPECIAL_INSNS_H
7 __asm__ __volatile__( \
17 #define lpa_user(va) ({ \
19 __asm__ __volatile__( \
21 "lpa %%r0(%%sr3,%1),%0" \
29 #define mfctl(reg) ({ \
31 __asm__ __volatile__( \
32 "mfctl " #reg ",%0" : \
38 #define mtctl(gr, cr) \
39 __asm__ __volatile__("mtctl %0,%1" \
41 : "r" (gr), "i" (cr) : "memory")
43 /* these are here to de-mystefy the calling code, and to provide hooks */
44 /* which I needed for debugging EIEM problems -PB */
45 #define get_eiem() mfctl(15)
46 static inline void set_eiem(unsigned long val
)
51 #define mfsp(reg) ({ \
53 __asm__ __volatile__( \
54 "mfsp " #reg ",%0" : \
60 #define mtsp(val, cr) \
61 { if (__builtin_constant_p(val) && ((val) == 0)) \
62 __asm__ __volatile__("mtsp %%r0,%0" : : "i" (cr) : "memory"); \
64 __asm__ __volatile__("mtsp %0,%1" \
66 : "r" (val), "i" (cr) : "memory"); }
68 #endif /* __PARISC_SPECIAL_INSNS_H */