From 3f8159aa068e6b2447abcf2df00b913b7f852456 Mon Sep 17 00:00:00 2001 From: Ziang Wang Date: Wed, 7 May 2025 15:46:20 +0800 Subject: [PATCH] lib: utils: hsm: Do not fail on EALREADY in rpmi-hsm fixup. 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. Reviewed-by: Anup Patel Signed-off-by: Ziang Wang Link: https://lore.kernel.org/r/20250507074620.3162747-1-wangziang.ok@bytedance.com Signed-off-by: Anup Patel --- 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 cc78436f..09d0c91d 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 */