The original code has multiple conversions between hartid and
hartindex. Can call sbi_hartmask_set_hartindex directly to
avoid conversion.
Signed-off-by: Xiang W <wxjstz@126.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
/* Root domain possible and assigned HARTs */
for (i = 0; i < plat->hart_count; i++)
- sbi_hartmask_set_hartid(sbi_hartindex_to_hartid(i),
- root_hmask);
+ sbi_hartmask_set_hartindex(i, root_hmask);
/* Finally register the root domain */
rc = sbi_domain_register(&root, root_hmask);