lib: sbi: Remove sbi_scratch_last_hartid() macro

The sbi_scratch_last_hartid() macro is not of much use on platforms
with really sparse hartids so let us replace use of this macro with
other approaches.

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
This commit is contained in:
Anup Patel
2023-09-01 21:41:48 +05:30
committed by Anup Patel
parent 78c667b6fc
commit 22d6ff8675
4 changed files with 19 additions and 27 deletions

View File

@@ -14,7 +14,6 @@
#include <sbi/sbi_scratch.h>
#include <sbi/sbi_string.h>
u32 last_hartid_having_scratch = SBI_HARTMASK_MAX_BITS - 1;
u32 last_hartindex_having_scratch = 0;
u32 hartindex_to_hartid_table[SBI_HARTMASK_MAX_BITS + 1] = { -1U };
struct sbi_scratch *hartindex_to_scratch_table[SBI_HARTMASK_MAX_BITS + 1] = { 0 };
@@ -45,7 +44,6 @@ int sbi_scratch_init(struct sbi_scratch *scratch)
hartindex_to_hartid_table[i] = h;
hartindex_to_scratch_table[i] =
((hartid2scratch)scratch->hartid_to_scratch)(h, i);
last_hartid_having_scratch = h;
}
last_hartindex_having_scratch = plat->hart_count - 1;