Home
last modified time | relevance | path

Searched refs:pgmap (Results 1 – 25 of 34) sorted by relevance

12

/linux/mm/
A Dmemremap.c117 if (pgmap->ops && pgmap->ops->kill) in dev_pagemap_kill()
118 pgmap->ops->kill(pgmap); in dev_pagemap_kill()
125 if (pgmap->ops && pgmap->ops->cleanup) { in dev_pagemap_cleanup()
126 pgmap->ops->cleanup(pgmap); in dev_pagemap_cleanup()
135 if (pgmap->ref == &pgmap->internal_ref) in dev_pagemap_cleanup()
335 if (!pgmap->ops || !pgmap->ops->migrate_to_ram) { in memremap_pages()
366 if (pgmap->ops && (pgmap->ops->kill || pgmap->ops->cleanup)) in memremap_pages()
374 pgmap->ref = &pgmap->internal_ref; in memremap_pages()
376 if (!pgmap->ops || !pgmap->ops->kill || !pgmap->ops->cleanup) { in memremap_pages()
438 pgmap); in devm_memremap_pages()
[all …]
A Dgup.c28 struct dev_pagemap *pgmap; member
525 *pgmap = get_dev_pagemap(pte_pfn(pte), *pgmap); in follow_page_pte()
526 if (*pgmap) in follow_page_pte()
849 if (ctx.pgmap) in follow_page()
1204 if (ctx.pgmap) in __get_user_pages()
2289 pgmap = get_dev_pagemap(pte_pfn(pte), pgmap); in gup_pte_range()
2338 if (pgmap) in gup_pte_range()
2339 put_dev_pagemap(pgmap); in gup_pte_range()
2372 pgmap = get_dev_pagemap(pfn, pgmap); in __gup_device_huge()
2373 if (unlikely(!pgmap)) { in __gup_device_huge()
[all …]
A Dmemory-failure.c1533 struct dev_pagemap *pgmap) in memory_failure_dev_pagemap() argument
1550 if (!pgmap_pfn_valid(pgmap, pfn)) { in memory_failure_dev_pagemap()
1571 if (pgmap->type == MEMORY_DEVICE_PRIVATE) { in memory_failure_dev_pagemap()
1613 put_dev_pagemap(pgmap); in memory_failure_dev_pagemap()
1640 struct dev_pagemap *pgmap; in memory_failure() local
1652 pgmap = get_dev_pagemap(pfn, NULL); in memory_failure()
1653 if (pgmap) in memory_failure()
1655 pgmap); in memory_failure()
A Dhuge_memory.c979 pmd_t *pmd, int flags, struct dev_pagemap **pgmap) in follow_devmap_pmd() argument
1017 *pgmap = get_dev_pagemap(pfn, *pgmap); in follow_devmap_pmd()
1018 if (!*pgmap) in follow_devmap_pmd()
1150 pud_t *pud, int flags, struct dev_pagemap **pgmap) in follow_devmap_pud() argument
1184 *pgmap = get_dev_pagemap(pfn, *pgmap); in follow_devmap_pud()
1185 if (!*pgmap) in follow_devmap_pud()
A Dmemory_hotplug.c258 struct dev_pagemap *pgmap; in pfn_to_online_page() local
287 pgmap = get_dev_pagemap(pfn, NULL); in pfn_to_online_page()
288 put_dev_pagemap(pgmap); in pfn_to_online_page()
291 if (pgmap) in pfn_to_online_page()
A Dswap.c118 put_dev_pagemap(page->pgmap); in __put_page()
944 put_dev_pagemap(page->pgmap); in release_pages()
/linux/include/linux/
A Dmemremap.h78 void (*kill)(struct dev_pagemap *pgmap);
83 void (*cleanup)(struct dev_pagemap *pgmap);
128 if (pgmap->flags & PGMAP_ALTMAP_VALID) in pgmap_altmap()
129 return &pgmap->altmap; in pgmap_altmap()
135 void memunmap_pages(struct dev_pagemap *pgmap);
139 struct dev_pagemap *pgmap);
147 struct dev_pagemap *pgmap) in devm_memremap_pages() argument
159 struct dev_pagemap *pgmap) in devm_memunmap_pages() argument
164 struct dev_pagemap *pgmap) in get_dev_pagemap() argument
193 if (pgmap) in put_dev_pagemap()
[all …]
A Dhuge_mm.h278 pmd_t *pmd, int flags, struct dev_pagemap **pgmap);
280 pud_t *pud, int flags, struct dev_pagemap **pgmap);
455 unsigned long addr, pmd_t *pmd, int flags, struct dev_pagemap **pgmap) in follow_devmap_pmd() argument
461 unsigned long addr, pud_t *pud, int flags, struct dev_pagemap **pgmap) in follow_devmap_pud() argument
A Dmm_types.h177 struct dev_pagemap *pgmap; member
/linux/tools/testing/nvdimm/test/
A Diomap.c103 WARN_ON(!pgmap || !pgmap->ref); in nfit_test_kill()
105 if (pgmap->ops && pgmap->ops->kill) in nfit_test_kill()
106 pgmap->ops->kill(pgmap); in nfit_test_kill()
110 if (pgmap->ops && pgmap->ops->cleanup) { in nfit_test_kill()
111 pgmap->ops->cleanup(pgmap); in nfit_test_kill()
120 struct dev_pagemap *pgmap = in dev_pagemap_percpu_release() local
123 complete(&pgmap->done); in dev_pagemap_percpu_release()
135 if (!pgmap->ref) { in __wrap_devm_memremap_pages()
136 if (pgmap->ops && (pgmap->ops->kill || pgmap->ops->cleanup)) in __wrap_devm_memremap_pages()
144 pgmap->ref = &pgmap->internal_ref; in __wrap_devm_memremap_pages()
[all …]
/linux/drivers/xen/
A Dunpopulated-alloc.c20 struct dev_pagemap *pgmap; in fill_list() local
41 pgmap = kzalloc(sizeof(*pgmap), GFP_KERNEL); in fill_list()
42 if (!pgmap) { in fill_list()
47 pgmap->type = MEMORY_DEVICE_GENERIC; in fill_list()
48 pgmap->range = (struct range) { in fill_list()
52 pgmap->nr_range = 1; in fill_list()
53 pgmap->owner = res; in fill_list()
78 vaddr = memremap_pages(pgmap, NUMA_NO_NODE); in fill_list()
97 kfree(pgmap); in fill_list()
/linux/drivers/pci/
A Dp2pdma.c37 struct dev_pagemap pgmap; member
44 return container_of(pgmap, struct pci_p2pdma_pagemap, pgmap); in to_p2p_pgmap()
175 struct dev_pagemap *pgmap; in pci_p2pdma_add_resource() local
202 pgmap = &p2p_pgmap->pgmap; in pci_p2pdma_add_resource()
204 pgmap->range.end = pgmap->range.start + size - 1; in pci_p2pdma_add_resource()
205 pgmap->nr_range = 1; in pci_p2pdma_add_resource()
206 pgmap->type = MEMORY_DEVICE_PCI_P2PDMA; in pci_p2pdma_add_resource()
222 pgmap->ref); in pci_p2pdma_add_resource()
227 pgmap->range.start, pgmap->range.end); in pci_p2pdma_add_resource()
234 devm_kfree(&pdev->dev, pgmap); in pci_p2pdma_add_resource()
[all …]
/linux/drivers/dax/
A Ddevice.c395 struct dev_pagemap *pgmap; in dev_dax_probe() local
401 pgmap = dev_dax->pgmap; in dev_dax_probe()
402 if (dev_WARN_ONCE(dev, pgmap && dev_dax->nr_range > 1, in dev_dax_probe()
406 if (!pgmap) { in dev_dax_probe()
407 pgmap = devm_kzalloc(dev, sizeof(*pgmap) + sizeof(struct range) in dev_dax_probe()
409 if (!pgmap) in dev_dax_probe()
411 pgmap->nr_range = dev_dax->nr_range; in dev_dax_probe()
424 if (!dev_dax->pgmap) in dev_dax_probe()
425 pgmap->ranges[i] = *range; in dev_dax_probe()
428 pgmap->type = MEMORY_DEVICE_GENERIC; in dev_dax_probe()
[all …]
A Dsuper.c181 struct dev_pagemap *pgmap, *end_pgmap; in generic_fsdax_supported() local
183 pgmap = get_dev_pagemap(pfn_t_to_pfn(pfn), NULL); in generic_fsdax_supported()
185 if (pgmap && pgmap == end_pgmap && pgmap->type == MEMORY_DEVICE_FS_DAX in generic_fsdax_supported()
186 && pfn_t_to_page(pfn)->pgmap == pgmap in generic_fsdax_supported()
187 && pfn_t_to_page(end_pfn)->pgmap == pgmap in generic_fsdax_supported()
191 put_dev_pagemap(pgmap); in generic_fsdax_supported()
A Dbus.h26 struct dev_pagemap *pgmap; member
A Ddax-private.h70 struct dev_pagemap *pgmap; member
A Dbus.c1260 kfree(dev_dax->pgmap); in dev_dax_release()
1313 if (data->pgmap) { in devm_create_dev_dax()
1317 dev_dax->pgmap = kmemdup(data->pgmap, in devm_create_dev_dax()
1319 if (!dev_dax->pgmap) { in devm_create_dev_dax()
1374 kfree(dev_dax->pgmap); in devm_create_dev_dax()
/linux/drivers/dax/pmem/
A Dcore.c20 struct dev_pagemap pgmap = { }; in __dax_pmem_probe() local
34 rc = nvdimm_setup_pfn(nd_pfn, &pgmap); in __dax_pmem_probe()
54 range = pgmap.range; in __dax_pmem_probe()
65 .pgmap = &pgmap, in __dax_pmem_probe()
/linux/drivers/gpu/drm/amd/amdkfd/
A Dkfd_migrate.c935 struct dev_pagemap *pgmap; in svm_migrate_init() local
944 pgmap = &kfddev->pgmap; in svm_migrate_init()
945 memset(pgmap, 0, sizeof(*pgmap)); in svm_migrate_init()
955 pgmap->type = MEMORY_DEVICE_PRIVATE; in svm_migrate_init()
956 pgmap->nr_range = 1; in svm_migrate_init()
957 pgmap->range.start = res->start; in svm_migrate_init()
958 pgmap->range.end = res->end; in svm_migrate_init()
959 pgmap->ops = &svm_migrate_pgmap_ops; in svm_migrate_init()
960 pgmap->owner = SVM_ADEV_PGMAP_OWNER(adev); in svm_migrate_init()
966 r = devm_memremap_pages(adev->dev, pgmap); in svm_migrate_init()
[all …]
A Dkfd_svm.h196 #define KFD_IS_SVM_API_SUPPORTED(dev) ((dev)->pgmap.type != 0)
/linux/drivers/nvdimm/
A Dpmem.c418 rc = nvdimm_setup_pfn(nd_pfn, &pmem->pgmap); in pmem_attach_disk()
447 pmem->pgmap.owner = pmem; in pmem_attach_disk()
450 pmem->pgmap.type = MEMORY_DEVICE_FS_DAX; in pmem_attach_disk()
451 addr = devm_memremap_pages(dev, &pmem->pgmap); in pmem_attach_disk()
455 range_len(&pmem->pgmap.range); in pmem_attach_disk()
457 bb_range = pmem->pgmap.range; in pmem_attach_disk()
460 pmem->pgmap.range.start = res->start; in pmem_attach_disk()
461 pmem->pgmap.range.end = res->end; in pmem_attach_disk()
462 pmem->pgmap.nr_range = 1; in pmem_attach_disk()
463 pmem->pgmap.type = MEMORY_DEVICE_FS_DAX; in pmem_attach_disk()
[all …]
A Dpfn_devs.c673 static int __nvdimm_setup_pfn(struct nd_pfn *nd_pfn, struct dev_pagemap *pgmap) in __nvdimm_setup_pfn() argument
675 struct range *range = &pgmap->range; in __nvdimm_setup_pfn()
676 struct vmem_altmap *altmap = &pgmap->altmap; in __nvdimm_setup_pfn()
696 pgmap->nr_range = 1; in __nvdimm_setup_pfn()
711 pgmap->flags |= PGMAP_ALTMAP_VALID; in __nvdimm_setup_pfn()
835 int nvdimm_setup_pfn(struct nd_pfn *nd_pfn, struct dev_pagemap *pgmap) in nvdimm_setup_pfn() argument
847 return __nvdimm_setup_pfn(nd_pfn, pgmap); in nvdimm_setup_pfn()
A Dpmem.h26 struct dev_pagemap pgmap; member
A Dnd.h667 int nvdimm_setup_pfn(struct nd_pfn *nd_pfn, struct dev_pagemap *pgmap);
670 struct dev_pagemap *pgmap) in nvdimm_setup_pfn() argument
/linux/fs/fuse/
A Dvirtio_fs.c802 struct dev_pagemap *pgmap; in virtio_fs_setup_dax() local
826 pgmap = devm_kzalloc(&vdev->dev, sizeof(*pgmap), GFP_KERNEL); in virtio_fs_setup_dax()
827 if (!pgmap) in virtio_fs_setup_dax()
830 pgmap->type = MEMORY_DEVICE_FS_DAX; in virtio_fs_setup_dax()
837 pgmap->range = (struct range) { in virtio_fs_setup_dax()
841 pgmap->nr_range = 1; in virtio_fs_setup_dax()
843 fs->window_kaddr = devm_memremap_pages(&vdev->dev, pgmap); in virtio_fs_setup_dax()

Completed in 53 milliseconds

12