riscv: kernel: Add support for hibernate/suspend to disk
authorSia Jee Heng <jeeheng.sia@starfivetech.com>
Thu, 1 Sep 2022 07:47:11 +0000 (15:47 +0800)
committermason.huo <mason.huo@starfivetech.com>
Thu, 5 Jan 2023 05:24:40 +0000 (13:24 +0800)
commit8b2ef01dacd5fda6e27c9239aca42f681c302d86
tree1a2aa3d12a48a282d29f6143662b8974dfdc9f99
parent6149b0719c41c08696a76c7443c6fe458e3ae7cf
riscv: kernel: Add support for hibernate/suspend to disk

The implementation assumes that exactly the same kernel is booted on the
same hardware.

We save the build number and date to the swap header so that we guarantee
not to resume with a different kernel upon booted up the hibernated image.

swsusp_arch_resume() and swsusp_arch_suspend() are coded as dummy
functions for now and shall complete in the subsequent patches.

Signed-off-by: Sia Jee Heng <jeeheng.sia@starfivetech.com>
arch/riscv/Kconfig
arch/riscv/include/asm/page.h
arch/riscv/include/asm/suspend.h
arch/riscv/kernel/Makefile
arch/riscv/kernel/hibernate.c [new file with mode: 0644]