Skip to content

Commit 0197563

Browse files
committed
idc: zephyr: remove unnecessary cache invd/flush calls
The IDC message objects are stored to static "idc_work", so the cache operations are unnecessary when pointers to these messages are passed around. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
1 parent 7507b32 commit 0197563

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/idc/zephyr_idc.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ static void idc_handler(struct k_p4wq_work *work)
7373
int payload = -1;
7474
k_spinlock_key_t key;
7575

76-
/* A message is received from another core, invalidate local cache */
77-
sys_cache_data_invd_range(msg, sizeof(*msg));
76+
__ASSERT_NO_MSG(!is_cached(msg));
7877

7978
if (msg->size == sizeof(int)) {
8079
const int idc_handler_memcpy_err __unused =
@@ -145,8 +144,8 @@ int idc_send_msg(struct idc_msg *msg, uint32_t mode)
145144
/* Temporarily store sender core ID */
146145
msg_cp->core = cpu_get_id();
147146

148-
/* Sending a message to another core, write back local message cache */
149-
sys_cache_data_flush_range(msg_cp, sizeof(*msg_cp));
147+
__ASSERT_NO_MSG(!is_cached(msg_cp));
148+
150149
k_p4wq_submit(q_zephyr_idc + target_cpu, work);
151150

152151
switch (mode) {

0 commit comments

Comments
 (0)