diff options
author | Anup Patel <anup.patel@wdc.com> | 2020-03-14 18:55:53 +0530 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2020-03-19 09:11:12 +0530 |
commit | 209134d8f9c6e4ec9a555a7813f7e2c004b5b2d7 (patch) | |
tree | 8c9cda3f1891a2bc9f0e1b33c696f58806799335 /include/sbi/sbi_hsm.h | |
parent | 3ebfe0ec5d280b0c5ca61b8c5cfe4bc807907630 (diff) |
lib: Handle failure of sbi_hartid_to_scratch() API
The sbi_hartid_to_scratch() API can fail for non-existent HARTs so
all uses of sbi_hartid_to_scratch() API should check return value.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'include/sbi/sbi_hsm.h')
-rw-r--r-- | include/sbi/sbi_hsm.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sbi/sbi_hsm.h b/include/sbi/sbi_hsm.h index 11ae3ac..65aff9f 100644 --- a/include/sbi/sbi_hsm.h +++ b/include/sbi/sbi_hsm.h @@ -17,6 +17,7 @@ #define SBI_HART_STOPPING 1 #define SBI_HART_STARTING 2 #define SBI_HART_STARTED 3 +#define SBI_HART_UNKNOWN 4 int sbi_hsm_init(struct sbi_scratch *scratch, u32 hartid, bool cold_boot); void __noreturn sbi_hsm_exit(struct sbi_scratch *scratch); |