tools: Add riscv barrier implementation
authorCharlie Jenkins <charlie@rivosinc.com>
Tue, 6 Aug 2024 22:01:23 +0000 (15:01 -0700)
committerPalmer Dabbelt <palmer@rivosinc.com>
Fri, 20 Sep 2024 08:46:46 +0000 (01:46 -0700)
commit6d74d178fe6eaf61e384f3be6ba64150bddce8a6
tree9608f3224320f73c7548473575813860f42a0c99
parent8400291e289ee6b2bf9779ff1c83a291501f017b
tools: Add riscv barrier implementation

Many of the other architectures use their custom barrier implementations.
Use the barrier code from the kernel sources to optimize barriers in
tools.

Signed-off-by: Charlie Jenkins <charlie@rivosinc.com>
Reviewed-by: Andrea Parri <parri.andrea@gmail.com>
Link: https://lore.kernel.org/r/20240806-optimize_ring_buffer_read_riscv-v2-1-ca7e193ae198@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
tools/arch/riscv/include/asm/barrier.h [new file with mode: 0644]
tools/arch/riscv/include/asm/fence.h [new file with mode: 0644]
tools/include/asm/barrier.h