Lines Matching refs:last
59 svm_range_check_vm(struct kfd_process *p, uint64_t start, uint64_t last,
77 prange, prange->start, prange->last); in svm_range_unlink()
86 if (prange->it_node.start != 0 && prange->it_node.last != 0) in svm_range_unlink()
94 prange, prange->start, prange->last); in svm_range_add_notifier_locked()
113 prange, prange->start, prange->last); in svm_range_add_to_svms()
117 prange->it_node.last = prange->last; in svm_range_add_to_svms()
126 prange->notifier.interval_tree.last >> PAGE_SHIFT); in svm_range_remove_notifier()
129 prange->notifier.interval_tree.last != 0) in svm_range_remove_notifier()
265 prange->start, prange->last); in svm_range_free()
287 uint64_t last) in svm_range_new() argument
289 uint64_t size = last - start + 1; in svm_range_new()
299 prange->last = last; in svm_range_new()
319 pr_debug("svms 0x%p [0x%llx 0x%llx]\n", svms, start, last); in svm_range_new()
351 prange->start, prange->last); in svm_range_bo_release()
454 prange->svms, prange->start, prange->last); in svm_range_validate_svm_bo()
504 prange->start, prange->last); in svm_range_vram_node_new()
867 uint64_t start, uint64_t last) in svm_range_split_pages() argument
869 uint64_t npages = last - start + 1; in svm_range_split_pages()
885 uint64_t start, uint64_t last) in svm_range_split_nodes() argument
887 uint64_t npages = last - start + 1; in svm_range_split_nodes()
890 new->svms, new, new->start, start, last); in svm_range_split_nodes()
926 uint64_t start, uint64_t last) in svm_range_split_adjust() argument
931 new->svms, new->start, old->start, old->last, start, last); in svm_range_split_adjust()
934 new->last > old->last) { in svm_range_split_adjust()
939 r = svm_range_split_pages(new, old, start, last); in svm_range_split_adjust()
944 r = svm_range_split_nodes(new, old, start, last); in svm_range_split_adjust()
949 old->npages = last - start + 1; in svm_range_split_adjust()
951 old->last = last; in svm_range_split_adjust()
985 svm_range_split(struct svm_range *prange, uint64_t start, uint64_t last, in svm_range_split() argument
989 uint64_t old_last = prange->last; in svm_range_split()
994 old_start, old_last, start, last); in svm_range_split()
996 if (old_start != start && old_last != last) in svm_range_split()
998 if (start < old_start || last > old_last) in svm_range_split()
1003 *new = svm_range_new(svms, last + 1, old_last); in svm_range_split()
1009 r = svm_range_split_adjust(*new, prange, start, last); in svm_range_split()
1012 r, old_start, old_last, start, last); in svm_range_split()
1037 int r = svm_range_split(prange, new_start, prange->last, &head); in svm_range_split_head()
1049 pchild, pchild->start, pchild->last, prange, op); in svm_range_add_child()
1079 unsigned long start, last, size; in svm_range_split_by_granularity() local
1088 last = ALIGN(addr + 1, size) - 1; in svm_range_split_by_granularity()
1091 prange->svms, prange->start, prange->last, start, last, size); in svm_range_split_by_granularity()
1094 r = svm_range_split(prange, start, prange->last, &head); in svm_range_split_by_granularity()
1100 if (last < prange->last) { in svm_range_split_by_granularity()
1101 r = svm_range_split(prange, prange->start, last, &tail); in svm_range_split_by_granularity()
1111 prange, prange->start, prange->last, in svm_range_split_by_granularity()
1188 uint64_t start, uint64_t last, in svm_range_unmap_from_gpu() argument
1193 pr_debug("[0x%llx 0x%llx]\n", start, last); in svm_range_unmap_from_gpu()
1196 last, init_pte_value, 0, 0, NULL, NULL, in svm_range_unmap_from_gpu()
1202 unsigned long last) in svm_range_unmap_from_gpus() argument
1213 prange, prange->start, prange->last); in svm_range_unmap_from_gpus()
1217 if (prange->start == start && prange->last == last) { in svm_range_unmap_from_gpus()
1236 start, last, &fence); in svm_range_unmap_from_gpus()
1554 end = (prange->last + 1) << PAGE_SHIFT; in svm_range_validate_and_map()
1690 prange->svms, prange, prange->start, prange->last, in svm_range_restore_work()
1759 unsigned long start, unsigned long last) in svm_range_evict() argument
1769 svms, prange->start, prange->last, start, last); in svm_range_evict()
1776 if (pchild->start <= last && pchild->last >= start) { in svm_range_evict()
1778 pchild->start, pchild->last); in svm_range_evict()
1784 if (prange->start <= last && prange->last >= start) in svm_range_evict()
1792 prange->svms, prange->start, prange->last); in svm_range_evict()
1806 prange->svms, start, last); in svm_range_evict()
1810 l = min(last, pchild->last); in svm_range_evict()
1816 l = min(last, prange->last); in svm_range_evict()
1828 new = svm_range_new(old->svms, old->start, old->last); in svm_range_clone()
1887 unsigned long last = start + size - 1UL; in svm_range_add() local
1894 pr_debug("svms 0x%p [0x%llx 0x%lx]\n", &p->svms, start, last); in svm_range_add()
1900 node = interval_tree_iter_first(&svms->objects, start, last); in svm_range_add()
1906 node->last); in svm_range_add()
1909 next = interval_tree_iter_next(node, start, last); in svm_range_add()
1910 next_start = min(node->last, last) + 1; in svm_range_add()
1914 } else if (node->start < start || node->last > last) { in svm_range_add()
1938 if (node->last > last) { in svm_range_add()
1940 r = svm_range_split_tail(prange, last, in svm_range_add()
1969 if (start <= last) { in svm_range_add()
1970 prange = svm_range_new(svms, start, last); in svm_range_add()
1992 unsigned long last; in svm_range_update_notifier_and_interval_tree() local
1995 last = prange->notifier.interval_tree.last >> PAGE_SHIFT; in svm_range_update_notifier_and_interval_tree()
1997 if (prange->start == start && prange->last == last) in svm_range_update_notifier_and_interval_tree()
2001 prange->svms, prange, start, last, prange->start, in svm_range_update_notifier_and_interval_tree()
2002 prange->last); in svm_range_update_notifier_and_interval_tree()
2004 if (start != 0 && last != 0) { in svm_range_update_notifier_and_interval_tree()
2009 prange->it_node.last = prange->last; in svm_range_update_notifier_and_interval_tree()
2022 svms, prange, prange->start, prange->last); in svm_range_handle_list_op()
2026 svms, prange, prange->start, prange->last); in svm_range_handle_list_op()
2033 svms, prange, prange->start, prange->last); in svm_range_handle_list_op()
2038 svms, prange, prange->start, prange->last); in svm_range_handle_list_op()
2044 prange->start, prange->last); in svm_range_handle_list_op()
2050 prange, prange->start, prange->last); in svm_range_handle_list_op()
2106 prange->start, prange->last, prange->work_item.op); in svm_range_deferred_list_work()
2181 prange, prange->start, prange->last, op); in svm_range_add_list_work()
2197 unsigned long last) in svm_range_unmap_split() argument
2204 prange->start, prange->last); in svm_range_unmap_split()
2207 if (start > prange->last || last < prange->start) in svm_range_unmap_split()
2213 if (last < tail->last) in svm_range_unmap_split()
2214 svm_range_split(tail, last + 1, tail->last, &head); in svm_range_unmap_split()
2230 unsigned long start, unsigned long last) in svm_range_unmap_from_cpu() argument
2244 prange, prange->start, prange->last, start, last); in svm_range_unmap_from_cpu()
2252 unmap_parent = start <= prange->start && last >= prange->last; in svm_range_unmap_from_cpu()
2257 l = min(last, pchild->last); in svm_range_unmap_from_cpu()
2260 svm_range_unmap_split(mm, prange, pchild, start, last); in svm_range_unmap_from_cpu()
2264 l = min(last, prange->last); in svm_range_unmap_from_cpu()
2267 svm_range_unmap_split(mm, prange, prange, start, last); in svm_range_unmap_from_cpu()
2306 unsigned long last; in svm_range_cpu_invalidate_pagetables() local
2314 last = mni->interval_tree.last; in svm_range_cpu_invalidate_pagetables()
2316 last = min(last, range->end - 1) >> PAGE_SHIFT; in svm_range_cpu_invalidate_pagetables()
2318 start, last, range->start >> PAGE_SHIFT, in svm_range_cpu_invalidate_pagetables()
2321 mni->interval_tree.last >> PAGE_SHIFT, range->event); in svm_range_cpu_invalidate_pagetables()
2330 svm_range_unmap_from_cpu(mni->mm, prange, start, last); in svm_range_cpu_invalidate_pagetables()
2333 svm_range_evict(prange, mni->mm, start, last); in svm_range_cpu_invalidate_pagetables()
2367 addr, prange->start, prange->last, node->start, node->last); in svm_range_from_addr()
2369 if (addr >= prange->start && addr <= prange->last) { in svm_range_from_addr()
2375 if (addr >= pchild->start && addr <= pchild->last) { in svm_range_from_addr()
2377 addr, pchild->start, pchild->last); in svm_range_from_addr()
2455 unsigned long *start, unsigned long *last, in svm_range_get_range_boundaries() argument
2492 if (node->last >= addr) { in svm_range_get_range_boundaries()
2496 start_limit = max(start_limit, node->last + 1); in svm_range_get_range_boundaries()
2500 *last = end_limit - 1; in svm_range_get_range_boundaries()
2504 *start, *last, *is_heap_stack); in svm_range_get_range_boundaries()
2510 svm_range_check_vm_userptr(struct kfd_process *p, uint64_t start, uint64_t last, in svm_range_check_vm_userptr() argument
2540 last << PAGE_SHIFT, in svm_range_check_vm_userptr()
2547 start, last); in svm_range_check_vm_userptr()
2567 unsigned long start, last; in svm_range_create_unregistered_range() local
2574 if (svm_range_get_range_boundaries(p, addr, &start, &last, in svm_range_create_unregistered_range()
2578 r = svm_range_check_vm(p, start, last, &bo_s, &bo_l); in svm_range_create_unregistered_range()
2580 r = svm_range_check_vm_userptr(p, start, last, &bo_s, &bo_l); in svm_range_create_unregistered_range()
2588 last = addr; in svm_range_create_unregistered_range()
2591 prange = svm_range_new(&p->svms, start, last); in svm_range_create_unregistered_range()
2637 svms, prange, prange->start, prange->last); in svm_range_skip_recover()
2643 svms, prange, prange->start, prange->last); in svm_range_skip_recover()
2782 svms, prange->start, prange->last); in svm_range_restore_pages()
2807 svms, prange->start, prange->last); in svm_range_restore_pages()
2813 svms, prange->start, prange->last, best_loc, in svm_range_restore_pages()
2835 r, svms, prange->start, prange->last); in svm_range_restore_pages()
2843 r, svms, prange->start, prange->last); in svm_range_restore_pages()
2939 svm_range_check_vm(struct kfd_process *p, uint64_t start, uint64_t last, in svm_range_check_vm() argument
2958 node = interval_tree_iter_first(&vm->va, start, last); in svm_range_check_vm()
2961 start, last); in svm_range_check_vm()
2966 *bo_l = mapping->last; in svm_range_check_vm()
3084 p->xnack_enabled, &p->svms, prange->start, prange->last, in svm_range_best_prefetch_location()
3209 prange->start, prange->last); in svm_range_evict_svm_bo_worker()
3299 prange->last); in svm_range_set_attr()
3369 uint64_t last = start + size - 1UL; in svm_range_get_attr() local
3432 node = interval_tree_iter_first(&svms->objects, start, last); in svm_range_get_attr()
3453 next = interval_tree_iter_next(node, start, last); in svm_range_get_attr()