Skip to content

Commit

Permalink
buf: remove unnecessary cache operation
Browse files Browse the repository at this point in the history
All control structures of buffers shared between cores
are now stoerd in a non-cached memory alias.
Cache writeback is no longer needed here

Signed-off-by: Marcin Szkudlinski <[email protected]>
  • Loading branch information
marcinszkudlinski committed Oct 18, 2024
1 parent cbb350a commit 37936d9
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/audio/pipeline/pipeline-graph.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,17 +409,7 @@ int pipeline_for_each_comp(struct comp_dev *current,
continue;

/* don't go back to the buffer which already walked */
/*
* Note, that this access must be performed unlocked via
* uncached address. Trying to lock before checking the flag
* understandably leads to a deadlock when this function is
* called recursively from .comp_func() below. We do it in a
* safe way: this flag must *only* be accessed in this function
* only in these three cases: testing, setting and clearing.
* Note, that it is also assumed that buffers aren't shared
* across CPUs. See further comment below.
*/
dcache_writeback_invalidate_region(uncache_to_cache(buffer), sizeof(*buffer));

if (buffer->audio_buffer.walking)
continue;

Expand Down

0 comments on commit 37936d9

Please sign in to comment.