@@ -68,9 +68,7 @@ static int sbi_ipi_send(struct sbi_scratch *scratch, u32 remote_hartindex,
*/
atomic_raw_set_bit(event, &ipi_data->ipi_type);
smp_wmb();
-
- if (ipi_dev && ipi_dev->ipi_send)
- ipi_dev->ipi_send(remote_hartindex);
+ sbi_ipi_raw_send(remote_hartindex);
sbi_pmu_ctr_incr_fw(SBI_PMU_FW_IPI_SENT);
@@ -222,9 +220,7 @@ void sbi_ipi_process(void)
u32 hartindex = sbi_hartid_to_hartindex(current_hartid());
sbi_pmu_ctr_incr_fw(SBI_PMU_FW_IPI_RECVD);
- if (ipi_dev && ipi_dev->ipi_clear)
- ipi_dev->ipi_clear(hartindex);
-
+ sbi_ipi_raw_clear(hartindex);
ipi_type = atomic_raw_xchg_ulong(&ipi_data->ipi_type, 0);
ipi_event = 0;
while (ipi_type) {
Pass sbi_ipi_raw_send/sbi_ipi_raw_clear instead of direct access to ipi_dev. Signed-off-by: Xiang W <wxjstz@126.com> --- lib/sbi/sbi_ipi.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)