Commit c92786e1 authored by Quan Zhou's avatar Quan Zhou Committed by Anup Patel
Browse files

KVM: riscv: selftests: Use the existing RISCV_FENCE macro in `rseq-riscv.h`



To avoid redefinition issues with RISCV_FENCE, directly reference
the existing macro in `rseq-riscv.h`.

Signed-off-by: default avatarQuan Zhou <zhouquan@iscas.ac.cn>
Signed-off-by: default avatarDong Yang <dayss1224@gmail.com>
Reviewed-by: default avatarAndrew Jones <ajones@ventanamicro.com>
Link: https://lore.kernel.org/r/85e5e51757c9289ca463fbc4ba6d22f9c9db791b.1756710918.git.dayss1224@gmail.com


Signed-off-by: default avatarAnup Patel <anup@brainfault.org>
parent b4ab605e
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@
 * exception when executed in all modes.
 */
#include <endian.h>
#include <asm/fence.h>

#if defined(__BYTE_ORDER) ? (__BYTE_ORDER == __LITTLE_ENDIAN) : defined(__LITTLE_ENDIAN)
#define RSEQ_SIG   0xf1401073  /* csrr mhartid, x0 */
@@ -24,8 +25,6 @@
#define REG_L	__REG_SEL("ld ", "lw ")
#define REG_S	__REG_SEL("sd ", "sw ")

#define RISCV_FENCE(p, s) \
	__asm__ __volatile__ ("fence " #p "," #s : : : "memory")
#define rseq_smp_mb()	RISCV_FENCE(rw, rw)
#define rseq_smp_rmb()	RISCV_FENCE(r, r)
#define rseq_smp_wmb()	RISCV_FENCE(w, w)