forked from Mirrors/opensbi

Provide a function to count the number of set bits in a hartmask, which builds on a new function for the same that operates on a bitmask. While at it, improve the performance of sbi_popcount() which is used in the implementation. Signed-off-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Anup Patel <anup@brainfault.org> Link: https://lore.kernel.org/r/20250314163021.154530-5-ajones@ventanamicro.com Signed-off-by: Anup Patel <anup@brainfault.org>