Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8e63fdbe authored by Prakash Gupta's avatar Prakash Gupta Committed by Gerrit - the friendly Code Review server
Browse files

iommu/io-pgtable-arm: sync map update before page table walk



'commit 87a91b15 ("iommu/io-pgtable-arm: Centralise sync points")'
added barrier at the end of map so in the case of a coherent IOMMU, to
ensure the page table updates are fully synchronized against a subsequent
page table walk. map_sg would also need the same support.

Change-Id: I3dc3e5cdc133f3b5fc312784fdc98a287e3c83fd
Signed-off-by: default avatarPrakash Gupta <guptap@codeaurora.org>
parent 0b07cbdd
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -694,6 +694,12 @@ static int arm_lpae_map_sg(struct io_pgtable_ops *ops, unsigned long iova,
			ms.num_pte * sizeof(*ms.pte_start),
			DMA_TO_DEVICE);

	/*
	 * Synchronise all PTE updates for the new mapping before there's
	 * a chance for anything to kick off a table walk for the new iova.
	 */
	wmb();

	return mapped;

out_err: