@@ -126,8 +126,9 @@ void __update_cache(struct vm_area_struct *vma,
{
struct page *page;
unsigned long pfn = pte_pfn(pte);
+ int exec = (vma->vm_flags & VM_EXEC);
- if (!boot_cpu_data.dcache.n_aliases)
+ if (!boot_cpu_data.dcache.n_aliases && !exec)
return;
page = pfn_to_page(pfn);
@@ -136,7 +137,7 @@ void __update_cache(struct vm_area_struct *vma,
if (dirty) {
unsigned long addr = (unsigned long)page_address(page);
- if (pages_do_alias(addr, address & PAGE_MASK))
+ if (exec || pages_do_alias(addr, address & PAGE_MASK))
__flush_purge_region((void *)addr, PAGE_SIZE);
}
}