riscv: fix RVG_SYSTEM_CSR_MASK width mask
PATCH 1/1 riscv: fix RVG_SYSTEM_CSR_MASK width mask
RVG_SYSTEM_CSR_MASK should be 12 bits [31:20], shifted down by 20 bits. Replace GENMASK(12, 0) by GENMASK(11, 0).
Fixes cd054837243b ("riscv: Allocate user's vector context in the first-use trap")
Signed-off-by Aurelien Jarno <[email protected]>
--- arch/riscv/include/asm/insn.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/include/asm/insn.h +1 -1
@@ -142,7 +142,7 @@#define RVG_OPCODE_JAL 0x6f#define RVG_OPCODE_SYSTEM 0x73#define RVG_SYSTEM_CSR_OFF 20 -#define RVG_SYSTEM_CSR_MASK GENMASK(12, 0) +#define RVG_SYSTEM_CSR_MASK GENMASK(11, 0)/* parts of opcode for RVF, RVD and RVQ */ #define RVFDQ_FL_FS_WIDTH_OFF 12
Signature · 1 line
2.53.0
Quoted 5 lines · Aurelien Jarno
RVG_SYSTEM_CSR_MASKshould be 12 bits [31:20], shifted down by 20 bits. ReplaceGENMASK(12, 0)byGENMASK(11, 0).Fixes cd054837243b ("riscv: Allocate user's vector context in the first-use trap")Signed-off-by Aurelien Jarno <[email protected]>
Reviewed-by Jisheng Zhang <[email protected]>
Quoted 25 lines
--- arch/riscv/include/asm/insn.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/riscv/include/asm/insn.h +1
-1@@ -142,7 +142,7 @@#define RVG_OPCODE_JAL 0x6f#define RVG_OPCODE_SYSTEM 0x73#define RVG_SYSTEM_CSR_OFF 20 -#define RVG_SYSTEM_CSR_MASK GENMASK(12, 0) +#define RVG_SYSTEM_CSR_MASK GENMASK(11, 0)/* parts of opcode for RVF, RVD and RVQ */ #define RVFDQ_FL_FS_WIDTH_OFF 12Signature · 7 lines
2.53.0 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
Paul Walmsley
maintainerQuoted 5 lines · Aurelien Jarno
RVG_SYSTEM_CSR_MASKshould be 12 bits [31:20], shifted down by 20 bits. ReplaceGENMASK(12, 0)byGENMASK(11, 0).Fixes cd054837243b ("riscv: Allocate user's vector context in the first-use trap")Signed-off-by Aurelien Jarno <[email protected]>
Thanks, queued for v7.4.
- Paul