mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-11-22 19:01:33 +00:00
lib: sbi: Add system_resume callback for restoring the system
The last core who performs the system suspend is responsible for restoring the system after waking up. Add the system_resume callback for restoring the system from suspend. Suggested-by: Anup Patel <anup@brainfault.org> Signed-off-by: Nick Hu <nick.hu@sifive.com> Reviewed-by: Anup Patel <anup@brainfault.org> Link: https://lore.kernel.org/r/20251020-cache-upstream-v7-11-69a132447d8a@sifive.com Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
@@ -455,7 +455,10 @@ void sbi_hsm_hart_resume_start(struct sbi_scratch *scratch)
|
||||
SBI_HSM_STATE_RESUME_PENDING))
|
||||
sbi_hart_hang();
|
||||
|
||||
hsm_device_hart_resume();
|
||||
if (sbi_system_is_suspended())
|
||||
sbi_system_resume();
|
||||
else
|
||||
hsm_device_hart_resume();
|
||||
}
|
||||
|
||||
void __noreturn sbi_hsm_hart_resume_finish(struct sbi_scratch *scratch,
|
||||
|
||||
Reference in New Issue
Block a user