lib: sbi: Maximize the use of HART index in sbi_domain

Let us maximize the use of HART index in sbi_domain because hartindex
based hartmask access and sbi_scratch lookup is faster.

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
This commit is contained in:
Anup Patel authored and Anup Patel committed 2023-09-24 11:48:17 +05:30
1 parent 22d6ff8675
commit 112daa2e64
2 files changed
+33 -29

No files matched your search

+3 -3
View File
@@ -201,12 +201,12 @@ struct sbi_domain {
/** The root domain instance */
extern struct sbi_domain root;
/** Get pointer to sbi_domain from HART id */
struct sbi_domain *sbi_hartid_to_domain(u32 hartid);
/** Get pointer to sbi_domain from HART index */
struct sbi_domain *sbi_hartindex_to_domain(u32 hartindex);
/** Get pointer to sbi_domain for current HART */
#define sbi_domain_thishart_ptr() \
sbi_hartid_to_domain(current_hartid())
sbi_hartindex_to_domain(sbi_hartid_to_hartindex(current_hartid()))
/** Index to domain table */
extern struct sbi_domain *domidx_to_domain_table[];