include: sbi: Remove sbi_hartmask_for_each_hart() macro

The sbi_hartmask_for_each_hart() macro is slow and has only one user
so let us completely remove the sbi_hartmask_for_each_hart() macro.

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
This commit is contained in:
Anup Patel
2023-09-02 17:34:32 +05:30
committed by Anup Patel
parent 112daa2e64
commit 9560fb38fe
2 changed files with 2 additions and 14 deletions

View File

@@ -170,7 +170,8 @@ int sbi_system_suspend(u32 sleep_type, ulong resume_addr, ulong opaque)
if (prev_mode != PRV_S && prev_mode != PRV_U)
return SBI_EFAIL;
sbi_hartmask_for_each_hart(i, j, &dom->assigned_harts) {
sbi_hartmask_for_each_hartindex(j, &dom->assigned_harts) {
i = sbi_hartindex_to_hartid(j);
if (i == hartid)
continue;
if (__sbi_hsm_hart_get_state(i) != SBI_HSM_STATE_STOPPED)