Skip to content

Commit edbe04a

Browse files
mmindbjoto
authored andcommitted
RISC-V: define the elements of the VCSR vector CSR
The VCSR CSR contains two elements VXRM[2:1] and VXSAT[0]. Define constants for those to access the elements in a readable way. Acked-by: Guo Ren <guoren@kernel.org> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Heiko Stuebner <heiko.stuebner@vrull.eu> Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> Signed-off-by: Björn Töpel <bjorn@rivosinc.com>
1 parent 1a7e62d commit edbe04a

File tree

1 file changed

+5
-0
lines changed
  • arch/riscv/include/asm

1 file changed

+5
-0
lines changed

arch/riscv/include/asm/csr.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,11 @@
215215
#define SMSTATEEN0_SSTATEEN0_SHIFT 63
216216
#define SMSTATEEN0_SSTATEEN0 (_ULL(1) << SMSTATEEN0_SSTATEEN0_SHIFT)
217217

218+
/* VCSR flags */
219+
#define VCSR_VXRM_MASK 3
220+
#define VCSR_VXRM_SHIFT 1
221+
#define VCSR_VXSAT_MASK 1
222+
218223
/* symbolic CSR names: */
219224
#define CSR_CYCLE 0xc00
220225
#define CSR_TIME 0xc01

0 commit comments

Comments
 (0)