linux/arch/riscv
Clément Léger 441381506b
riscv: misaligned: remove CONFIG_RISCV_M_MODE specific code
While reworking code to fix sparse errors, it appears that the
RISCV_M_MODE specific could actually be removed and use the one for
normal mode. Even though RISCV_M_MODE can do direct user memory access,
using the user uaccess helpers is also going to work. Since there is no
need anymore for specific accessors (load_u8()/store_u8()), we can
directly use memcpy()/copy_{to/from}_user() and get rid of the copy
loop entirely. __read_insn() is also fixed to use an unsigned long
instead of a pointer which was cast in __user address space. The
insn_addr parameter is now cast from unsigned lnog to the correct
address space directly.

Signed-off-by: Clément Léger <cleger@rivosinc.com>
Reviewed-by: Charlie Jenkins <charlie@rivosinc.com>
Link: https://lore.kernel.org/r/20240206154104.896809-1-cleger@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2024-04-28 14:50:37 -07:00
..
boot RISC-V Patches for the 6.9 Merge Window 2024-03-22 10:41:13 -07:00
configs RISC-V Patches for the 6.9 Merge Window 2024-03-22 10:41:13 -07:00
crypto crypto: riscv - add vector crypto accelerated AES-CBC-CTS 2024-03-20 08:56:11 -07:00
errata riscv: errata: Rename defines for Andes 2024-03-12 07:13:12 -07:00
include riscv: Do not save the scratch CSR during suspend 2024-04-28 14:50:36 -07:00
kernel riscv: misaligned: remove CONFIG_RISCV_M_MODE specific code 2024-04-28 14:50:37 -07:00
kvm KVM/riscv changes for 6.9 2024-03-11 10:10:48 -04:00
lib RISC-V Patches for the 6.9 Merge Window 2024-03-22 10:41:13 -07:00
mm Merge patch series "riscv: 64-bit NOMMU fixes and enhancements" 2024-04-28 14:50:35 -07:00
net bpf, riscv64/cfi: Support kCFI + BPF on riscv64 2024-03-06 15:18:16 -08:00
purgatory riscv: Use SYM_*() assembly macros instead of deprecated ones 2023-11-06 09:42:47 -08:00
tools riscv: Check relocations at compile time 2023-04-19 07:46:32 -07:00
Kbuild RISC-V: hook new crypto subdir into build-system 2024-01-22 17:55:17 -08:00
Kconfig Merge patch series "riscv: 64-bit NOMMU fixes and enhancements" 2024-04-28 14:50:35 -07:00
Kconfig.debug riscv: Add tests for riscv module loading 2023-11-07 14:59:32 -08:00
Kconfig.errata RISC-V Patches for the 6.8 Merge Window, Part 4 2024-01-20 11:06:04 -08:00
Kconfig.socs riscv: dts: Move BUILTIN_DTB_SOURCE to common Kconfig 2024-03-06 00:08:32 +00:00
Makefile RISC-V: enable building 64-bit kernels with rust support 2024-04-28 14:50:34 -07:00
Makefile.postlink kbuild: remove ARCH_POSTLINK from module builds 2023-10-28 21:10:08 +09:00