Lines Matching refs:old_addr
135 unsigned long old_addr, unsigned long old_end, in move_ptes() argument
143 unsigned long len = old_end - old_addr; in move_ptes()
170 old_pte = pte_offset_map_lock(mm, old_pmd, old_addr, &old_ptl); in move_ptes()
178 for (; old_addr < old_end; old_pte++, old_addr += PAGE_SIZE, in move_ptes()
183 pte = ptep_get_and_clear(mm, old_addr, old_pte); in move_ptes()
197 pte = move_pte(pte, new_vma->vm_page_prot, old_addr, new_addr); in move_ptes()
256 static bool move_normal_pmd(struct vm_area_struct *vma, unsigned long old_addr, in move_normal_pmd() argument
315 flush_tlb_range(vma, old_addr, old_addr + PMD_SIZE); in move_normal_pmd()
325 unsigned long old_addr, unsigned long new_addr, pmd_t *old_pmd, in move_normal_pmd() argument
333 static bool move_normal_pud(struct vm_area_struct *vma, unsigned long old_addr, in move_normal_pud() argument
373 flush_tlb_range(vma, old_addr, old_addr + PUD_SIZE); in move_normal_pud()
383 unsigned long old_addr, unsigned long new_addr, pud_t *old_pud, in move_normal_pud() argument
391 static bool move_huge_pud(struct vm_area_struct *vma, unsigned long old_addr, in move_huge_pud() argument
423 flush_pud_tlb_range(vma, old_addr, old_addr + HPAGE_PUD_SIZE); in move_huge_pud()
431 static bool move_huge_pud(struct vm_area_struct *vma, unsigned long old_addr, in move_huge_pud() argument
453 unsigned long old_addr, unsigned long old_end, in get_extent() argument
474 next = (old_addr + size) & mask; in get_extent()
476 extent = next - old_addr; in get_extent()
477 if (extent > old_end - old_addr) in get_extent()
478 extent = old_end - old_addr; in get_extent()
490 unsigned long old_addr, unsigned long new_addr, in move_pgt_entry() argument
501 moved = move_normal_pmd(vma, old_addr, new_addr, old_entry, in move_pgt_entry()
505 moved = move_normal_pud(vma, old_addr, new_addr, old_entry, in move_pgt_entry()
510 move_huge_pmd(vma, old_addr, new_addr, old_entry, in move_pgt_entry()
515 move_huge_pud(vma, old_addr, new_addr, old_entry, in move_pgt_entry()
531 unsigned long old_addr, struct vm_area_struct *new_vma, in move_page_tables() argument
543 old_end = old_addr + len; in move_page_tables()
544 flush_cache_range(vma, old_addr, old_end); in move_page_tables()
547 old_addr, old_end); in move_page_tables()
550 for (; old_addr < old_end; old_addr += extent, new_addr += extent) { in move_page_tables()
556 extent = get_extent(NORMAL_PUD, old_addr, old_end, new_addr); in move_page_tables()
558 old_pud = get_old_pud(vma->vm_mm, old_addr); in move_page_tables()
566 move_pgt_entry(HPAGE_PUD, vma, old_addr, new_addr, in move_page_tables()
573 if (move_pgt_entry(NORMAL_PUD, vma, old_addr, new_addr, in move_page_tables()
578 extent = get_extent(NORMAL_PMD, old_addr, old_end, new_addr); in move_page_tables()
579 old_pmd = get_old_pmd(vma->vm_mm, old_addr); in move_page_tables()
588 move_pgt_entry(HPAGE_PMD, vma, old_addr, new_addr, in move_page_tables()
591 split_huge_pmd(vma, old_pmd, old_addr); in move_page_tables()
600 if (move_pgt_entry(NORMAL_PMD, vma, old_addr, new_addr, in move_page_tables()
607 move_ptes(vma, old_pmd, old_addr, old_addr + extent, new_vma, in move_page_tables()
613 return len + old_addr - old_end; /* how much done */ in move_page_tables()
617 unsigned long old_addr, unsigned long old_len, in move_vma() argument
641 if (vma->vm_start != old_addr) in move_vma()
642 err = vma->vm_ops->may_split(vma, old_addr); in move_vma()
643 if (!err && vma->vm_end != old_addr + old_len) in move_vma()
644 err = vma->vm_ops->may_split(vma, old_addr + old_len); in move_vma()
656 err = ksm_madvise(vma, old_addr, old_addr + old_len, in move_vma()
666 new_pgoff = vma->vm_pgoff + ((old_addr - vma->vm_start) >> PAGE_SHIFT); in move_vma()
675 moved_len = move_page_tables(vma, old_addr, new_vma, new_addr, old_len, in move_vma()
689 move_page_tables(new_vma, new_addr, vma, old_addr, moved_len, in move_vma()
693 old_addr = new_addr; in move_vma()
703 if (old_addr > vma->vm_start && in move_vma()
704 old_addr + old_len < vma->vm_end) in move_vma()
733 if (new_vma != vma && vma->vm_start == old_addr && in move_vma()
734 vma->vm_end == (old_addr + old_len)) in move_vma()
742 if (do_munmap(mm, old_addr, old_len, uf_unmap) < 0) { in move_vma()