diff options
| author | Joshua Yeong <[email protected]> | 2024-02-19 15:14:06 +0800 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2024-02-24 18:18:34 +0530 |
| commit | 322b59847534cbbf484190b0957fb32bee36e2ec (patch) | |
| tree | 109405e8269a6bef41d15785cee3c7b9231ddd88 /lib | |
| parent | 96a35db63af01977aea403b10ca80a77e101f7e4 (diff) | |
lib: sbi_hsm: Restor hart state to stop when fails to start
Hart state should change back to hart stop when hsm_device_hart_start()
or sbi_ipi_raw_send() fails to perform hart start.
Signed-off-by: Joshua Yeong <[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.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/sbi/sbi_hsm.c b/lib/sbi/sbi_hsm.c index 3d60ceb7..be48d64e 100644 --- a/lib/sbi/sbi_hsm.c +++ b/lib/sbi/sbi_hsm.c @@ -360,6 +360,10 @@ int sbi_hsm_hart_start(struct sbi_scratch *scratch, if (!rc) return 0; + + /* If it fails to start, change hart state back to stop */ + __sbi_hsm_hart_change_state(hdata, SBI_HSM_STATE_START_PENDING, + SBI_HSM_STATE_STOPPED); err: hsm_start_ticket_release(hdata); return rc; |
