Skip to content

Commit cdb77d8

Browse files
dcpleungnashif
authored andcommitted
soc: intel_adsp/ace: fix IDC processing for sched IPI
The Inter-DSP Communication (IDC) is being used to send sched IPI to other CPU cores. When a core receives an IDC, it needs to ACK it by clearing the BUSY bit in TDR, and also needs to the BUSY bit in TDA to signal done after processing. These two steps are needed to complete one IDC message. If we do only one (and not both), the other side will not be able to send another IDC message as the hardware still thinks the core is processing the IDC message (and thus will not send another one). So add the step to clear the BUSY bit in TDA so we can have multiple sched IPIs. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
1 parent 0e6aee3 commit cdb77d8

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

soc/xtensa/intel_adsp/ace/multiprocessing.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,20 @@
1616

1717
static void ipc_isr(void *arg)
1818
{
19-
IDC[arch_proc_id()].agents[0].ipc.tdr = BIT(31); /* clear BUSY bit */
19+
uint32_t cpu_id = arch_proc_id();
20+
21+
/*
22+
* Clearing the BUSY bits in both TDR and TDA are needed to
23+
* complete an IDC message. If we do only one (and not both),
24+
* the other side will not be able to send another IDC
25+
* message as the hardware still thinks you are processing
26+
* the IDC message (and thus will not send another one).
27+
* On TDR, it is to write one to clear, while on TDA, it is
28+
* to write zero to clear.
29+
*/
30+
IDC[cpu_id].agents[0].ipc.tdr = BIT(31);
31+
IDC[cpu_id].agents[0].ipc.tda = 0;
32+
2033
#ifdef CONFIG_SMP
2134
void z_sched_ipi(void);
2235
z_sched_ipi();

0 commit comments

Comments
 (0)