summaryrefslogtreecommitdiff
path: root/arch/riscv/include/asm/mmiowb.h
diff options
context:
space:
mode:
authorEric Chan <ericchancf@google.com>2024-02-17 13:13:16 +0000
committerPalmer Dabbelt <palmer@rivosinc.com>2024-03-19 18:52:24 -0700
commitc85688e2b0f0afbce7ea3cd8c47f2be67c09b9f4 (patch)
tree72f1f508a0cb61c6e79fd55dcf50eb726f299f18 /arch/riscv/include/asm/mmiowb.h
parentb3c8064ccc447be45a3bdc2c4a9ea0491f011920 (diff)
riscv/barrier: Consolidate fence definitions
Disparate fence implementations are consolidated into fence.h. Also introduce RISCV_FENCE_ASM to make fence macro more reusable. Signed-off-by: Eric Chan <ericchancf@google.com> Reviewed-by: Andrea Parri <parri.andrea@gmail.com> Reviewed-by: Samuel Holland <samuel.holland@sifive.com> Tested-by: Samuel Holland <samuel.holland@sifive.com> Link: https://lore.kernel.org/r/20240217131316.3668927-1-ericchancf@google.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'arch/riscv/include/asm/mmiowb.h')
-rw-r--r--arch/riscv/include/asm/mmiowb.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/include/asm/mmiowb.h b/arch/riscv/include/asm/mmiowb.h
index 0b2333e71fdc..52ce4a399d9b 100644
--- a/arch/riscv/include/asm/mmiowb.h
+++ b/arch/riscv/include/asm/mmiowb.h
@@ -7,7 +7,7 @@
* "o,w" is sufficient to ensure that all writes to the device have completed
* before the write to the spinlock is allowed to commit.
*/
-#define mmiowb() __asm__ __volatile__ ("fence o,w" : : : "memory");
+#define mmiowb() RISCV_FENCE(o, w)
#include <linux/smp.h>
#include <asm-generic/mmiowb.h>