Lines Matching refs:off
37 #define CSR_XR(base, off) \
38 (*(volatile uint64_t *)((base) + ((off))))
40 #define CSRA_XR(base, off, index) \
41 (*(volatile uint64_t *)((base) + ((off) + ((index) * 8))))
43 #define CSR_XS(base, off, val) \
44 ((*(volatile uint64_t *)((base) + ((off)))) = (val))
46 #define CSRA_XS(base, off, index, val) \
47 ((*(volatile uint64_t *)((base) + ((off) + ((index) * 8)))) = (val))
50 #define CSR_FR(base, off, bit) \
51 (((*(volatile uint64_t *) ((base) + ((off)))) >> \
52 (off ## _ ## bit)) & (off ## _ ## bit ## _MASK))
54 #define CSRA_FR(base, off, index, bit) \
55 (((*(volatile uint64_t *) ((base) + ((off) + ((index) * 8)))) >> \
56 (off ## _ ## bit)) & (off ## _ ## bit ## _MASK))
58 #define CSR_FS(base, off, bit, val) \
59 ((*(volatile uint64_t *) ((base) + ((off)))) = \
60 (((*(volatile uint64_t *) ((base) + ((off)))) & \
61 ~(((uint64_t)(off ## _ ## bit ## _MASK)) << \
62 (off ## _ ## bit))) | (((uint64_t)(val)) << (off ## _ ## bit))))
64 #define CSRA_FS(base, off, index, bit, val) \
65 ((*(volatile uint64_t *) ((base) + ((off) + ((index) * 8)))) = \
66 (((*(volatile uint64_t *) ((base) + ((off) + ((index) * 8)))) & \
67 ~(((uint64_t)(off ## _ ## bit ## _MASK)) << \
68 (off ## _ ## bit))) | (((uint64_t)(val)) << (off ## _ ## bit))))
70 #define CSR_FC(base, off, bit) \
71 ((*(volatile uint64_t *) ((base) + ((off)))) = \
72 ((*(volatile uint64_t *)((base) + ((off)))) & \
73 ~(((uint64_t)(off ## _ ## bit ## _MASK)) << (off ## _ ## bit))))
75 #define CSRA_FC(base, off, index, bit) \
76 ((*(volatile uint64_t *) ((base) + ((off) + ((index) * 8)))) = \
77 ((*(volatile uint64_t *)((base) + ((off) + ((index) * 8)))) & \
78 ~(((uint64_t)(off ## _ ## bit ## _MASK)) << (off ## _ ## bit))))
81 #define CSR_BR(base, off, bit) \
82 (((*(volatile uint64_t *)((base) + ((off)))) >> \
83 (off ## _ ## bit)) & 0x1)
85 #define CSRA_BR(base, off, index, bit) \
86 (((*(volatile uint64_t *)((base) + ((off) + ((index) * 8)))) >> \
87 (off ## _ ## bit)) & 0x1)
89 #define CSR_BS(base, off, bit) \
90 ((*(volatile uint64_t *)((base) + ((off)))) = \
91 ((*(volatile uint64_t *)((base) + ((off)))) | \
92 (1ull<<(off ## _ ## bit))))
94 #define CSRA_BS(base, off, index, bit) \
95 ((*(volatile uint64_t *)((base) + ((off) + ((index) * 8)))) = \
96 ((*(volatile uint64_t *)((base) + ((off) + ((index) * 8)))) | \
97 (1ull<<(off ## _ ## bit))))
99 #define CSR_BC(base, off, bit) \
100 ((*(volatile uint64_t *)((base) + ((off)))) = \
101 ((*(volatile uint64_t *)((base) + ((off)))) & \
102 ~(1ull<<(off ## _ ## bit))))
104 #define CSRA_BC(base, off, index, bit) \
105 ((*(volatile uint64_t *)((base) + ((off) + ((index) * 8)))) = \
106 ((*(volatile uint64_t *)((base) + ((off) + ((index) * 8)))) & \
107 ~(1ull<<(off ## _ ## bit))))