From 056fe6f85dc6b68783f56cb6ea7394e857ab8cc3 Mon Sep 17 00:00:00 2001 From: Yong-Xuan Wang Date: Tue, 12 Dec 2023 08:58:33 +0000 Subject: lib: sbi: Refactor the code for enable extensions in menvfg CSR Use 1 variable to store the value of menvcfg. Signed-off-by: Yong-Xuan Wang Reviewed-by: Anup Patel --- include/sbi/riscv_encoding.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'include') diff --git a/include/sbi/riscv_encoding.h b/include/sbi/riscv_encoding.h index 0996d649..f20df761 100644 --- a/include/sbi/riscv_encoding.h +++ b/include/sbi/riscv_encoding.h @@ -207,13 +207,8 @@ #define MHPMEVENT_SSCOF_MASK _ULL(0xFFFF000000000000) -#if __riscv_xlen > 32 #define ENVCFG_STCE (_ULL(1) << 63) #define ENVCFG_PBMTE (_ULL(1) << 62) -#else -#define ENVCFGH_STCE (_UL(1) << 31) -#define ENVCFGH_PBMTE (_UL(1) << 30) -#endif #define ENVCFG_CBZE (_UL(1) << 7) #define ENVCFG_CBCFE (_UL(1) << 6) #define ENVCFG_CBIE_SHIFT 4 -- cgit v1.3.1