aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiao Wang <[email protected]>2024-03-13 18:33:34 +0800
committerPalmer Dabbelt <[email protected]>2024-05-22 16:12:54 -0700
commitf1905946bed052522522303f1d144f506ef5d9f9 (patch)
treec202023751bdb1d8550881e63b4ff3cc490b024c
parent7e6eae24daf6bdb812c14d40b76c23de1371149d (diff)
riscv: uaccess: Allow the last potential unrolled copy
When the dst buffer pointer points to the last accessible aligned addr, we could still run another iteration of unrolled copy. Signed-off-by: Xiao Wang <[email protected]> Reviewed-by: Alexandre Ghiti <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
-rw-r--r--arch/riscv/lib/uaccess.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/lib/uaccess.S b/arch/riscv/lib/uaccess.S
index bc22c078aba8..64792a7ae72e 100644
--- a/arch/riscv/lib/uaccess.S
+++ b/arch/riscv/lib/uaccess.S
@@ -103,7 +103,7 @@ SYM_FUNC_START(fallback_scalar_usercopy)
fixup REG_S t4, 7*SZREG(a0), 10f
addi a0, a0, 8*SZREG
addi a1, a1, 8*SZREG
- bltu a0, t0, 2b
+ bleu a0, t0, 2b
addi t0, t0, 8*SZREG /* revert to original value */
j .Lbyte_copy_tail