From be9752a071475ae1d9e58a2dfcb8e83185fb7ae5 Mon Sep 17 00:00:00 2001 From: Samuel Holland Date: Fri, 25 Oct 2024 11:59:46 -0700 Subject: lib: sbi_ipi: Make .ipi_clear always target the current hart All existing users of this operation target the current hart, and it seems unlikely that a future user will need to clear the pending IPI status of a remote hart. Simplify the logic by changing .ipi_clear (and its wrapper sbi_ipi_raw_clear()) to always operate on the current hart. This incidentally fixes a bug introduced in commit 78c667b6fc07 ("lib: sbi: Prefer hartindex over hartid in IPI framework"), which changed the .ipi_clear parameter from a hartid to a hart index, but failed to update the warm_init functions to match. Fixes: 78c667b6fc07 ("lib: sbi: Prefer hartindex over hartid in IPI framework") Signed-off-by: Samuel Holland Reviewed-by: Anup Patel --- include/sbi/sbi_ipi.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/sbi/sbi_ipi.h b/include/sbi/sbi_ipi.h index d3962334..62d61304 100644 --- a/include/sbi/sbi_ipi.h +++ b/include/sbi/sbi_ipi.h @@ -26,8 +26,8 @@ struct sbi_ipi_device { /** Send IPI to a target HART index */ void (*ipi_send)(u32 hart_index); - /** Clear IPI for a target HART index */ - void (*ipi_clear)(u32 hart_index); + /** Clear IPI for the current hart */ + void (*ipi_clear)(void); }; enum sbi_ipi_update_type { @@ -87,7 +87,7 @@ void sbi_ipi_process(void); int sbi_ipi_raw_send(u32 hartindex); -void sbi_ipi_raw_clear(u32 hartindex); +void sbi_ipi_raw_clear(void); const struct sbi_ipi_device *sbi_ipi_get_device(void); -- cgit v1.3.1