mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2026-09-08 18:21:29 +01:00
A secondary hart may not have reached the target sleep state by the time the primary checks, so the one-shot check could fail spuriously. Poll each PCS status instead and give up after HART_SLEEP_TIMEOUT_MS. Rework atcsmu_pcs_is_sleep() into the atcsmu_hart_is_sleep() predicate so sbi_timer_waitms_until() can drive it. Signed-off-by: Ben Zong-You Xie <ben717@andestech.com> Reviewed-by: Anup Patel <anup@brainfault.org> Link: https://lore.kernel.org/r/20260728081041.2724668-7-ben717@andestech.com Signed-off-by: Anup Patel <anup@brainfault.org>