mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 22:51:42 +00:00
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: Chris Lew <clew@codeaurora.org> Reported-by: Arun Kumar Neelakantam <aneela@codeaurora.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
This commit is contained in:
parent
ed608eb0be
commit
9d32497361
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user