riscv/barrier: Consolidate fence definitions
authorEric Chan <ericchancf@google.com>
Sat, 17 Feb 2024 13:13:16 +0000 (13:13 +0000)
committerPalmer Dabbelt <palmer@rivosinc.com>
Wed, 20 Mar 2024 01:52:24 +0000 (18:52 -0700)
commitc85688e2b0f0afbce7ea3cd8c47f2be67c09b9f4
tree72f1f508a0cb61c6e79fd55dcf50eb726f299f18
parentb3c8064ccc447be45a3bdc2c4a9ea0491f011920
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>
arch/riscv/include/asm/atomic.h
arch/riscv/include/asm/barrier.h
arch/riscv/include/asm/cmpxchg.h
arch/riscv/include/asm/fence.h
arch/riscv/include/asm/io.h
arch/riscv/include/asm/mmio.h
arch/riscv/include/asm/mmiowb.h