Skip to content

Commit 66f1977

Browse files
mmindpalmer-dabbelt
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 <[email protected]> Reviewed-by: Conor Dooley <[email protected]> Signed-off-by: Heiko Stuebner <[email protected]> Signed-off-by: Charlie Jenkins <[email protected]> Tested-by: Yangyu Chen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 377be47 commit 66f1977

File tree

1 file changed

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

1 file changed

+4
-0
lines changed

arch/riscv/include/asm/csr.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,10 @@
314314
#define CSR_STIMECMP 0x14D
315315
#define CSR_STIMECMPH 0x15D
316316

317+
#define VCSR_VXRM_MASK 3
318+
#define VCSR_VXRM_SHIFT 1
319+
#define VCSR_VXSAT_MASK 1
320+
317321
/* Supervisor-Level Window to Indirectly Accessed Registers (AIA) */
318322
#define CSR_SISELECT 0x150
319323
#define CSR_SIREG 0x151

0 commit comments

Comments
 (0)