Skip to content

Commit

Permalink
ipc4: setdx: error checking on core disabling
Browse files Browse the repository at this point in the history
If operation of disabling secondary core fails at any of the steps, host
will only learn about it after checking the SPA/CPA bits.

This patch adds checking core state after it disabling. If core will be
still active ipc response will report error.

Additionally, it removes an outdated comment.

Signed-off-by: Tomasz Leman <[email protected]>
  • Loading branch information
tmleman authored and pjdobrowolski committed Aug 10, 2022
1 parent 8591087 commit 6c5b590
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ipc/ipc4/handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,10 @@ static int ipc4_module_process_dx(struct ipc4_message_request *ipc4)
}
} else {
cpu_disable_core(core_id);
if (arch_cpu_active(core_id)) {
tr_err(&ipc_tr, "failed to disable core %d", core_id);
return IPC4_FAILURE;
}
}
}

Expand All @@ -879,7 +883,6 @@ static int ipc4_module_process_dx(struct ipc4_message_request *ipc4)
platform_context_save(sof_get());

ipc_get()->pm_prepare_D3 = 1;
/* TODO: prepare for D3 */
}

return IPC4_SUCCESS;
Expand Down

0 comments on commit 6c5b590

Please sign in to comment.