RISC-V: define the elements of the VCSR vector CSR

A patch from »RISC-V: T-Head vector handling« in state Obsolete for linux-kernel

From: Heiko Stuebner <heiko.stuebner@...> Date: Fri, 24 Feb 2023 14:20:17 +0100

Commit-Message

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@...> Reviewed-by: Conor Dooley <conor.dooley@...> Signed-off-by: Heiko Stuebner <heiko.stuebner@...>

Patch-Comment

arch/riscv/include/asm/csr.h | 5 +++++ 1 file changed, 5 insertions(+)

Statistics

  • 5 lines added
  • 0 lines removed

Changes

------------------------- arch/riscv/include/asm/csr.h -------------------------
index b98b3b6c9da2..2d79bca6ffe8 100644
@@ -199,6 +199,11 @@
#define ENVCFG_CBIE_INV _AC(0x3, UL)
#define ENVCFG_FIOM _AC(0x1, UL)
+/* VCSR flags */
+#define VCSR_VXRM_MASK 3
+#define VCSR_VXRM_SHIFT 1
+#define VCSR_VXSAT_MASK 1
+
/* symbolic CSR names: */
#define CSR_CYCLE 0xc00
#define CSR_TIME 0xc01
 
 

Recent Patches

About Us

Sed lacus. Donec lectus. Nullam pretium nibh ut turpis. Nam bibendum. In nulla tortor, elementum vel, tempor at, varius non, purus. Mauris vitae nisl nec metus placerat consectetuer.

Read More...