lib: sbi: Update sbi_domain_is_assigned_hart() to take a hart index

This removes redundant hartid to hartindex conversions from four call
sites and provides a net reduction in code size.

Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Samuel Holland
2024-08-30 08:49:14 -07:00
committed by Anup Patel
parent fe153c5516
commit 9f86524b58
6 changed files with 17 additions and 15 deletions

View File

@@ -220,10 +220,10 @@ extern struct sbi_dlist domain_list;
/**
* Check whether given HART is assigned to specified domain
* @param dom pointer to domain
* @param hartid the HART ID
* @param hartindex the HART index
* @return true if HART is assigned to domain otherwise false
*/
bool sbi_domain_is_assigned_hart(const struct sbi_domain *dom, u32 hartid);
bool sbi_domain_is_assigned_hart(const struct sbi_domain *dom, u32 hartindex);
/**
* Get the assigned HART mask for given domain