forked from Mirrors/opensbi
lib: sbi: Allow relaxed MMIO writes in device ipi_send() callback
Currently, we have a smp_wmb() between atomic_raw_set_bit() and ipi_send() device callback whereas the MMIO writes done by the device ipi_send() callback will also include a barrier. We can avoid unnecessary/redundant barriers described above by allowing relaxed MMIO writes in device ipi_send() callback. To achieve this, we simply use wmb() instead of smp_wmb() before calling device ipi_send(). Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reported-by: Bo Gan <ganboing@gmail.com>
This commit is contained in:
@@ -41,7 +41,7 @@ static void mswi_ipi_send(u32 hart_index)
|
||||
|
||||
/* Set ACLINT IPI */
|
||||
msip = (void *)mswi->addr;
|
||||
writel(1, &msip[sbi_hartindex_to_hartid(hart_index) -
|
||||
writel_relaxed(1, &msip[sbi_hartindex_to_hartid(hart_index) -
|
||||
mswi->first_hartid]);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user