diff mbox series

[10/19] RISC-V: define the elements of the VCSR vector CSR

Message ID 20240411-dev-charlie-support_thead_vector_6_9-v1-10-4af9815ec746@rivosinc.com (mailing list archive)
State Superseded
Headers show
Series riscv: Support vendor extensions and xtheadvector | expand

Checks

Context Check Description
conchuod/vmtest-for-next-PR fail PR summary
conchuod/patch-10-test-1 fail .github/scripts/patches/tests/build_rv32_defconfig.sh
conchuod/patch-10-test-2 fail .github/scripts/patches/tests/build_rv64_clang_allmodconfig.sh
conchuod/patch-10-test-3 success .github/scripts/patches/tests/build_rv64_gcc_allmodconfig.sh
conchuod/patch-10-test-4 success .github/scripts/patches/tests/build_rv64_nommu_k210_defconfig.sh
conchuod/patch-10-test-5 success .github/scripts/patches/tests/build_rv64_nommu_virt_defconfig.sh
conchuod/patch-10-test-6 warning .github/scripts/patches/tests/checkpatch.sh
conchuod/patch-10-test-7 success .github/scripts/patches/tests/dtb_warn_rv64.sh
conchuod/patch-10-test-8 success .github/scripts/patches/tests/header_inline.sh
conchuod/patch-10-test-9 success .github/scripts/patches/tests/kdoc.sh
conchuod/patch-10-test-10 success .github/scripts/patches/tests/module_param.sh
conchuod/patch-10-test-11 success .github/scripts/patches/tests/verify_fixes.sh
conchuod/patch-10-test-12 success .github/scripts/patches/tests/verify_signedoff.sh

Commit Message

Charlie Jenkins April 12, 2024, 4:11 a.m. UTC
From: Heiko Stuebner <heiko@sntech.de>

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>
---
 arch/riscv/include/asm/csr.h | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Conor Dooley April 12, 2024, 11:27 a.m. UTC | #1
On Thu, Apr 11, 2024 at 09:11:16PM -0700, Charlie Jenkins wrote:
> From: Heiko Stuebner <heiko@sntech.de>
> 
> 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>

You need to sign off on this as the submitter Charlie.
Charlie Jenkins April 12, 2024, 6:22 p.m. UTC | #2
On Fri, Apr 12, 2024 at 12:27:50PM +0100, Conor Dooley wrote:
> On Thu, Apr 11, 2024 at 09:11:16PM -0700, Charlie Jenkins wrote:
> > From: Heiko Stuebner <heiko@sntech.de>
> > 
> > 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>
> 
> You need to sign off on this as the submitter Charlie.

I wasn't sure, thank you!

- Charlie
diff mbox series

Patch

diff --git a/arch/riscv/include/asm/csr.h b/arch/riscv/include/asm/csr.h
index 2468c55933cd..13bc99c995d1 100644
--- a/arch/riscv/include/asm/csr.h
+++ b/arch/riscv/include/asm/csr.h
@@ -215,6 +215,11 @@ 
 #define SMSTATEEN0_SSTATEEN0_SHIFT	63
 #define SMSTATEEN0_SSTATEEN0		(_ULL(1) << SMSTATEEN0_SSTATEEN0_SHIFT)
 
+/* 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