Home
last modified time | relevance | path

Searched refs:pfns (Results 1 – 25 of 27) sorted by relevance

12

/linux-6.12.1/drivers/iommu/iommufd/
Dpages.c268 unsigned long *pfns; member
279 batch->pfns[0] = 0; in batch_clear()
297 batch->pfns[0] = batch->pfns[batch->end - 1] + in batch_clear_carry()
310 batch->pfns[0] += skip_pfns; in batch_skip_carry()
318 const size_t elmsz = sizeof(*batch->pfns) + sizeof(*batch->npfns); in __batch_init()
321 batch->pfns = temp_kmalloc(&size, backup, backup_len); in __batch_init()
322 if (!batch->pfns) in __batch_init()
327 batch->npfns = (u32 *)(batch->pfns + batch->array_size); in __batch_init()
345 if (batch->pfns != backup) in batch_destroy()
346 kfree(batch->pfns); in batch_destroy()
[all …]
Dselftest.c126 struct xarray pfns; member
222 ent = xa_load(&mock->pfns, cur / MOCK_IO_PAGE_SIZE); in mock_test_and_clear_dirty()
232 old = xa_store(&mock->pfns, cur / MOCK_IO_PAGE_SIZE, in mock_test_and_clear_dirty()
258 ent = xa_load(&mock->pfns, iova / MOCK_IO_PAGE_SIZE); in mock_domain_read_and_clear_dirty()
297 xa_init(&mock->pfns); in mock_domain_alloc_paging()
372 WARN_ON(!xa_empty(&mock->pfns)); in mock_domain_free()
406 old = xa_store(&mock->pfns, iova / MOCK_IO_PAGE_SIZE, in mock_domain_map_pages()
413 xa_erase(&mock->pfns, in mock_domain_map_pages()
446 ent = xa_erase(&mock->pfns, iova / MOCK_IO_PAGE_SIZE); in mock_domain_unmap_pages()
487 ent = xa_load(&mock->pfns, iova / MOCK_IO_PAGE_SIZE); in mock_domain_iova_to_phys()
[all …]
/linux-6.12.1/drivers/xen/
Dxlate_mmu.c193 xen_pfn_t *pfns; member
201 info->pfns[info->idx++] = gfn; in setup_balloon_gfn()
218 xen_pfn_t *pfns; in xen_xlate_map_ballooned_pages() local
230 pfns = kcalloc(nr_grant_frames, sizeof(pfns[0]), GFP_KERNEL); in xen_xlate_map_ballooned_pages()
231 if (!pfns) { in xen_xlate_map_ballooned_pages()
240 kfree(pfns); in xen_xlate_map_ballooned_pages()
244 data.pfns = pfns; in xen_xlate_map_ballooned_pages()
254 kfree(pfns); in xen_xlate_map_ballooned_pages()
259 *gfns = pfns; in xen_xlate_map_ballooned_pages()
Dprivcmd.c741 xen_pfn_t *pfns = NULL; in privcmd_ioctl_mmap_resource() local
776 pfns = kcalloc(kdata.num, sizeof(*pfns), GFP_KERNEL | __GFP_NOWARN); in privcmd_ioctl_mmap_resource()
777 if (!pfns) { in privcmd_ioctl_mmap_resource()
798 pfns[i] = pfn + (i % XEN_PFN_PER_PAGE); in privcmd_ioctl_mmap_resource()
805 set_xen_guest_handle(xdata.frame_list, pfns); in privcmd_ioctl_mmap_resource()
821 int num, *errs = (int *)pfns; in privcmd_ioctl_mmap_resource()
823 BUILD_BUG_ON(sizeof(*errs) > sizeof(*pfns)); in privcmd_ioctl_mmap_resource()
826 pfns, kdata.num, errs, in privcmd_ioctl_mmap_resource()
845 kfree(pfns); in privcmd_ioctl_mmap_resource()
/linux-6.12.1/drivers/gpu/drm/amd/amdgpu/
Damdgpu_hmm.c177 unsigned long *pfns; in amdgpu_hmm_range_get_pages() local
184 pfns = kvmalloc_array(npages, sizeof(*pfns), GFP_KERNEL); in amdgpu_hmm_range_get_pages()
185 if (unlikely(!pfns)) { in amdgpu_hmm_range_get_pages()
194 hmm_range->hmm_pfns = pfns; in amdgpu_hmm_range_get_pages()
223 hmm_range->hmm_pfns = pfns; in amdgpu_hmm_range_get_pages()
231 pages[i] = hmm_pfn_to_page(pfns[i]); in amdgpu_hmm_range_get_pages()
238 kvfree(pfns); in amdgpu_hmm_range_get_pages()
Dumc_v12_0.c267 uint64_t pa_addr, uint64_t *pfns, int len) in umc_v12_0_lookup_bad_pages_in_a_row() argument
285 pfns[pos++] = retired_page >> AMDGPU_GPU_PAGE_SHIFT; in umc_v12_0_lookup_bad_pages_in_a_row()
292 pfns[pos++] = retired_page >> AMDGPU_GPU_PAGE_SHIFT; in umc_v12_0_lookup_bad_pages_in_a_row()
/linux-6.12.1/drivers/gpu/drm/xe/
Dxe_hmm.c169 unsigned long *pfns, flags = HMM_PFN_REQ_FAULT; in xe_hmm_userptr_populate_range() local
197 pfns = kvmalloc_array(npages, sizeof(*pfns), GFP_KERNEL); in xe_hmm_userptr_populate_range()
198 if (unlikely(!pfns)) in xe_hmm_userptr_populate_range()
210 hmm_range.hmm_pfns = pfns; in xe_hmm_userptr_populate_range()
250 kvfree(pfns); in xe_hmm_userptr_populate_range()
/linux-6.12.1/tools/mm/
Dthpmaps229 def thp_parse(vma, kpageflags, ranges, indexes, vfns, pfns, anons, heads):
399 pfns = pmes & PM_PFN_MASK
400 pfns = pfns[present]
404 pfn_vec = cont_ranges_all([pfns], [pfns])[0]
411 pfns = pfns[thps]
416 ranges = cont_ranges_all([vfns, pfns], [indexes, vfns, pfns])
418 thpstats = thp_parse(vma, kpageflags, ranges, indexes, vfns, pfns, anons, heads)
/linux-6.12.1/drivers/gpu/drm/i915/gem/
Di915_gem_pages.c334 unsigned long stack[32], *pfns = stack, i; in i915_gem_object_map_pfn() local
343 pfns = kvmalloc_array(n_pfn, sizeof(*pfns), GFP_KERNEL); in i915_gem_object_map_pfn()
344 if (!pfns) in i915_gem_object_map_pfn()
350 pfns[i++] = (iomap + addr) >> PAGE_SHIFT; in i915_gem_object_map_pfn()
351 vaddr = vmap_pfn(pfns, n_pfn, pgprot_writecombine(PAGE_KERNEL_IO)); in i915_gem_object_map_pfn()
352 if (pfns != stack) in i915_gem_object_map_pfn()
353 kvfree(pfns); in i915_gem_object_map_pfn()
/linux-6.12.1/Documentation/translations/zh_CN/mm/
Dhmm.rst134 这两个函数都将 CPU 页表条目复制到它们的 pfns 数组参数中。该数组中的每个条目对应于虚拟
171 /* Use pfns array content to update device page table,
185 的故障或快照策略,而不必为 pfns 数组中的每个条目设置它们。
199 range->pfns[index_of_write] = HMM_PFN_REQ_WRITE;
Dmemory-model.rst115 为给定的pfns范围执行足够的内存热插拔来开启 :c:func:`pfn_to_page`,
/linux-6.12.1/drivers/gpu/drm/nouveau/
Dnouveau_svm.h34 void nouveau_pfns_free(u64 *pfns);
36 unsigned long addr, u64 *pfns, unsigned long npages);
Dnouveau_dmem.c665 dma_addr_t *dma_addrs, u64 *pfns) in nouveau_dmem_migrate_chunk() argument
672 args->src[i], dma_addrs + nr_dma, pfns + i); in nouveau_dmem_migrate_chunk()
681 nouveau_pfns_map(svmm, args->vma->vm_mm, args->start, pfns, i); in nouveau_dmem_migrate_chunk()
707 u64 *pfns; in nouveau_dmem_migrate_vma() local
724 pfns = nouveau_pfns_alloc(max); in nouveau_dmem_migrate_vma()
725 if (!pfns) in nouveau_dmem_migrate_vma()
740 pfns); in nouveau_dmem_migrate_vma()
746 nouveau_pfns_free(pfns); in nouveau_dmem_migrate_vma()
Dnouveau_svm.c892 nouveau_pfns_to_args(void *pfns) in nouveau_pfns_to_args() argument
894 return container_of(pfns, struct nouveau_pfnmap_args, p.phys); in nouveau_pfns_to_args()
914 nouveau_pfns_free(u64 *pfns) in nouveau_pfns_free() argument
916 struct nouveau_pfnmap_args *args = nouveau_pfns_to_args(pfns); in nouveau_pfns_free()
923 unsigned long addr, u64 *pfns, unsigned long npages) in nouveau_pfns_map() argument
925 struct nouveau_pfnmap_args *args = nouveau_pfns_to_args(pfns); in nouveau_pfns_map()
/linux-6.12.1/drivers/virtio/
Dvirtio_balloon.c108 __virtio32 pfns[VIRTIO_BALLOON_ARRAY_PFNS_MAX]; member
188 sg_init_one(&sg, vb->pfns, sizeof(vb->pfns[0]) * vb->num_pfns); in tell_host()
227 __virtio32 pfns[], struct page *page) in set_page_pfns() argument
238 pfns[i] = cpu_to_virtio32(vb->vdev, in set_page_pfns()
250 num = min(num, ARRAY_SIZE(vb->pfns)); in fill_balloon()
275 set_page_pfns(vb, vb->pfns + vb->num_pfns, page); in fill_balloon()
314 num = min(num, ARRAY_SIZE(vb->pfns)); in leak_balloon()
324 set_page_pfns(vb, vb->pfns + vb->num_pfns, page); in leak_balloon()
865 set_page_pfns(vb, vb->pfns, newpage); in virtballoon_migratepage()
873 set_page_pfns(vb, vb->pfns, page); in virtballoon_migratepage()
/linux-6.12.1/arch/powerpc/kvm/
Dbook3s_hv_uvmem.c230 unsigned long *pfns; member
255 p->pfns = vcalloc(slot->npages, sizeof(*p->pfns)); in kvmppc_uvmem_slot_init()
256 if (!p->pfns) { in kvmppc_uvmem_slot_init()
280 vfree(p->pfns); in kvmppc_uvmem_slot_free()
299 p->pfns[index] = uvmem_pfn | flag; in kvmppc_mark_gfn()
301 p->pfns[index] = flag; in kvmppc_mark_gfn()
342 if (p->pfns[index] & KVMPPC_GFN_UVMEM_PFN) { in kvmppc_gfn_is_uvmem_pfn()
344 *uvmem_pfn = p->pfns[index] & in kvmppc_gfn_is_uvmem_pfn()
382 if (!(p->pfns[index] & KVMPPC_GFN_FLAG_MASK)) { in kvmppc_next_nontransitioned_gfn()
/linux-6.12.1/mm/
Dsparse.c200 unsigned long pfns; in subsection_map_init() local
202 pfns = min(nr_pages, PAGES_PER_SECTION in subsection_map_init()
205 subsection_mask_set(ms->usage->subsection_map, pfn, pfns); in subsection_map_init()
208 pfns, subsection_map_index(pfn), in subsection_map_init()
209 subsection_map_index(pfn + pfns - 1)); in subsection_map_init()
211 pfn += pfns; in subsection_map_init()
212 nr_pages -= pfns; in subsection_map_init()
Dvmalloc.c3457 unsigned long *pfns; member
3465 unsigned long pfn = data->pfns[data->idx]; in vmap_pfn_apply()
3487 void *vmap_pfn(unsigned long *pfns, unsigned int count, pgprot_t prot) in vmap_pfn() argument
3489 struct vmap_pfn_data data = { .pfns = pfns, .prot = pgprot_nx(prot) }; in vmap_pfn()
/linux-6.12.1/lib/
Dtest_hmm.c209 unsigned long *pfns = range->hmm_pfns; in dmirror_do_fault() local
214 pfn++, pfns++) { in dmirror_do_fault()
222 WARN_ON(*pfns & HMM_PFN_ERROR); in dmirror_do_fault()
223 WARN_ON(!(*pfns & HMM_PFN_VALID)); in dmirror_do_fault()
225 page = hmm_pfn_to_page(*pfns); in dmirror_do_fault()
229 if (*pfns & HMM_PFN_WRITE) in dmirror_do_fault()
332 unsigned long pfns[64]; in dmirror_fault() local
335 .hmm_pfns = pfns, in dmirror_fault()
349 range.end = min(addr + (ARRAY_SIZE(pfns) << PAGE_SHIFT), end); in dmirror_fault()
1169 unsigned long pfns[64]; in dmirror_snapshot() local
[all …]
/linux-6.12.1/drivers/iommu/
Diova.c574 unsigned long pfns[IOVA_MAG_SIZE]; member
625 struct iova *iova = private_find_iova(iovad, mag->pfns[i]); in iova_magazine_free_pfns()
656 for (i = mag->size - 1; mag->pfns[i] > limit_pfn; i--) in iova_magazine_pop()
661 pfn = mag->pfns[i]; in iova_magazine_pop()
662 mag->pfns[i] = mag->pfns[--mag->size]; in iova_magazine_pop()
669 mag->pfns[mag->size++] = pfn; in iova_magazine_push()
/linux-6.12.1/arch/s390/include/asm/
Dgmap.h152 void s390_uv_destroy_pfns(unsigned long count, unsigned long *pfns);
/linux-6.12.1/include/xen/
Dxen-ops.h189 int xen_xlate_map_ballooned_pages(xen_pfn_t **pfns, void **vaddr,
/linux-6.12.1/include/linux/
Dvmalloc.h201 void *vmap_pfn(unsigned long *pfns, unsigned int count, pgprot_t prot);
/linux-6.12.1/arch/s390/mm/
Dgmap.c2814 unsigned long pfns[GATHER_GET_PAGES]; member
2826 p->pfns[p->count] = phys_to_pfn(pte_val(pte)); in s390_gather_pages()
2842 void s390_uv_destroy_pfns(unsigned long count, unsigned long *pfns) in s390_uv_destroy_pfns() argument
2848 folio = pfn_folio(pfns[i]); in s390_uv_destroy_pfns()
2884 s390_uv_destroy_pfns(state.count, state.pfns); in __s390_uv_destroy_range()
/linux-6.12.1/Documentation/mm/
Dhmm.rst199 /* Use pfns array content to update device page table,
216 for each entry in the pfns array.
232 range->pfns[index_of_write] = HMM_PFN_REQ_WRITE;

12