Lines Matching refs:npages

50 svm_migrate_gart_map(struct amdgpu_ring *ring, uint64_t npages,  in svm_migrate_gart_map()  argument
66 num_bytes = npages * 8; in svm_migrate_gart_map()
91 amdgpu_gart_map(adev, 0, npages, addr, pte_flags, cpu_addr); in svm_migrate_gart_map()
131 uint64_t *vram, uint64_t npages, in svm_migrate_copy_memory_gart() argument
144 while (npages) { in svm_migrate_copy_memory_gart()
145 size = min(GTT_MAX_PAGES, npages); in svm_migrate_copy_memory_gart()
170 npages -= size; in svm_migrate_copy_memory_gart()
171 if (npages) { in svm_migrate_copy_memory_gart()
274 for (i = 0; i < migrate->npages; i++) { in svm_migrate_successful_pages()
287 for (i = 0; i < migrate->npages; i++) { in svm_migrate_unsuccessful_pages()
300 uint64_t npages = migrate->npages; in svm_migrate_copy_to_vram() local
312 dst = (uint64_t *)(scratch + npages); in svm_migrate_copy_to_vram()
321 npages << PAGE_SHIFT, &cursor); in svm_migrate_copy_to_vram()
322 for (i = j = 0; i < npages; i++) { in svm_migrate_copy_to_vram()
360 if (j >= (cursor.size >> PAGE_SHIFT) - 1 && i < npages - 1) { in svm_migrate_copy_to_vram()
387 for (i = 0, j = 0; i < npages; i += 4, j++) { in svm_migrate_copy_to_vram()
410 uint64_t npages = (end - start) >> PAGE_SHIFT; in svm_migrate_vma_to_vram() local
426 buf = kvcalloc(npages, in svm_migrate_vma_to_vram()
433 migrate.dst = migrate.src + npages; in svm_migrate_vma_to_vram()
434 scratch = (dma_addr_t *)(migrate.dst + npages); in svm_migrate_vma_to_vram()
454 if (cpages != npages) in svm_migrate_vma_to_vram()
456 cpages, npages); in svm_migrate_vma_to_vram()
464 svm_migrate_successful_pages(&migrate), cpages, migrate.npages); in svm_migrate_vma_to_vram()
473 svm_range_dma_unmap(adev->dev, scratch, 0, npages); in svm_migrate_vma_to_vram()
566 dma_addr_t *scratch, uint64_t npages) in svm_migrate_copy_to_ram() argument
581 src = (uint64_t *)(scratch + npages); in svm_migrate_copy_to_ram()
584 for (i = 0, j = 0; i < npages; i++, addr += PAGE_SIZE) { in svm_migrate_copy_to_ram()
672 uint64_t npages = (end - start) >> PAGE_SHIFT; in svm_migrate_vma_to_ram() local
673 unsigned long upages = npages; in svm_migrate_vma_to_ram()
692 buf = kvcalloc(npages, in svm_migrate_vma_to_ram()
699 migrate.dst = migrate.src + npages; in svm_migrate_vma_to_ram()
701 scratch = (dma_addr_t *)(migrate.dst + npages); in svm_migrate_vma_to_ram()
722 if (cpages != npages) in svm_migrate_vma_to_ram()
724 cpages, npages); in svm_migrate_vma_to_ram()
729 scratch, npages); in svm_migrate_vma_to_ram()
734 upages, cpages, migrate.npages); in svm_migrate_vma_to_ram()
743 svm_range_dma_unmap(adev->dev, scratch, 0, npages); in svm_migrate_vma_to_ram()