diff options
| author | Liam Mark <lmark@codeaurora.org> | 2017-04-04 12:25:30 -0700 |
|---|---|---|
| committer | Liam Mark <lmark@codeaurora.org> | 2017-04-07 15:45:48 -0700 |
| commit | 9591d38b525d58586150b973164256e1b80d4bcd (patch) | |
| tree | 161230775e9f07ce9a9cf70d6fa613ca1c73bf73 | |
| parent | 26db194916bdb891d9b2865d38cbe8068760d8ce (diff) | |
iommu/io-pgtable-fast: invalidate TLBs on unmap
When not using the "public" fastmap unmap API make sure we
take care of invalidating the TLBs.
Change-Id: Ia74d4ae7d6352bd9ff57247e9fe2ef74daa1ac1c
Signed-off-by: Liam Mark <lmark@codeaurora.org>
| -rw-r--r-- | drivers/iommu/io-pgtable-fast.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iommu/io-pgtable-fast.c b/drivers/iommu/io-pgtable-fast.c index 3582e206db68..2315da8f0114 100644 --- a/drivers/iommu/io-pgtable-fast.c +++ b/drivers/iommu/io-pgtable-fast.c @@ -256,16 +256,17 @@ void av8l_fast_unmap_public(av8l_fast_iopte *ptep, size_t size) __av8l_fast_unmap(ptep, size, true); } -/* upper layer must take care of TLB invalidation */ static size_t av8l_fast_unmap(struct io_pgtable_ops *ops, unsigned long iova, size_t size) { struct av8l_fast_io_pgtable *data = iof_pgtable_ops_to_data(ops); + struct io_pgtable *iop = &data->iop; av8l_fast_iopte *ptep = iopte_pmd_offset(data->pmds, data->base, iova); unsigned long nptes = size >> AV8L_FAST_PAGE_SHIFT; __av8l_fast_unmap(ptep, size, false); dmac_clean_range(ptep, ptep + nptes); + iop->cfg.tlb->tlb_flush_all(iop->cookie); return size; } |
