mirror of https://github.com/thesofproject/sof.git
Coherent: Do not calculate cache_to_uncache for non-shared
The address translation is needed only for shared in functions coherent_release() and coherent_release_thread(). Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This commit is contained in:
parent
561f4b036c
commit
6d127964e5
|
@ -136,14 +136,13 @@ __must_check static inline struct coherent __sparse_cache *coherent_acquire(stru
|
||||||
static inline void coherent_release(struct coherent __sparse_cache *c,
|
static inline void coherent_release(struct coherent __sparse_cache *c,
|
||||||
const size_t size)
|
const size_t size)
|
||||||
{
|
{
|
||||||
struct coherent *uc = cache_to_uncache(c);
|
|
||||||
|
|
||||||
/* assert if someone passes a coherent address in here. */
|
/* assert if someone passes a coherent address in here. */
|
||||||
ADDR_IS_INCOHERENT(c);
|
ADDR_IS_INCOHERENT(c);
|
||||||
CHECK_ATOMIC(c);
|
CHECK_ATOMIC(c);
|
||||||
|
|
||||||
/* access the local copy of object */
|
/* access the local copy of object */
|
||||||
if (c->shared) {
|
if (c->shared) {
|
||||||
|
struct coherent *uc = cache_to_uncache(c);
|
||||||
CHECK_COHERENT_CORE(c);
|
CHECK_COHERENT_CORE(c);
|
||||||
|
|
||||||
/* wtb and inv local data to coherent object */
|
/* wtb and inv local data to coherent object */
|
||||||
|
@ -230,8 +229,6 @@ __must_check static inline struct coherent __sparse_cache *coherent_acquire_thre
|
||||||
static inline void coherent_release_thread(struct coherent __sparse_cache *c,
|
static inline void coherent_release_thread(struct coherent __sparse_cache *c,
|
||||||
const size_t size)
|
const size_t size)
|
||||||
{
|
{
|
||||||
struct coherent *uc = cache_to_uncache(c);
|
|
||||||
|
|
||||||
/* assert if someone passes a coherent address in here. */
|
/* assert if someone passes a coherent address in here. */
|
||||||
ADDR_IS_INCOHERENT(c);
|
ADDR_IS_INCOHERENT(c);
|
||||||
CHECK_SLEEP(c);
|
CHECK_SLEEP(c);
|
||||||
|
@ -239,6 +236,7 @@ static inline void coherent_release_thread(struct coherent __sparse_cache *c,
|
||||||
|
|
||||||
/* access the local copy of object */
|
/* access the local copy of object */
|
||||||
if (c->shared) {
|
if (c->shared) {
|
||||||
|
struct coherent *uc = cache_to_uncache(c);
|
||||||
CHECK_COHERENT_CORE(c);
|
CHECK_COHERENT_CORE(c);
|
||||||
|
|
||||||
/* wtb and inv local data to coherent object */
|
/* wtb and inv local data to coherent object */
|
||||||
|
|
Loading…
Reference in New Issue