提交 9d324973 编写于 作者: B Bjorn Andersson

rpmsg: glink: smem: Ensure ordering during tx

Ensure the ordering of the fifo write and the update of the write index,
so that the index is not updated before the data has landed in the fifo.
Acked-By: NChris Lew <clew@codeaurora.org>
Reported-by: NArun Kumar Neelakantam <aneela@codeaurora.org>
Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
上级 ed608eb0
......@@ -183,6 +183,9 @@ static void glink_smem_tx_write(struct qcom_glink_pipe *glink_pipe,
if (head >= pipe->native.length)
head -= pipe->native.length;
/* Ensure ordering of fifo and head update */
wmb();
*pipe->head = cpu_to_le32(head);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册