component: allocate comp_dev with coherent uncached address

Allocate comp_dev on buffer zone with uncached address to rule out
multi-core cache coherency issue, may need to implement coherent API for
it if it is proved lead to too much performance drop with the change.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
This commit is contained in:
Keyon Jie 2021-10-22 16:33:29 +08:00 committed by Liam Girdwood
parent 65a95c339a
commit c2e644b701
1 changed files with 6 additions and 1 deletions

View File

@ -611,7 +611,12 @@ static inline struct comp_dev *comp_alloc(const struct comp_driver *drv,
{
struct comp_dev *dev = NULL;
dev = rzalloc(SOF_MEM_ZONE_RUNTIME, 0, SOF_MEM_CAPS_RAM, bytes);
/*
* use uncached address at the moment to rule out multi-core failures,
* may need to switch to the latest coherence API for performance
* improvement later.
*/
dev = rzalloc(SOF_MEM_ZONE_RUNTIME_SHARED, 0, SOF_MEM_CAPS_RAM, bytes);
if (!dev)
return NULL;
dev->size = bytes;