riscv: uaccess: Only restore the CSR_STATUS SUM bit
authorCyril Bur <cyrilbur@tenstorrent.com>
Mon, 2 Jun 2025 12:15:43 +0000 (12:15 +0000)
committerPalmer Dabbelt <palmer@dabbelt.com>
Thu, 5 Jun 2025 21:03:17 +0000 (14:03 -0700)
commit265d6aba165c500389c80d394ac247460c443ef5
tree4c44f088d103b32e738be63f649b609e6bbdc3c8
parent2670a39b1ea68fb0b9175e26e299f3fe974e0332
riscv: uaccess: Only restore the CSR_STATUS SUM bit

During switch to csrs will OR the value of the register into the
corresponding csr. In this case we're only interested in restoring the
SUM bit not the entire register.

Signed-off-by: Cyril Bur <cyrilbur@tenstorrent.com>
Link: https://lore.kernel.org/r/20250522160954.429333-1-cyrilbur@tenstorrent.com
Co-developed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Fixes: 788aa64c01f1 ("riscv: save the SR_SUM status over switches")
Link: https://lore.kernel.org/r/20250602121543.1544278-1-alexghiti@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@dabbelt.com>
arch/riscv/include/asm/processor.h
arch/riscv/kernel/asm-offsets.c
arch/riscv/kernel/entry.S