On Wed, 2018-07-18 at 09:59 +0800, zhigangw wrote:
- This is the second proposal:
Make the "pipeline_xrun_recover()" function atomic, which might avoid this kind of issue.
This is what I suggested yesterday, including making the IPC initiated pipeline OPS atomic too.
But if the "pipeline_xrun_recover()" function has the higher priority than IPC, do you think which event will preempt this function?
It could be preempted by another DMA IRQ, which would cause another XRUN by updating pointers or changing state.
the IPC message process is this function: ipc_process_msg_queue(). I think the IPC message receive and reply has serialized already. before the first message is not processed and replied, the second message will not be received from HOST. maybe I misunderstand your meaning, could you point out the exact location?
The collision between IPC and pipeline ops could come from a pipeline IRQ when processing an IPC message. This will be very rare, but can happen, hence the need to make the pipeline IPC ops atomic.
Liam