Skip to contentSkip to conversation

RISC-V: fix vector insn load/store width mask

PATCH Applied Jesse Taube 3 participants 3 messages Jun 6, 2024 – Jun 26, 2024 RISC-V

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RISC-V: fix vector insn load/store width mask

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 cd054837243b ("riscv: Allocate user's vector context in the first-use trap")
---
 arch/riscv/include/asm/insn.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/include/asm/insn.h +1 -1
index 06e439eeef9a..09fde95a5e8f 100644
@@ -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
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 25 lines · Jesse Taube

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 cd054837243b ("riscv: Allocate user's vector context in the first-use trap")
---
 arch/riscv/include/asm/insn.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/include/asm/insn.h +1 -1
index 06e439eeef9a..09fde95a5e8f 100644
@@ -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
Signature · 1 line
2.43.0

Thanks!

#2 lore raw
In reply to Jesse Taube
This patch was applied to riscv/linux.git (fixes) by Palmer Dabbelt <[email protected]>:

Hello:

This patch was applied to riscv/linux.git (fixes)
by Palmer Dabbelt <[email protected]>:

Quoted 8 lines · On Thu, 6 Jun 2024 14:28:00 -0400 you wrote:

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 cd054837243b ("riscv: Allocate user's vector context in the first-use trap")
---
 arch/riscv/include/asm/insn.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
- RISC-V: fix vector insn load/store width mask

    https://git.kernel.org/riscv/c/04a2aef59cfe

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html