Skip to content

Commit

Permalink
ARC: [mm] optimise VIPT dcache aliasing 1/x
Browse files Browse the repository at this point in the history
flush_cache_page() - kills icache only if page is executable

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
  • Loading branch information
Vineet Gupta committed Jun 22, 2013
1 parent 29b93c6 commit 5971bc7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion arch/arc/mm/cache_arc700.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5971bc7

Please sign in to comment.