Skip to content

Commit

Permalink
IDC: fix message cache handling
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
lyakh committed Sep 12, 2023
1 parent bec031a commit 6e865ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/idc/zephyr_idc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit 6e865ec

Please sign in to comment.