From: Vineet Gupta Date: Thu, 16 May 2013 06:53:31 +0000 (+0530) Subject: ARC: [mm] optimise VIPT dcache aliasing 1/x X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5971bc719d1e329401412ae03ab83c2e4768cd2e;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git ARC: [mm] optimise VIPT dcache aliasing 1/x flush_cache_page() - kills icache only if page is executable Signed-off-by: Vineet Gupta --- diff --git a/arch/arc/mm/cache_arc700.c b/arch/arc/mm/cache_arc700.c index 03012a27d590..4e54ef5b4c2a 100644 --- a/arch/arc/mm/cache_arc700.c +++ b/arch/arc/mm/cache_arc700.c @@ -679,7 +679,12 @@ void flush_cache_page(struct vm_area_struct *vma, unsigned long u_vaddr, { unsigned int paddr = pfn << PAGE_SHIFT; - __sync_icache_dcache(paddr, u_vaddr, PAGE_SIZE); + u_vaddr &= PAGE_MASK; + + ___flush_dcache_page(paddr, u_vaddr); + + if (vma->vm_flags & VM_EXEC) + __inv_icache_page(paddr, u_vaddr); } void flush_cache_range(struct vm_area_struct *vma, unsigned long start,