Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

riscv: misaligned: remove CONFIG_RISCV_M_MODE specific code #593

Closed
wants to merge 1 commit into from

Conversation

bjoto
Copy link

@bjoto bjoto commented Feb 6, 2024

Pull request for series with
subject: riscv: misaligned: remove CONFIG_RISCV_M_MODE specific code
version: 2
url: https://patchwork.kernel.org/project/linux-riscv/list/?series=823649

@bjoto
Copy link
Author

bjoto commented Feb 6, 2024

Upstream branch: cb4ede9
series: https://patchwork.kernel.org/project/linux-riscv/list/?series=823649
version: 2

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>
Signed-off-by: Björn Töpel <bjorn@rivosinc.com>
@bjoto
Copy link
Author

bjoto commented Feb 22, 2024

Upstream branch: 45e0b0f
series: https://patchwork.kernel.org/project/linux-riscv/list/?series=823649
version: 2

@bjoto bjoto closed this Feb 28, 2024
@bjoto bjoto deleted the series/804937=>for-next branch March 1, 2024 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants