mirror of
https://github.com/torvalds/linux.git
synced 2024-11-12 23:23:03 +00:00
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>
This commit is contained in:
parent
6d74d178fe
commit
aa5736dc7a
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user