summaryrefslogtreecommitdiff
path: root/lib/utils/ipi/aclint_mswi.c
diff options
context:
space:
mode:
authorAnup Patel <apatel@ventanamicro.com>2023-11-21 13:22:17 +0300
committerAnup Patel <anup@brainfault.org>2023-11-26 16:15:08 +0300
commitb70d6285f0f7cbb84619ba1758bb0c6d7620eaef (patch)
tree29ad2b1dfc380e5715136bf27e21682fd5be5c50 /lib/utils/ipi/aclint_mswi.c
parentf520256d03da84e7ff8bddd084ef873192f46304 (diff)
downloadopensbi-b70d6285f0f7cbb84619ba1758bb0c6d7620eaef.tar.xz
lib: sbi: Allow relaxed MMIO writes in device ipi_clear() callback
Currently, there are no barriers before or after the ipi_clear() device callback which forces ipi_clear() device callback to always use non-relaxed MMIO writes. Instead of above, we use wmb() in after the ipi_clear() device callback which pairs with the wmb() done before the ipi_send() device callback. This also allows device ipi_clear() callback to use relaxed MMIO writes. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reported-by: Bo Gan <ganboing@gmail.com>
Diffstat (limited to 'lib/utils/ipi/aclint_mswi.c')
-rw-r--r--lib/utils/ipi/aclint_mswi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/utils/ipi/aclint_mswi.c b/lib/utils/ipi/aclint_mswi.c
index bfd6a45..4ae6bb1 100644
--- a/lib/utils/ipi/aclint_mswi.c
+++ b/lib/utils/ipi/aclint_mswi.c
@@ -61,7 +61,7 @@ static void mswi_ipi_clear(u32 hart_index)
/* Clear ACLINT IPI */
msip = (void *)mswi->addr;
- writel(0, &msip[sbi_hartindex_to_hartid(hart_index) -
+ writel_relaxed(0, &msip[sbi_hartindex_to_hartid(hart_index) -
mswi->first_hartid]);
}