From: Simon Date: Wed, 30 Mar 2016 01:34:35 +0000 (+0800) Subject: iommu/rockchip: add ARM64 cache flush operation for iommu X-Git-Tag: firefly_0821_release~2945 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=acbe537f27c92743e29e9a09ac764c3491130d09;p=firefly-linux-kernel-4.4.55.git iommu/rockchip: add ARM64 cache flush operation for iommu Change-Id: I5848ca01a38e902a436b5b4abccfe235e2746cc1 Signed-off-by: Simon --- diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c index e9db6badd5cb..a34e459f560d 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)