mirror of
https://github.com/Fishwaldo/opensbi.git
synced 2025-07-03 03:28:21 +00:00
lib: sbi: Update system suspend to spec
commit 68e66106120f ("SUSP: Add SBI_ERR_DENIED") of the SBI spec adds a new error code, SBI_ERR_DENIED, which is returned when entry criteria has not be meant. Update the system suspend implementation to return this error when it has detected that not all harts are in the STOPPED state. Signed-off-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
parent
0e2111e12c
commit
e05a9cfefc
1 changed files with 1 additions and 1 deletions
|
@ -174,7 +174,7 @@ int sbi_system_suspend(u32 sleep_type, ulong resume_addr, ulong opaque)
|
||||||
if (i == hartid)
|
if (i == hartid)
|
||||||
continue;
|
continue;
|
||||||
if (__sbi_hsm_hart_get_state(i) != SBI_HSM_STATE_STOPPED)
|
if (__sbi_hsm_hart_get_state(i) != SBI_HSM_STATE_STOPPED)
|
||||||
return SBI_EFAIL;
|
return SBI_ERR_DENIED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!sbi_domain_check_addr(dom, resume_addr, prev_mode,
|
if (!sbi_domain_check_addr(dom, resume_addr, prev_mode,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue