Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

soc: intel_adsp: cavs: mask idc interrupt before halting cpu #65452

Merged
merged 1 commit into from
Nov 22, 2023
Merged
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
8 changes: 7 additions & 1 deletion soc/xtensa/intel_adsp/cavs/multiprocessing.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,19 +186,25 @@ __imr void soc_mp_init(void)

int soc_adsp_halt_cpu(int id)
{
unsigned int irq_mask;

if (id == 0 || id == arch_curr_cpu()->id) {
return -EINVAL;
}

irq_mask = CAVS_L2_IDC;

#ifdef CONFIG_INTEL_ADSP_TIMER
/*
* Mask timer interrupt for this CPU so it won't wake up
* by itself once WFI (wait for interrupt) instruction
* runs.
*/
CAVS_INTCTRL[id].l2.set = CAVS_L2_DWCT0;
irq_mask |= CAVS_L2_DWCT0;
#endif

CAVS_INTCTRL[id].l2.set = irq_mask;

/* Stop sending IPIs to this core */
soc_cpus_active[id] = false;

Expand Down
Loading