mirror of https://github.com/thesofproject/sof.git
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:
parent
528accc80b
commit
a1b9f35cc9
|
@ -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)
|
||||
};
|
||||
|
||||
|
|
|
@ -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)
|
||||
};
|
||||
|
||||
|
|
|
@ -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)
|
||||
};
|
||||
|
||||
|
|
|
@ -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)
|
||||
};
|
||||
|
||||
|
|
|
@ -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)
|
||||
};
|
||||
|
||||
|
|
|
@ -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)
|
||||
};
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue