Lines Matching full:csr
14 #define gcsr_read(csr) \ argument
20 : [reg] "i" (csr) \
25 #define gcsr_write(v, csr) \ argument
31 : [reg] "i" (csr) \
36 #define gcsr_xchg(v, m, csr) \ argument
42 : [mask] "r" (m), [reg] "i" (csr) \
182 #define kvm_save_hw_gcsr(csr, gid) (csr->csrs[gid] = gcsr_read(gid)) argument
183 #define kvm_restore_hw_gcsr(csr, gid) (gcsr_write(csr->csrs[gid], gid)) argument
185 #define kvm_read_clear_hw_gcsr(csr, gid) (csr->csrs[gid] = gcsr_write(0, gid)) argument
189 static __always_inline unsigned long kvm_read_sw_gcsr(struct loongarch_csrs *csr, int gid) in kvm_read_sw_gcsr() argument
191 return csr->csrs[gid]; in kvm_read_sw_gcsr()
194 static __always_inline void kvm_write_sw_gcsr(struct loongarch_csrs *csr, int gid, unsigned long va… in kvm_write_sw_gcsr() argument
196 csr->csrs[gid] = val; in kvm_write_sw_gcsr()
199 static __always_inline void kvm_set_sw_gcsr(struct loongarch_csrs *csr, in kvm_set_sw_gcsr() argument
202 csr->csrs[gid] |= val; in kvm_set_sw_gcsr()
205 static __always_inline void kvm_change_sw_gcsr(struct loongarch_csrs *csr, in kvm_change_sw_gcsr() argument
210 csr->csrs[gid] &= ~_mask; in kvm_change_sw_gcsr()
211 csr->csrs[gid] |= val & _mask; in kvm_change_sw_gcsr()