summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAnup Patel <[email protected]>2023-04-25 09:12:36 +0530
committerAnup Patel <[email protected]>2023-06-05 15:55:21 +0530
commit66daafe3ba210eec78900269817ee504ffa9c212 (patch)
tree4ef5eeb4892990455fa627c984cf7c0b7090f599 /include
parentef4542dc1363038676e688cf3cb5edd174f65d76 (diff)
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 <[email protected]> Reviewed-by: Andrew Jones <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/sbi/sbi_domain.h6
1 files changed, 1 insertions, 5 deletions
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() \