Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: Quan Zhou <zhouquan@iscas.ac.cn>
Signed-off-by: Dong Yang <dayss1224@gmail.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Link: https://lore.kernel.org/r/85e5e51757c9289ca463fbc4ba6d22f9c9db791b.1756710918.git.dayss1224@gmail.com
Signed-off-by: Anup Patel <anup@brainfault.org>

authored by

Quan Zhou and committed by
Anup Patel
c92786e1 b4ab605e

+1 -2
+1 -2
tools/testing/selftests/rseq/rseq-riscv.h
··· 8 8 * exception when executed in all modes. 9 9 */ 10 10 #include <endian.h> 11 + #include <asm/fence.h> 11 12 12 13 #if defined(__BYTE_ORDER) ? (__BYTE_ORDER == __LITTLE_ENDIAN) : defined(__LITTLE_ENDIAN) 13 14 #define RSEQ_SIG 0xf1401073 /* csrr mhartid, x0 */ ··· 25 24 #define REG_L __REG_SEL("ld ", "lw ") 26 25 #define REG_S __REG_SEL("sd ", "sw ") 27 26 28 - #define RISCV_FENCE(p, s) \ 29 - __asm__ __volatile__ ("fence " #p "," #s : : : "memory") 30 27 #define rseq_smp_mb() RISCV_FENCE(rw, rw) 31 28 #define rseq_smp_rmb() RISCV_FENCE(r, r) 32 29 #define rseq_smp_wmb() RISCV_FENCE(w, w)