forked from Mirrors/opensbi
lib: sbi: Use sbi_hart_count() and sbi_for_each_hartindex()
Simplify the code and improve consistency by using the new macros where possible. sbi_hart_count() obsoletes sbi_scratch_last_hartindex(). Signed-off-by: Samuel Holland <samuel.holland@sifive.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:

committed by
Anup Patel

parent
757f7acafd
commit
949c83a799
@@ -367,7 +367,7 @@ static u32 generic_tlb_num_entries(void)
|
||||
{
|
||||
if (generic_plat && generic_plat->tlb_num_entries)
|
||||
return generic_plat->tlb_num_entries(generic_plat_match);
|
||||
return sbi_scratch_last_hartindex() + 1;
|
||||
return sbi_hart_count();
|
||||
}
|
||||
|
||||
static int generic_pmu_init(void)
|
||||
|
Reference in New Issue
Block a user