Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/idc/zephyr_idc.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ int idc_send_msg(struct idc_msg *msg, uint32_t mode)
int ret;
int idc_send_memcpy_err __unused;

if (!cpu_is_core_enabled(target_cpu)) {
tr_err(&zephyr_idc_tr, "Core %u is down, cannot send IDC message", target_cpu);
return -EACCES;
}

k_mutex_lock(&idc_mutex, K_FOREVER);

if (unlikely(work->thread)) {
Expand All @@ -153,10 +158,6 @@ int idc_send_msg(struct idc_msg *msg, uint32_t mode)
work->handler = idc_handler;
work->sync = mode == IDC_BLOCKING;

if (!cpu_is_core_enabled(target_cpu)) {
tr_err(&zephyr_idc_tr, "Core %u is down, cannot sent IDC message", target_cpu);
return -EACCES;
}
if (msg->payload) {
idc_send_memcpy_err = memcpy_s(payload->data, sizeof(payload->data),
msg->payload, msg->size);
Expand Down
Loading