Lines Matching refs:mas

79 static void unmap_region(struct mm_struct *mm, struct ma_state *mas,
153 return mas_prev(&vmi->mas, min); in vma_prev_limit()
1113 MA_STATE(mas, &vma->vm_mm->mm_mt, vma->vm_end, vma->vm_end); in find_mergeable_anon_vma()
1118 next = mas_walk(&mas); in find_mergeable_anon_vma()
1125 prev = mas_prev(&mas, 0); in find_mergeable_anon_vma()
1127 prev = mas_prev(&mas, 0); in find_mergeable_anon_vma()
1576 MA_STATE(mas, &current->mm->mm_mt, 0, 0); in unmapped_area()
1588 if (mas_empty_area(&mas, low_limit, high_limit - 1, length)) in unmapped_area()
1591 gap = mas.index; in unmapped_area()
1593 tmp = mas_next(&mas, ULONG_MAX); in unmapped_area()
1597 mas_reset(&mas); in unmapped_area()
1601 tmp = mas_prev(&mas, 0); in unmapped_area()
1604 mas_reset(&mas); in unmapped_area()
1628 MA_STATE(mas, &current->mm->mm_mt, 0, 0); in unmapped_area_topdown()
1639 if (mas_empty_area_rev(&mas, low_limit, high_limit - 1, length)) in unmapped_area_topdown()
1642 gap = mas.last + 1 - info->length; in unmapped_area_topdown()
1644 gap_end = mas.last; in unmapped_area_topdown()
1645 tmp = mas_next(&mas, ULONG_MAX); in unmapped_area_topdown()
1649 mas_reset(&mas); in unmapped_area_topdown()
1653 tmp = mas_prev(&mas, 0); in unmapped_area_topdown()
1656 mas_reset(&mas); in unmapped_area_topdown()
1906 MA_STATE(mas, &mm->mm_mt, addr, addr); in find_vma_prev()
1908 vma = mas_walk(&mas); in find_vma_prev()
1909 *pprev = mas_prev(&mas, 0); in find_vma_prev()
1911 vma = mas_next(&mas, ULONG_MAX); in find_vma_prev()
1965 MA_STATE(mas, &mm->mm_mt, vma->vm_start, address); in expand_upwards()
1991 mas_prev_range(&mas, address); in expand_upwards()
1993 __mas_set_range(&mas, vma->vm_start, address - 1); in expand_upwards()
1994 if (mas_preallocate(&mas, vma, GFP_KERNEL)) in expand_upwards()
1999 mas_destroy(&mas); in expand_upwards()
2039 mas_store_prealloc(&mas, vma); in expand_upwards()
2049 mas_destroy(&mas); in expand_upwards()
2062 MA_STATE(mas, &mm->mm_mt, vma->vm_start, vma->vm_start); in expand_downwards()
2074 prev = mas_prev(&mas, 0); in expand_downwards()
2084 mas_next_range(&mas, vma->vm_start); in expand_downwards()
2086 __mas_set_range(&mas, address, vma->vm_end - 1); in expand_downwards()
2087 if (mas_preallocate(&mas, vma, GFP_KERNEL)) in expand_downwards()
2092 mas_destroy(&mas); in expand_downwards()
2133 mas_store_prealloc(&mas, vma); in expand_downwards()
2143 mas_destroy(&mas); in expand_downwards()
2306 static inline void remove_mt(struct mm_struct *mm, struct ma_state *mas) in remove_mt() argument
2313 mas_for_each(mas, vma, ULONG_MAX) { in remove_mt()
2329 static void unmap_region(struct mm_struct *mm, struct ma_state *mas, in unmap_region() argument
2335 unsigned long mt_start = mas->index; in unmap_region()
2340 unmap_vmas(&tlb, mas, vma, start, end, tree_end, mm_wr_locked); in unmap_region()
2341 mas_set(mas, mt_start); in unmap_region()
2342 free_pgtables(&tlb, mas, vma, prev ? prev->vm_end : FIRST_USER_ADDRESS, in unmap_region()
2469 mt_init_flags(&mt_detach, vmi->mas.tree->ma_flags & MT_FLAGS_LOCK_MASK); in do_vmi_align_munmap()
2895 unmap_region(mm, &vmi.mas, vma, prev, next, vma->vm_start, in __mmap_region()
3236 MA_STATE(mas, &mm->mm_mt, 0, 0); in exit_mmap()
3245 vma = mas_find(&mas, ULONG_MAX); in exit_mmap()
3257 unmap_vmas(&tlb, &mas, vma, 0, ULONG_MAX, ULONG_MAX, false); in exit_mmap()
3267 mas_set(&mas, vma->vm_end); in exit_mmap()
3268 free_pgtables(&tlb, &mas, vma, FIRST_USER_ADDRESS, in exit_mmap()
3277 mas_set(&mas, vma->vm_end); in exit_mmap()
3284 } while ((vma = mas_find(&mas, ULONG_MAX)) != NULL); in exit_mmap()
3708 MA_STATE(mas, &mm->mm_mt, 0, 0); in mm_take_all_locks()
3720 mas_for_each(&mas, vma, ULONG_MAX) { in mm_take_all_locks()
3726 mas_set(&mas, 0); in mm_take_all_locks()
3727 mas_for_each(&mas, vma, ULONG_MAX) { in mm_take_all_locks()
3735 mas_set(&mas, 0); in mm_take_all_locks()
3736 mas_for_each(&mas, vma, ULONG_MAX) { in mm_take_all_locks()
3744 mas_set(&mas, 0); in mm_take_all_locks()
3745 mas_for_each(&mas, vma, ULONG_MAX) { in mm_take_all_locks()
3804 MA_STATE(mas, &mm->mm_mt, 0, 0); in mm_drop_all_locks()
3809 mas_for_each(&mas, vma, ULONG_MAX) { in mm_drop_all_locks()