lib: sbi: Prefer hartindex over hartid in IPI framework

Let us prefer hartindex over hartid in IPI framework which in-turn
forces IPI users to also prefer hartindex.

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
This commit is contained in:
Anup Patel
2023-09-01 17:41:07 +05:30
committed by Anup Patel
parent e632cd7c81
commit 78c667b6fc
9 changed files with 44 additions and 38 deletions

View File

@@ -68,8 +68,10 @@ static inline void plic_sw_pending(u32 target_hart)
writel(val, (void *)plicsw.addr + PLICSW_PENDING_BASE + word_index * 4);
}
static void plicsw_ipi_send(u32 target_hart)
static void plicsw_ipi_send(u32 hart_index)
{
u32 target_hart = sbi_hartindex_to_hartid(hart_index);
if (plicsw.hart_count <= target_hart)
ebreak();
@@ -77,8 +79,10 @@ static void plicsw_ipi_send(u32 target_hart)
plic_sw_pending(target_hart);
}
static void plicsw_ipi_clear(u32 target_hart)
static void plicsw_ipi_clear(u32 hart_index)
{
u32 target_hart = sbi_hartindex_to_hartid(hart_index);
if (plicsw.hart_count <= target_hart)
ebreak();