From: Andrew Jones Date: Thu, 20 Jul 2023 15:48:37 +0000 (+0200) Subject: lib: sbi: Update system suspend to spec X-Git-Tag: v1.4~128 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e05a9cfefcf33e9fffb04f091ed371df525f594c;p=platform%2Fkernel%2Fopensbi.git 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 Reviewed-by: Anup Patel --- diff --git a/lib/sbi/sbi_system.c b/lib/sbi/sbi_system.c index d803ffa..2e917c9 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,