summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShiraz Hashim <shashim@codeaurora.org>2017-03-01 14:40:16 +0530
committerShiraz Hashim <shashim@codeaurora.org>2017-03-01 14:45:40 +0530
commit847210ab6b76d2ba65b767836772d5a7c839b4da (patch)
treeb9ba5443e211ea8bb2ea1d86410ea3b7d8be30e9
parent2e87440c3e6fbc711714d1109818f8e3c0f1d2a7 (diff)
iommu/io-pgtable-fast: cache clean the last level ptes
While preparing page tables for fastmap, last level ptes are not being cache cleaned. Fix this. Change-Id: I97f894b52484d0d223b15090b94c186bba9af734 Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
-rw-r--r--drivers/iommu/io-pgtable-fast.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/iommu/io-pgtable-fast.c b/drivers/iommu/io-pgtable-fast.c
index 603b983d1916..3582e206db68 100644
--- a/drivers/iommu/io-pgtable-fast.c
+++ b/drivers/iommu/io-pgtable-fast.c
@@ -426,11 +426,16 @@ av8l_fast_prepopulate_pgtables(struct av8l_fast_io_pgtable *data,
for (j = pmd_index(pud), pmd = pud; pmd < pud_next(pud, end);
++j, pmd = pmd_next(pmd, end)) {
av8l_fast_iopte pte, *pudp;
+ void *addr;
page = alloc_page(GFP_KERNEL | __GFP_ZERO);
if (!page)
goto err_free_pages;
pages[pg++] = page;
+
+ addr = page_address(page);
+ dmac_clean_range(addr, addr + SZ_4K);
+
pte = page_to_phys(page) | AV8L_FAST_PTE_TYPE_TABLE;
pudp = data->puds[i] + j;
*pudp = pte;