Skip to content

Commit 9d32497

Browse files
committed
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 <[email protected]> Reported-by: Arun Kumar Neelakantam <[email protected]> Signed-off-by: Bjorn Andersson <[email protected]>
1 parent ed608eb commit 9d32497

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/rpmsg/qcom_glink_smem.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,9 @@ static void glink_smem_tx_write(struct qcom_glink_pipe *glink_pipe,
183183
if (head >= pipe->native.length)
184184
head -= pipe->native.length;
185185

186+
/* Ensure ordering of fifo and head update */
187+
wmb();
188+
186189
*pipe->head = cpu_to_le32(head);
187190
}
188191

0 commit comments

Comments
 (0)