File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -385,29 +385,17 @@ static inline void __coherent_shared(struct coherent *c, const size_t size)
385385__must_check static inline struct coherent __sparse_cache * coherent_acquire_thread (
386386 struct coherent * c , const size_t size )
387387{
388- if (c -> shared ) {
389- struct coherent __sparse_cache * cc = uncache_to_cache (c );
390-
388+ if (c -> shared )
391389 k_mutex_lock (& c -> mutex , K_FOREVER );
392390
393- /* invalidate local copy */
394- dcache_invalidate_region (cc , size );
395- }
396-
397391 return (__sparse_force struct coherent __sparse_cache * )c ;
398392}
399393
400394static inline void coherent_release_thread (struct coherent __sparse_cache * c ,
401395 const size_t size )
402396{
403- if (c -> shared ) {
404- struct coherent * uc = cache_to_uncache (c );
405-
406- /* wtb and inv local data to coherent object */
407- dcache_writeback_invalidate_region (c , size );
408-
409- k_mutex_unlock (& uc -> mutex );
410- }
397+ if (c -> shared )
398+ k_mutex_unlock (& c -> mutex );
411399}
412400
413401static inline void * __coherent_init_thread (size_t offset , const size_t size )
You can’t perform that action at this time.
0 commit comments