[ARM] 5092/1: Fix the I-cache invalidation on ARMv6 and later CPUs
This patch adds the I-cache invalidation in update_mmu_cache if the corresponding vma is marked as executable. It also invalidates the I-cache if a thread migrates to a CPU it never ran on. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:

committed by
Russell King

parent
43df5220e4
commit
826cbdaff2
@@ -144,13 +144,17 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long addr, pte_t pte)
|
||||
page = pfn_to_page(pfn);
|
||||
mapping = page_mapping(page);
|
||||
if (mapping) {
|
||||
#ifndef CONFIG_SMP
|
||||
int dirty = test_and_clear_bit(PG_dcache_dirty, &page->flags);
|
||||
|
||||
if (dirty)
|
||||
__flush_dcache_page(mapping, page);
|
||||
#endif
|
||||
|
||||
if (cache_is_vivt())
|
||||
make_coherent(mapping, vma, addr, pfn);
|
||||
else if (vma->vm_flags & VM_EXEC)
|
||||
__flush_icache_all();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user