riscv: make unsafe user copy routines use existing assembly routines
authorAlexandre Ghiti <alexghiti@rivosinc.com>
Mon, 2 Jun 2025 19:39:14 +0000 (21:39 +0200)
committerPalmer Dabbelt <palmer@dabbelt.com>
Thu, 5 Jun 2025 18:39:15 +0000 (11:39 -0700)
commita4348546332c9fae12b29acb514535e0a52b9b3c
treed1206b2e3e413fb2f86c41fde4b990463cc3cf16
parent259aaf03d7a03fe3c2f909deaeea7ce84ed47880
riscv: make unsafe user copy routines use existing assembly routines

The current implementation is underperforming and in addition, it
triggers misaligned access traps on platforms which do not handle
misaligned accesses in hardware.

Use the existing assembly routines to solve both problems at once.

Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/20250602193918.868962-2-cleger@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@dabbelt.com>
arch/riscv/include/asm/asm-prototypes.h
arch/riscv/include/asm/uaccess.h
arch/riscv/lib/riscv_v_helpers.c
arch/riscv/lib/uaccess.S
arch/riscv/lib/uaccess_vector.S