mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-07 07:08:07 +00:00
ARM: make_coherent(): fix problems with highpte, part 2
update_mmu_cache() is called with the page table for the faulted-in page still mapped. We need to modify the PTE for this page to ensure coherency with other shared mappings when multiple shared mappings exist within a MM. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
4b3073e1c5
commit
ae1402022e
1 changed files with 4 additions and 3 deletions
|
@ -99,7 +99,8 @@ static int adjust_pte(struct vm_area_struct *vma, unsigned long address,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
make_coherent(struct address_space *mapping, struct vm_area_struct *vma, unsigned long addr, unsigned long pfn)
|
make_coherent(struct address_space *mapping, struct vm_area_struct *vma,
|
||||||
|
unsigned long addr, pte_t *ptep, unsigned long pfn)
|
||||||
{
|
{
|
||||||
struct mm_struct *mm = vma->vm_mm;
|
struct mm_struct *mm = vma->vm_mm;
|
||||||
struct vm_area_struct *mpnt;
|
struct vm_area_struct *mpnt;
|
||||||
|
@ -131,7 +132,7 @@ make_coherent(struct address_space *mapping, struct vm_area_struct *vma, unsigne
|
||||||
}
|
}
|
||||||
flush_dcache_mmap_unlock(mapping);
|
flush_dcache_mmap_unlock(mapping);
|
||||||
if (aliases)
|
if (aliases)
|
||||||
adjust_pte(vma, addr, pfn);
|
do_adjust_pte(vma, addr, pfn, ptep);
|
||||||
else
|
else
|
||||||
flush_cache_page(vma, addr, pfn);
|
flush_cache_page(vma, addr, pfn);
|
||||||
}
|
}
|
||||||
|
@ -174,7 +175,7 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long addr,
|
||||||
#endif
|
#endif
|
||||||
if (mapping) {
|
if (mapping) {
|
||||||
if (cache_is_vivt())
|
if (cache_is_vivt())
|
||||||
make_coherent(mapping, vma, addr, pfn);
|
make_coherent(mapping, vma, addr, ptep, pfn);
|
||||||
else if (vma->vm_flags & VM_EXEC)
|
else if (vma->vm_flags & VM_EXEC)
|
||||||
__flush_icache_all();
|
__flush_icache_all();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue