1
0
Fork 0

ARC: [mm] optimise VIPT dcache aliasing 1/x

flush_cache_page() - kills icache only if page is executable

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
hifive-unleashed-5.1
Vineet Gupta 2013-05-16 12:23:31 +05:30
parent 29b93c68bf
commit 5971bc719d
1 changed files with 6 additions and 1 deletions

View File

@ -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,