diff options
| author | Andrew Jones <[email protected]> | 2023-07-20 17:48:37 +0200 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2023-07-31 11:45:11 +0530 |
| commit | e05a9cfefcf33e9fffb04f091ed371df525f594c (patch) | |
| tree | fc2f5e6236ad1d4699d73b1c7232af861dbfa8ff | |
| parent | 0e2111e12c62dda9b52b89619a89ac6839c13b52 (diff) | |
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 <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
| -rw-r--r-- | lib/sbi/sbi_system.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sbi/sbi_system.c b/lib/sbi/sbi_system.c index d803ffa8..2e917c9e 100644 --- a/lib/sbi/sbi_system.c +++ b/lib/sbi/sbi_system.c @@ -174,7 +174,7 @@ int sbi_system_suspend(u32 sleep_type, ulong resume_addr, ulong opaque) if (i == hartid) continue; 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, |
