summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNick Hu <[email protected]>2023-12-01 17:51:47 +0800
committerAnup Patel <[email protected]>2023-12-10 13:24:13 +0530
commita25fc74699feb9409e44344dff742d525f315e5c (patch)
treeb85fba5d933e8a87a13376c8b595df436e65aeb4 /lib
parent06968103dcd99c2cf2dad97549ef3880ea00ccd2 (diff)
lib: sbi_hsm: Put the resume_pending hart in the interruptible hart mask
Current interruptible hart mask doesn't include the hart which HSM state is SBI_HSM_STATE_RESUME_PENDING. So when there is a request to send an IPI to the hart which is in the resume process, this hart would miss the IPI forever. Put the SBI_HSM_STATE_RESUME_PENDING hart in the interruptible hart mask to fix the issue. Signed-off-by: Nick Hu <[email protected]> Reviewed-by: Xiang W <[email protected]> Reviewed-by: Anup Patel <[email protected]>
Diffstat (limited to 'lib')
-rw-r--r--lib/sbi/sbi_hsm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sbi/sbi_hsm.c b/lib/sbi/sbi_hsm.c
index 147f954e..3d60ceb7 100644
--- a/lib/sbi/sbi_hsm.c
+++ b/lib/sbi/sbi_hsm.c
@@ -128,7 +128,8 @@ int sbi_hsm_hart_interruptible_mask(const struct sbi_domain *dom,
hstate = __sbi_hsm_hart_get_state(hbase + i);
if (hstate == SBI_HSM_STATE_STARTED ||
- hstate == SBI_HSM_STATE_SUSPENDED)
+ hstate == SBI_HSM_STATE_SUSPENDED ||
+ hstate == SBI_HSM_STATE_RESUME_PENDING)
*out_hmask |= hmask;
}