summaryrefslogtreecommitdiff
path: root/include/linux/atmel-ssc.h
diff options
context:
space:
mode:
authorTomasz Figa <tfiga@chromium.org>2015-04-20 14:43:44 +0300
committerJoerg Roedel <jroedel@suse.de>2015-05-05 18:52:11 +0300
commitd4dd920cc2f6a948f07544caaa22bccb63378a3a (patch)
tree18ccd63fcd755756de6f1dfa8f2664adab9bd1d5 /include/linux/atmel-ssc.h
parent5ebe6afaf0057ac3eaeb98defd5456894b446d22 (diff)
downloadlinux-d4dd920cc2f6a948f07544caaa22bccb63378a3a.tar.xz
iommu/rockchip: Make sure that page table state is coherent
To flush created mappings, current mapping code relies on the fact that during unmap the driver zaps every IOVA being unmapped and that it is enough to zap a single IOVA of page table to remove the entire page table from IOMMU cache. Based on these assumptions the driver was made to simply zap the first IOVA of the mapping being created. This is enough to invalidate first page table, which could be shared with another mapping (and thus could be already present in IOMMU cache), but unfortunately it does not do anything about the last page table that could be shared with other mappings as well. Moreover, the flushing is performed before page table contents are actually modified, so there is a race between the CPU updating the page tables and hardware that could be possibly running at the same time and triggering IOMMU look-ups, which could bring back the page tables back to the cache. To fix both issues, this patch makes the mapping code zap first and last (if they are different) IOVAs of new mapping after the page table is updated. Signed-off-by: Tomasz Figa <tfiga@chromium.org> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Tested-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'include/linux/atmel-ssc.h')
0 files changed, 0 insertions, 0 deletions