]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
RISC-V: define the elements of the VCSR vector CSR
authorHeiko Stuebner <heiko@sntech.de>
Thu, 14 Nov 2024 02:21:12 +0000 (18:21 -0800)
committerPalmer Dabbelt <palmer@rivosinc.com>
Sat, 18 Jan 2025 20:33:30 +0000 (12:33 -0800)
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>
Tested-by: Yangyu Chen <cyy@cyyself.name>
Link: https://lore.kernel.org/r/20241113-xtheadvector-v11-6-236c22791ef9@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/asm/csr.h

index fe5d4eb9adea1d4e3065a4d6e2ff361a52aecc44..db1d26dfaef909a70a4b609768fa7827aa1b512e 100644 (file)
 #define CSR_STIMECMP           0x14D
 #define CSR_STIMECMPH          0x15D
 
+#define VCSR_VXRM_MASK                 3
+#define VCSR_VXRM_SHIFT                        1
+#define VCSR_VXSAT_MASK                        1
+
 /* Supervisor-Level Window to Indirectly Accessed Registers (AIA) */
 #define CSR_SISELECT           0x150
 #define CSR_SIREG              0x151