[PATCH] lib: utils: hsm: Do not fail on EALREADY in rpmi-hsm fixup.

Ziang Wang wangziang.ok at bytedance.com
Fri May 23 02:38:21 PDT 2025


Hi,

Any feedback on this?

On Wed, May 7, 2025 at 3:46 PM Ziang Wang <wangziang.ok at bytedance.com> wrote:
>
> In case harts are divided into groups that use different
> rpmi-hsm channels in different mailboxes, the suspend
> state fixup function will return EALREADY on secondary
> entry, simply skip on this error.
>
> Signed-off-by: Ziang Wang <wangziang.ok at bytedance.com>
> ---
>  lib/utils/hsm/fdt_hsm_rpmi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/utils/hsm/fdt_hsm_rpmi.c b/lib/utils/hsm/fdt_hsm_rpmi.c
> index cc78436..09d0c91 100644
> --- a/lib/utils/hsm/fdt_hsm_rpmi.c
> +++ b/lib/utils/hsm/fdt_hsm_rpmi.c
> @@ -330,7 +330,7 @@ skip_suspend_states:
>
>         /* Register HSM fixup callback */
>         rc = fdt_register_general_fixup(&rpmi_hsm_fixup);
> -       if (rc)
> +       if (rc && rc != SBI_EALREADY)
>                 goto fail_free_susp_state_names;
>
>         /* Register HSM device */
> --
> 2.39.5
>



More information about the opensbi mailing list