cache: dma: always use accessors with shared data

Access to objects, defined with a SHARED_DATA attribute should only
be performed, using the platform_shared_get() function at run-time or
using cache_to_uncache_init() at initialisation time.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This commit is contained in:
Guennadi Liakhovetski 2022-03-11 14:16:55 +01:00 committed by Liam Girdwood
parent 528accc80b
commit a1b9f35cc9
8 changed files with 14 additions and 8 deletions

View File

@ -79,7 +79,7 @@ static SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
};
static const struct dma_info lib_dma = {
.dma_array = dma,
.dma_array = cache_to_uncache_init((struct dma *)dma),
.num_dmas = ARRAY_SIZE(dma)
};

View File

@ -186,7 +186,7 @@ static SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
};
static const struct dma_info lib_dma = {
.dma_array = dma,
.dma_array = cache_to_uncache_init((struct dma *)dma),
.num_dmas = ARRAY_SIZE(dma)
};

View File

@ -115,7 +115,7 @@ static SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
},};
static const struct dma_info lib_dma = {
.dma_array = dma,
.dma_array = cache_to_uncache_init((struct dma *)dma),
.num_dmas = ARRAY_SIZE(dma)
};

View File

@ -47,7 +47,7 @@ static SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
};
static const struct dma_info lib_dma = {
.dma_array = dma,
.dma_array = cache_to_uncache_init((struct dma *)dma),
.num_dmas = ARRAY_SIZE(dma)
};

View File

@ -42,7 +42,7 @@ static SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
};
static const struct dma_info lib_dma = {
.dma_array = dma,
.dma_array = cache_to_uncache_init((struct dma *)dma),
.num_dmas = ARRAY_SIZE(dma)
};

View File

@ -45,7 +45,7 @@ static SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
};
static const struct dma_info lib_dma = {
.dma_array = dma,
.dma_array = cache_to_uncache_init((struct dma *)dma),
.num_dmas = ARRAY_SIZE(dma)
};

View File

@ -26,7 +26,10 @@ static SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
},
};
static const struct dma_info lib_dma = { .dma_array = dma, .num_dmas = ARRAY_SIZE(dma) };
static const struct dma_info lib_dma = {
.dma_array = cache_to_uncache_init((struct dma *)dma),
.num_dmas = ARRAY_SIZE(dma)
};
int dmac_init(struct sof *sof)
{

View File

@ -39,7 +39,10 @@ static SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
},
};
static const struct dma_info lib_dma = { .dma_array = dma, .num_dmas = ARRAY_SIZE(dma) };
static const struct dma_info lib_dma = {
.dma_array = cache_to_uncache_init((struct dma *)dma),
.num_dmas = ARRAY_SIZE(dma)
};
int dmac_init(struct sof *sof)
{