diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-08-19 14:22:07 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-08-19 14:22:07 -0700 |
| commit | cb8a75eec0877810b50aa1c5a833f929525cd2ee (patch) | |
| tree | bdb5ca7e1a09eabe313d9c09acefdaaea985b539 /drivers/gpu/drm/radeon/r520.c | |
| parent | 1484625c5968cad5e26b653d13b4b7a18c07834d (diff) | |
| parent | 8b502bf6eb3da15f4b954ad3632335ff10ed746a (diff) | |
| download | linux-master.tar.gz linux-master.zip | |
Merge tag 'trace-ringbuffer-v7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-traceHEADmaster
Pull ring-buffer updates from Steven Rostedt:
- Remove unneeded semicolon
A macro ended with a semicolon that wasn't needed.
- Fix freeing cpu_buffer extra subbuffer with order greater than zero
When the cpu_buffer was being freed, its "free" page, was using
free_page() to free it when it could be more than one page.
- Hold the cpu_buffer lock when resizing the subbuffer
The freeing of the "free" page of the cpu_buffer was done without
locking. The order of the data was being saved and then the "free"
page was set to NULL. But there is a race that the "free" page could
have been updated between those two operations. Add locking around it
to prevent the race.
- Save the order of the data along with the data in the free page
The cpu_buffer would store just the data portion of the subbuffer
page in its descriptor. But it did not store the order of the data
pages. The order was being saved in the global buffer descriptor. But
this leads to races.
Have the cpu_buffer save the subbuf data along with its metadata
(which includes the order of the page) to make sure when it frees it,
it frees the correct order along with it.
- Remove the subbuf_size and use the order directly when needed
Having a size field for the size of the subbufer along with its order
allowed for races to have them get out of sync. Remove the
subbuf_size and use the order from the subbuf meta data directly
under locks.
Use the subbuf_order for other calculations in the ring buffer.
- Remove the useless "cpus" field of trace_buffer
The code has been restructured and the "cpus" field is no longer
used. Remove it.
- Remove the "mapped" field of the ring buffer and use a helper
function instead.
The "mapped" field has become a bit overused and made the code come
complex in using a counter for what is denoted as being mapped or
not. There are other fields that are set when the ring buffer is
considered mapped. Add a helper function to check those fields and
use that instead of keeping track of a counter.
* tag 'trace-ringbuffer-v7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
ring-buffer: Remove ring_buffer_per_cpu::mapped
ring-buffer: Remove trace_buffer::cpus
ring-buffer: Dynamically calculate max_data_size
ring-buffer: Fix subbuf resize race with ring_buffer_alloc_read_page()
ring-buffer: Fix subbuf resize race with ring buffer readers
ring-buffer: Make cpu_buffer::free_page a buffer_data_read_page
ring-buffer: Hold cpu_buffer::lock when resizing a subbuf
ring-buffer: Free cpu_buffer::free_page with subbuf_order
ring-buffer: drop unneeded semicolon
Diffstat (limited to 'drivers/gpu/drm/radeon/r520.c')
0 files changed, 0 insertions, 0 deletions
