riscv: Do not save the scratch CSR during suspend
authorSamuel Holland <samuel.holland@sifive.com>
Tue, 12 Mar 2024 19:56:38 +0000 (12:56 -0700)
committerPalmer Dabbelt <palmer@rivosinc.com>
Sun, 28 Apr 2024 21:50:36 +0000 (14:50 -0700)
commitfa7d7339016ab7850258e85d6adfd4c4abca5498
tree9d3fa584dbbcfc361df629bffeaffee04969e2f4
parentd4b500cceb0e09ae22722d41454df6012848062b
riscv: Do not save the scratch CSR during suspend

While the processor is executing kernel code, the value of the scratch
CSR is always zero, so there is no need to save the value. Continue to
write the CSR during the resume flow, so we do not rely on firmware to
initialize it.

Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Link: https://lore.kernel.org/r/20240312195641.1830521-1-samuel.holland@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/asm/suspend.h
arch/riscv/kernel/suspend.c