Skip to content

Commit aa5736d

Browse files
charlie-rivospalmer-dabbelt
authored andcommitted
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 <[email protected]> Reviewed-by: Andrea Parri <[email protected]> Link: https://lore.kernel.org/r/20240806-optimize_ring_buffer_read_riscv-v2-2-ca7e193ae198@rivosinc.com Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 6d74d17 commit aa5736d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/include/linux/ring_buffer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ static inline u64 ring_buffer_read_head(struct perf_event_mmap_page *base)
5555
* READ_ONCE() + smp_mb() pair.
5656
*/
5757
#if defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__) || \
58-
defined(__ia64__) || defined(__sparc__) && defined(__arch64__)
58+
defined(__ia64__) || defined(__sparc__) && defined(__arch64__) || defined(__riscv)
5959
return smp_load_acquire(&base->data_head);
6060
#else
6161
u64 head = READ_ONCE(base->data_head);

0 commit comments

Comments
 (0)