From 66daafe3ba210eec78900269817ee504ffa9c212 Mon Sep 17 00:00:00 2001 From: Anup Patel Date: Tue, 25 Apr 2023 09:12:36 +0530 Subject: lib: sbi: Use scratch space to save per-HART domain pointer Instead of using a global array indexed by hartid, we should use scratch space to save per-HART domain pointer. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones --- include/sbi/sbi_domain.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'include') diff --git a/include/sbi/sbi_domain.h b/include/sbi/sbi_domain.h index 124ea90b..b05bcf4d 100644 --- a/include/sbi/sbi_domain.h +++ b/include/sbi/sbi_domain.h @@ -129,12 +129,8 @@ struct sbi_domain { /** The root domain instance */ extern struct sbi_domain root; -/** HART id to domain table */ -extern struct sbi_domain *hartid_to_domain_table[]; - /** Get pointer to sbi_domain from HART id */ -#define sbi_hartid_to_domain(__hartid) \ - hartid_to_domain_table[__hartid] +struct sbi_domain *sbi_hartid_to_domain(u32 hartid); /** Get pointer to sbi_domain for current HART */ #define sbi_domain_thishart_ptr() \ -- cgit v1.3.1