diff options
author | Charlie Jenkins <charlie@rivosinc.com> | 2024-08-06 15:01:24 -0700 |
---|---|---|
committer | Palmer Dabbelt <palmer@rivosinc.com> | 2024-09-20 01:46:47 -0700 |
commit | aa5736dc7aa4d6f0e5e4e4147d9aef42bb82deab (patch) | |
tree | bb54bd7396148c8bc2df91e644827a1a035242dd /tools | |
parent | 6d74d178fe6eaf61e384f3be6ba64150bddce8a6 (diff) |
tools: Optimize ring buffer for riscv
Now that the riscv tools tree supports optimized barriers, use them in
the ring buffer.
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-2-ca7e193ae198@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/include/linux/ring_buffer.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/include/linux/ring_buffer.h b/tools/include/linux/ring_buffer.h index 6c02617377c2..a74c397359c7 100644 --- a/tools/include/linux/ring_buffer.h +++ b/tools/include/linux/ring_buffer.h @@ -55,7 +55,7 @@ static inline u64 ring_buffer_read_head(struct perf_event_mmap_page *base) * READ_ONCE() + smp_mb() pair. */ #if defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__) || \ - defined(__ia64__) || defined(__sparc__) && defined(__arch64__) + defined(__ia64__) || defined(__sparc__) && defined(__arch64__) || defined(__riscv) return smp_load_acquire(&base->data_head); #else u64 head = READ_ONCE(base->data_head); |