[PATCH v3 5/9] lib: sbi_domain_context: propagate error from sbi_hart_protection_reconfigure

Radim Krcmar rkrcmar at qti.qualcomm.com
Fri Oct 30 05:26:06 PDT 2026


2026-10-27T16:35:05+08:00, Yu-Chien Peter Lin <peter.lin at sifive.com>:
> Propagate the return value of sbi_hart_protection_reconfigure in
> switch_to_next_domain_context to ensure that domain transition
> failures are correctly handled by the caller.

The state is a mess upon a failure here, so I don't think that the
caller could handle it more gracefully than doing a reset.

There is little reason why we should fail the domain transition, because
the failure conditions can be known at domain initialization.

This series is not to blame for the underlying issue, so I'd instead
note that in the future, we will not allow failures in the middle of
switching, because it's needlessly complicated to unwind such errors.

Thanks.


More information about the opensbi mailing list