From 6e865ecf09065accf1458e276885208ee58f8eb4 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Fri, 8 Sep 2023 15:23:44 +0200 Subject: [PATCH] IDC: fix message cache handling When an IDC message is received from another core, the receiver core doesn't have any useful data for it in cache. Writing back the cache can corrupt the message data. Cache has to be invalidated instead. Signed-off-by: Guennadi Liakhovetski --- src/idc/zephyr_idc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/idc/zephyr_idc.c b/src/idc/zephyr_idc.c index 36b373e1aad8..a04f742e3953 100644 --- a/src/idc/zephyr_idc.c +++ b/src/idc/zephyr_idc.c @@ -63,7 +63,7 @@ static void idc_handler(struct k_p4wq_work *work) int payload = -1; k_spinlock_key_t key; - sys_cache_data_flush_range(msg, sizeof(*msg)); + sys_cache_data_invd_range(msg, sizeof(*msg)); if (msg->size == sizeof(int)) { const int idc_handler_memcpy_err __unused =