cavs-ipc: fix the IPC_COUNTERS debug for multi-core scenarios

In multi-core cases, the IPC could be handled by a secondary DSP core,
which means we need to use ipc_processed_counter with coherent access,
otherwise, the counter may be calculated wrongly.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
This commit is contained in:
Keyon Jie 2021-11-12 17:35:58 +08:00
parent c2e644b701
commit 99dfb38890
1 changed files with 2 additions and 1 deletions

View File

@ -46,9 +46,10 @@ static inline void increment_ipc_received_counter(void)
static inline void increment_ipc_processed_counter(void)
{
static uint32_t ipc_processed_counter;
uint32_t *uncache_counter = cache_to_uncache(&ipc_processed_counter);
mailbox_sw_reg_write(SRAM_REG_FW_IPC_PROCESSED_COUNT,
ipc_processed_counter++);
(*uncache_counter)++);
}
#endif