diff options
author | Will Deacon <will.deacon@arm.com> | 2017-06-23 12:02:38 +0100 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2017-06-23 17:58:02 +0100 |
commit | 77f3445866c39d8866b31d8d9fa47c7c20938e05 (patch) | |
tree | d0cfcf5e936c1e3d584dfbd641003f6a04f95260 /.cocciconfig | |
parent | c1004803b40596c1aabbbc78a6b1b33e4dfd96c6 (diff) | |
download | linux-77f3445866c39d8866b31d8d9fa47c7c20938e05.tar.bz2 |
iommu/io-pgtable-arm: Use dma_wmb() instead of wmb() when publishing table
When writing a new table entry, we must ensure that the contents of the
table is made visible to the SMMU page table walker before the updated
table entry itself.
This is currently achieved using wmb(), which expands to an expensive and
unnecessary DSB instruction. Ideally, we'd just use cmpxchg64_release when
writing the table entry, but this doesn't have memory ordering semantics
on !SMP systems.
Instead, use dma_wmb(), which emits DMB OSHST. Strictly speaking, this
does more than we require (since it targets the outer-shareable domain),
but it's likely to be significantly faster than the DSB approach.
Reported-by: Linu Cherian <linu.cherian@cavium.com>
Suggested-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to '.cocciconfig')
0 files changed, 0 insertions, 0 deletions