cavs: memory: do not use uncached memory for UP config

This patch changes platform_shared_get implementation based
on the current number of supported cores. Let's not use
uncached memory for UP configuration.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
This commit is contained in:
Tomasz Lauda 2019-12-18 12:42:10 +01:00 committed by Tomasz Lauda
parent d2b0823daa
commit b4f4142418
1 changed files with 7 additions and 0 deletions

View File

@ -11,6 +11,9 @@
#define __CAVS_LIB_MEMORY_H__
#include <sof/lib/cache.h>
#if !defined(__ASSEMBLER__) && !defined(LINKER)
#include <sof/lib/cpu.h>
#endif
#include <config.h>
/* data cache line alignment */
@ -86,8 +89,12 @@
*/
static inline void *platform_shared_get(void *ptr, int bytes)
{
#if PLATFORM_CORE_COUNT > 1
dcache_invalidate_region(ptr, bytes);
return cache_to_uncache(ptr);
#else
return ptr;
#endif
}
void platform_init_memmap(void);