Lines Matching refs:last
77 svm_range_check_vm(struct kfd_process *p, uint64_t start, uint64_t last,
95 prange, prange->start, prange->last); in svm_range_unlink()
104 if (prange->it_node.start != 0 && prange->it_node.last != 0) in svm_range_unlink()
112 prange, prange->start, prange->last); in svm_range_add_notifier_locked()
131 prange, prange->start, prange->last); in svm_range_add_to_svms()
135 prange->it_node.last = prange->last; in svm_range_add_to_svms()
144 prange->notifier.interval_tree.last >> PAGE_SHIFT); in svm_range_remove_notifier()
147 prange->notifier.interval_tree.last != 0) in svm_range_remove_notifier()
282 uint64_t size = (prange->last - prange->start + 1) << PAGE_SHIFT; in svm_range_free()
286 prange->start, prange->last); in svm_range_free()
314 uint64_t last, bool update_mem_usage) in svm_range_new() argument
316 uint64_t size = last - start + 1; in svm_range_new()
335 prange->last = last; in svm_range_new()
354 pr_debug("svms 0x%p [0x%llx 0x%llx]\n", svms, start, last); in svm_range_new()
386 prange->start, prange->last); in svm_range_bo_release()
481 prange->svms, prange->start, prange->last); in svm_range_validate_svm_bo()
531 prange->start, prange->last); in svm_range_vram_node_new()
929 uint64_t start, uint64_t last) in svm_range_split_pages() argument
931 uint64_t npages = last - start + 1; in svm_range_split_pages()
947 uint64_t start, uint64_t last) in svm_range_split_nodes() argument
949 uint64_t npages = last - start + 1; in svm_range_split_nodes()
952 new->svms, new, new->start, start, last); in svm_range_split_nodes()
988 uint64_t start, uint64_t last) in svm_range_split_adjust() argument
993 new->svms, new->start, old->start, old->last, start, last); in svm_range_split_adjust()
996 new->last > old->last) { in svm_range_split_adjust()
1001 r = svm_range_split_pages(new, old, start, last); in svm_range_split_adjust()
1006 r = svm_range_split_nodes(new, old, start, last); in svm_range_split_adjust()
1011 old->npages = last - start + 1; in svm_range_split_adjust()
1013 old->last = last; in svm_range_split_adjust()
1047 svm_range_split(struct svm_range *prange, uint64_t start, uint64_t last, in svm_range_split() argument
1051 uint64_t old_last = prange->last; in svm_range_split()
1056 old_start, old_last, start, last); in svm_range_split()
1058 if (old_start != start && old_last != last) in svm_range_split()
1060 if (start < old_start || last > old_last) in svm_range_split()
1065 *new = svm_range_new(svms, last + 1, old_last, false); in svm_range_split()
1071 r = svm_range_split_adjust(*new, prange, start, last); in svm_range_split()
1074 r, old_start, old_last, start, last); in svm_range_split()
1099 int r = svm_range_split(prange, new_start, prange->last, &head); in svm_range_split_head()
1111 pchild, pchild->start, pchild->last, prange, op); in svm_range_add_child()
1141 unsigned long start, last, size; in svm_range_split_by_granularity() local
1150 last = ALIGN(addr + 1, size) - 1; in svm_range_split_by_granularity()
1153 prange->svms, prange->start, prange->last, start, last, size); in svm_range_split_by_granularity()
1156 r = svm_range_split(prange, start, prange->last, &head); in svm_range_split_by_granularity()
1162 if (last < prange->last) { in svm_range_split_by_granularity()
1163 r = svm_range_split(prange, prange->start, last, &tail); in svm_range_split_by_granularity()
1173 prange, prange->start, prange->last, in svm_range_split_by_granularity()
1289 uint64_t start, uint64_t last, in svm_range_unmap_from_gpu() argument
1294 pr_debug("[0x%llx 0x%llx]\n", start, last); in svm_range_unmap_from_gpu()
1297 last, init_pte_value, 0, 0, NULL, NULL, in svm_range_unmap_from_gpu()
1303 unsigned long last, uint32_t trigger) in svm_range_unmap_from_gpus() argument
1314 prange, prange->start, prange->last); in svm_range_unmap_from_gpus()
1318 if (prange->start == start && prange->last == last) { in svm_range_unmap_from_gpus()
1336 start, last, trigger); in svm_range_unmap_from_gpus()
1340 start, last, &fence); in svm_range_unmap_from_gpus()
1672 end = (prange->last + 1) << PAGE_SHIFT; in svm_range_validate_and_map()
1807 prange->svms, prange, prange->start, prange->last, in svm_range_restore_work()
1879 unsigned long start, unsigned long last, in svm_range_evict() argument
1890 svms, prange->start, prange->last, start, last); in svm_range_evict()
1902 if (pchild->start <= last && pchild->last >= start) { in svm_range_evict()
1904 pchild->start, pchild->last); in svm_range_evict()
1913 if (prange->start <= last && prange->last >= start) in svm_range_evict()
1921 prange->svms, prange->start, prange->last); in svm_range_evict()
1941 prange->svms, start, last); in svm_range_evict()
1945 l = min(last, pchild->last); in svm_range_evict()
1951 l = min(last, prange->last); in svm_range_evict()
1963 new = svm_range_new(old->svms, old->start, old->last, false); in svm_range_clone()
2015 svm_range_split_new(struct svm_range_list *svms, uint64_t start, uint64_t last, in svm_range_split_new() argument
2023 max_pages, start, last); in svm_range_split_new()
2025 while (last >= start) { in svm_range_split_new()
2026 l = min(last, ALIGN_DOWN(start + max_pages, max_pages) - 1); in svm_range_split_new()
2074 unsigned long last = start + size - 1UL; in svm_range_add() local
2082 pr_debug("svms 0x%p [0x%llx 0x%lx]\n", &p->svms, start, last); in svm_range_add()
2089 node = interval_tree_iter_first(&svms->objects, start, last); in svm_range_add()
2095 node->last); in svm_range_add()
2098 next = interval_tree_iter_next(node, start, last); in svm_range_add()
2099 next_start = min(node->last, last) + 1; in svm_range_add()
2104 } else if (node->start < start || node->last > last) { in svm_range_add()
2128 if (node->last > last) { in svm_range_add()
2130 r = svm_range_split_tail(prange, last, in svm_range_add()
2156 if (start <= last) in svm_range_add()
2157 r = svm_range_split_new(svms, start, last, in svm_range_add()
2179 unsigned long last; in svm_range_update_notifier_and_interval_tree() local
2182 last = prange->notifier.interval_tree.last >> PAGE_SHIFT; in svm_range_update_notifier_and_interval_tree()
2184 if (prange->start == start && prange->last == last) in svm_range_update_notifier_and_interval_tree()
2188 prange->svms, prange, start, last, prange->start, in svm_range_update_notifier_and_interval_tree()
2189 prange->last); in svm_range_update_notifier_and_interval_tree()
2191 if (start != 0 && last != 0) { in svm_range_update_notifier_and_interval_tree()
2196 prange->it_node.last = prange->last; in svm_range_update_notifier_and_interval_tree()
2209 svms, prange, prange->start, prange->last); in svm_range_handle_list_op()
2213 svms, prange, prange->start, prange->last); in svm_range_handle_list_op()
2220 svms, prange, prange->start, prange->last); in svm_range_handle_list_op()
2225 svms, prange, prange->start, prange->last); in svm_range_handle_list_op()
2231 prange->start, prange->last); in svm_range_handle_list_op()
2237 prange, prange->start, prange->last); in svm_range_handle_list_op()
2301 prange->start, prange->last, prange->work_item.op); in svm_range_deferred_list_work()
2378 prange, prange->start, prange->last, op); in svm_range_add_list_work()
2394 unsigned long last) in svm_range_unmap_split() argument
2401 prange->start, prange->last); in svm_range_unmap_split()
2404 if (start > prange->last || last < prange->start) in svm_range_unmap_split()
2410 if (last < tail->last) in svm_range_unmap_split()
2411 svm_range_split(tail, last + 1, tail->last, &head); in svm_range_unmap_split()
2427 unsigned long start, unsigned long last) in svm_range_unmap_from_cpu() argument
2442 prange, prange->start, prange->last, start, last); in svm_range_unmap_from_cpu()
2450 unmap_parent = start <= prange->start && last >= prange->last; in svm_range_unmap_from_cpu()
2455 l = min(last, pchild->last); in svm_range_unmap_from_cpu()
2458 svm_range_unmap_split(mm, prange, pchild, start, last); in svm_range_unmap_from_cpu()
2462 l = min(last, prange->last); in svm_range_unmap_from_cpu()
2465 svm_range_unmap_split(mm, prange, prange, start, last); in svm_range_unmap_from_cpu()
2504 unsigned long last; in svm_range_cpu_invalidate_pagetables() local
2512 last = mni->interval_tree.last; in svm_range_cpu_invalidate_pagetables()
2514 last = min(last, range->end - 1) >> PAGE_SHIFT; in svm_range_cpu_invalidate_pagetables()
2516 start, last, range->start >> PAGE_SHIFT, in svm_range_cpu_invalidate_pagetables()
2519 mni->interval_tree.last >> PAGE_SHIFT, range->event); in svm_range_cpu_invalidate_pagetables()
2528 svm_range_unmap_from_cpu(mni->mm, prange, start, last); in svm_range_cpu_invalidate_pagetables()
2531 svm_range_evict(prange, mni->mm, start, last, range->event); in svm_range_cpu_invalidate_pagetables()
2565 addr, prange->start, prange->last, node->start, node->last); in svm_range_from_addr()
2567 if (addr >= prange->start && addr <= prange->last) { in svm_range_from_addr()
2573 if (addr >= pchild->start && addr <= pchild->last) { in svm_range_from_addr()
2575 addr, pchild->start, pchild->last); in svm_range_from_addr()
2655 unsigned long *start, unsigned long *last, in svm_range_get_range_boundaries() argument
2689 if (node->last >= addr) { in svm_range_get_range_boundaries()
2693 start_limit = max(start_limit, node->last + 1); in svm_range_get_range_boundaries()
2697 *last = end_limit - 1; in svm_range_get_range_boundaries()
2701 *start, *last, *is_heap_stack); in svm_range_get_range_boundaries()
2707 svm_range_check_vm_userptr(struct kfd_process *p, uint64_t start, uint64_t last, in svm_range_check_vm_userptr() argument
2737 last << PAGE_SHIFT, in svm_range_check_vm_userptr()
2744 start, last); in svm_range_check_vm_userptr()
2764 unsigned long start, last; in svm_range_create_unregistered_range() local
2771 if (svm_range_get_range_boundaries(p, addr, &start, &last, in svm_range_create_unregistered_range()
2775 r = svm_range_check_vm(p, start, last, &bo_s, &bo_l); in svm_range_create_unregistered_range()
2777 r = svm_range_check_vm_userptr(p, start, last, &bo_s, &bo_l); in svm_range_create_unregistered_range()
2785 last = addr; in svm_range_create_unregistered_range()
2788 prange = svm_range_new(&p->svms, start, last, true); in svm_range_create_unregistered_range()
2834 svms, prange, prange->start, prange->last); in svm_range_skip_recover()
2840 svms, prange, prange->start, prange->last); in svm_range_skip_recover()
2989 svms, prange->start, prange->last); in svm_range_restore_pages()
3014 svms, prange->start, prange->last); in svm_range_restore_pages()
3020 svms, prange->start, prange->last, best_loc, in svm_range_restore_pages()
3051 r, svms, prange->start, prange->last); in svm_range_restore_pages()
3059 r, svms, prange->start, prange->last); in svm_range_restore_pages()
3099 size = (pchild->last - pchild->start + 1) << PAGE_SHIFT; in svm_range_switch_xnack_reserve_mem()
3112 size = (prange->last - prange->start + 1) << PAGE_SHIFT; in svm_range_switch_xnack_reserve_mem()
3216 svm_range_check_vm(struct kfd_process *p, uint64_t start, uint64_t last, in svm_range_check_vm() argument
3235 node = interval_tree_iter_first(&vm->va, start, last); in svm_range_check_vm()
3238 start, last); in svm_range_check_vm()
3243 *bo_l = mapping->last; in svm_range_check_vm()
3365 p->xnack_enabled, &p->svms, prange->start, prange->last, in svm_range_best_prefetch_location()
3466 prange->start, prange->last); in svm_range_evict_svm_bo_worker()
3557 prange->last); in svm_range_set_attr()
3629 uint64_t last = start + size - 1UL; in svm_range_get_attr() local
3692 node = interval_tree_iter_first(&svms->objects, start, last); in svm_range_get_attr()
3713 next = interval_tree_iter_next(node, start, last); in svm_range_get_attr()