Skip to content

Commit

Permalink
RISC-V: fix vector insn load/store width mask
Browse files Browse the repository at this point in the history
[ commit: 04a2aef ]

RVFDQ_FL_FS_WIDTH_MASK should be 3 bits [14-12], shifted down by 12 bits.
Replace GENMASK(3, 0) with GENMASK(2, 0).

Fixes: cd05483 ("riscv: Allocate user's vector context in the first-use trap")
Signed-off-by: Jesse Taube <[email protected]>
Reviewed-by: Charlie Jenkins <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Palmer Dabbelt <[email protected]>
Signed-off-by: Han Gao <[email protected]>
Signed-off-by: Han Gao <[email protected]>
  • Loading branch information
Mr-Bossman authored and RevySR committed Jul 11, 2024
1 parent b163d8a commit 0c83a81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/riscv/include/asm/insn.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@

/* parts of opcode for RVF, RVD and RVQ */
#define RVFDQ_FL_FS_WIDTH_OFF 12
#define RVFDQ_FL_FS_WIDTH_MASK GENMASK(3, 0)
#define RVFDQ_FL_FS_WIDTH_MASK GENMASK(2, 0)
#define RVFDQ_FL_FS_WIDTH_W 2
#define RVFDQ_FL_FS_WIDTH_D 3
#define RVFDQ_LS_FS_WIDTH_Q 4
Expand Down

0 comments on commit 0c83a81

Please sign in to comment.