trace: Use uncached memory in trace_point and panic

It didn't work correctly if multiple cores write to "sw regs"
 allocated on the same cache line.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
This commit is contained in:
Karol Trzcinski 2019-11-22 13:33:38 +01:00 committed by Liam Girdwood
parent b2f088789d
commit fcf6c8c416
1 changed files with 5 additions and 3 deletions

View File

@ -105,9 +105,11 @@ void mailbox_stream_write(size_t offset, const void *src, size_t bytes)
static inline
void mailbox_sw_reg_write(size_t offset, uint32_t src)
{
*((volatile uint32_t*)(MAILBOX_SW_REG_BASE + offset)) = src;
dcache_writeback_region((void *)(MAILBOX_SW_REG_BASE + offset),
sizeof(src));
volatile uint32_t *ptr;
ptr = (volatile uint32_t *)(MAILBOX_SW_REG_BASE + offset);
ptr = cache_to_uncache(ptr);
*ptr = src;
}
#endif /* __SOF_LIB_MAILBOX_H__ */