Lines Matching refs:hmm_range
162 struct hmm_range **phmm_range, bool readonly, in amdgpu_hmm_range_get_pages()
165 struct hmm_range *hmm_range; in amdgpu_hmm_range_get_pages() local
171 hmm_range = kzalloc(sizeof(*hmm_range), GFP_KERNEL); in amdgpu_hmm_range_get_pages()
172 if (unlikely(!hmm_range)) in amdgpu_hmm_range_get_pages()
181 hmm_range->notifier = notifier; in amdgpu_hmm_range_get_pages()
182 hmm_range->default_flags = HMM_PFN_REQ_FAULT; in amdgpu_hmm_range_get_pages()
184 hmm_range->default_flags |= HMM_PFN_REQ_WRITE; in amdgpu_hmm_range_get_pages()
185 hmm_range->hmm_pfns = pfns; in amdgpu_hmm_range_get_pages()
186 hmm_range->start = start; in amdgpu_hmm_range_get_pages()
187 hmm_range->end = start + npages * PAGE_SIZE; in amdgpu_hmm_range_get_pages()
188 hmm_range->dev_private_owner = owner; in amdgpu_hmm_range_get_pages()
195 hmm_range->notifier_seq = mmu_interval_read_begin(notifier); in amdgpu_hmm_range_get_pages()
200 r = hmm_range_fault(hmm_range); in amdgpu_hmm_range_get_pages()
222 *phmm_range = hmm_range; in amdgpu_hmm_range_get_pages()
229 kfree(hmm_range); in amdgpu_hmm_range_get_pages()
234 int amdgpu_hmm_range_get_pages_done(struct hmm_range *hmm_range) in amdgpu_hmm_range_get_pages_done() argument
238 r = mmu_interval_read_retry(hmm_range->notifier, in amdgpu_hmm_range_get_pages_done()
239 hmm_range->notifier_seq); in amdgpu_hmm_range_get_pages_done()
240 kvfree(hmm_range->hmm_pfns); in amdgpu_hmm_range_get_pages_done()
241 kfree(hmm_range); in amdgpu_hmm_range_get_pages_done()