mirror of
https://github.com/Fishwaldo/opensbi.git
synced 2025-03-15 19:31:32 +00:00
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 <joshua.yeong@starfivetech.com> Reviewed-by: Xiang W <wxjstz@126.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
parent
96a35db63a
commit
322b598475
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue