From 209134d8f9c6e4ec9a555a7813f7e2c004b5b2d7 Mon Sep 17 00:00:00 2001 From: Anup Patel Date: Sat, 14 Mar 2020 18:55:53 +0530 Subject: 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 Reviewed-by: Bin Meng Reviewed-by: Atish Patra --- include/sbi/sbi_hsm.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/sbi/sbi_hsm.h') 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); -- cgit v1.2.3