[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1463967439-13354-5-git-send-email-zhengsq@rock-chips.com>
Date: Mon, 23 May 2016 09:37:18 +0800
From: Shunqian Zheng <zhengsq@...k-chips.com>
To: joro@...tes.org, heiko@...ech.de
Cc: iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
linux-rockchip@...ts.infradead.org, Simon <xxm@...k-chips.com>
Subject: [PATCH 4/5] iommu/rockchip: add ARM64 cache flush operation for iommu
From: Simon <xxm@...k-chips.com>
Signed-off-by: Simon <xxm@...k-chips.com>
---
drivers/iommu/rockchip-iommu.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c
index 043d18c..1741b65 100644
--- a/drivers/iommu/rockchip-iommu.c
+++ b/drivers/iommu/rockchip-iommu.c
@@ -95,12 +95,16 @@ struct rk_iommu {
static inline void rk_table_flush(u32 *va, unsigned int count)
{
+#if defined(CONFIG_ARM)
phys_addr_t pa_start = virt_to_phys(va);
phys_addr_t pa_end = virt_to_phys(va + count);
size_t size = pa_end - pa_start;
__cpuc_flush_dcache_area(va, size);
outer_flush_range(pa_start, pa_end);
+#elif defined(CONFIG_ARM64)
+ __dma_flush_range(va, va + count);
+#endif
}
static struct rk_iommu_domain *to_rk_domain(struct iommu_domain *dom)
--
1.9.1
Powered by blists - more mailing lists