From 112daa2e647cb819834b84abd77cd8cdfc3bfee3 Mon Sep 17 00:00:00 2001 From: Anup Patel Date: Sat, 2 Sep 2023 16:16:20 +0530 Subject: 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 --- include/sbi/sbi_domain.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/sbi') diff --git a/include/sbi/sbi_domain.h b/include/sbi/sbi_domain.h index da2a65a..e10daff 100644 --- a/include/sbi/sbi_domain.h +++ b/include/sbi/sbi_domain.h @@ -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[]; -- cgit v1.1