riscv/barrier: Consolidate fence definitions
[linux-2.6-microblaze.git] / arch / riscv / include / asm / barrier.h
index 173b44a..15857db 100644 (file)
 #define _ASM_RISCV_BARRIER_H
 
 #ifndef __ASSEMBLY__
+#include <asm/fence.h>
 
 #define nop()          __asm__ __volatile__ ("nop")
 #define __nops(n)      ".rept  " #n "\nnop\n.endr\n"
 #define nops(n)                __asm__ __volatile__ (__nops(n))
 
-#define RISCV_FENCE(p, s) \
-       __asm__ __volatile__ ("fence " #p "," #s : : : "memory")
 
 /* These barriers need to enforce ordering on both devices or memory. */
 #define __mb()         RISCV_FENCE(iorw, iorw)