Skip to content
Unverified Commit 22b5f16f authored by Akira Tsukamoto's avatar Akira Tsukamoto Committed by Palmer Dabbelt
Browse files

riscv: __asm_copy_to-from_user: Fix: fail on RV32



Had a bug when converting bytes to bits when the cpu was rv32.

The a3 contains the number of bytes and multiple of 8
would be the bits. The LGREG is holding 2 for RV32 and 3 for
RV32, so to achieve multiple of 8 it must always be constant 3.
The 2 was mistakenly used for rv32.

Signed-off-by: default avatarAkira Tsukamoto <akira.tsukamoto@gmail.com>
Fixes: ca6eaaa2

 ("riscv: __asm_copy_to-from_user: Optimize unaligned memory access and pipeline stall")
Signed-off-by: default avatarPalmer Dabbelt <palmerdabbelt@google.com>
parent 6010d300
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment