RISC-V: Factor out common code of __cpu_resume_enter()
authorSia Jee Heng <jeeheng.sia@starfivetech.com>
Thu, 30 Mar 2023 06:43:19 +0000 (14:43 +0800)
committerPalmer Dabbelt <palmer@rivosinc.com>
Sat, 29 Apr 2023 18:25:11 +0000 (11:25 -0700)
commitfcb89863d1b798565db6bdaf8f97f65823c2fd1b
tree9c9f9e1535dcb43df7cb50840d14de1819392582
parent0def12f32129c774f2cd598e326cc4b473da927b
RISC-V: Factor out common code of __cpu_resume_enter()

The cpu_resume() function is very similar for the suspend to disk and
suspend to ram cases. Factor out the common code into suspend_restore_csrs
macro and suspend_restore_regs macro.

Signed-off-by: Sia Jee Heng <jeeheng.sia@starfivetech.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20230330064321.1008373-3-jeeheng.sia@starfivetech.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/asm/assembler.h [new file with mode: 0644]
arch/riscv/kernel/suspend_entry.S