soc/xtensa/intel_adsp/tools: Ack local interrupt before processing IPC

It seems a race can happen between the host acknowledging a DONE
interrupt and the DSP being able to mark some IPC as done. To avoid
this, the host script now always acknowledges the DONE interrupt
_before_ processing the IPC message.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
This commit is contained in:
Ederson de Souza 2022-06-15 13:59:22 -07:00 committed by Anas Nashif
commit 7ab8607e71

View file

@ -654,10 +654,10 @@ async def _main(server):
(last_seq, output) = winstream_read(last_seq)
if output:
adsp_log(output, server)
if dsp.HIPCTDR & 0x80000000:
ipc_command(dsp.HIPCTDR & ~0x80000000, dsp.HIPCTDD)
if dsp.HIPCIDA & 0x80000000:
dsp.HIPCIDA = 1<<31 # must ACK any DONE interrupts that arrive!
if dsp.HIPCTDR & 0x80000000:
ipc_command(dsp.HIPCTDR & ~0x80000000, dsp.HIPCTDD)
class adsp_request_handler(socketserver.BaseRequestHandler):
"""