/Linux-v4.19/net/ceph/ |
D | pagevec.c | 19 struct page **pages; in ceph_get_direct_page_vector() local 23 pages = kmalloc_array(num_pages, sizeof(*pages), GFP_NOFS); in ceph_get_direct_page_vector() 24 if (!pages) in ceph_get_direct_page_vector() 30 num_pages - got, write_page, pages + got); in ceph_get_direct_page_vector() 38 return pages; in ceph_get_direct_page_vector() 41 ceph_put_page_vector(pages, got, false); in ceph_get_direct_page_vector() 46 void ceph_put_page_vector(struct page **pages, int num_pages, bool dirty) in ceph_put_page_vector() argument 52 set_page_dirty_lock(pages[i]); in ceph_put_page_vector() 53 put_page(pages[i]); in ceph_put_page_vector() 55 kvfree(pages); in ceph_put_page_vector() [all …]
|
/Linux-v4.19/mm/ |
D | percpu-vm.c | 34 static struct page **pages; in pcpu_get_pages() local 35 size_t pages_size = pcpu_nr_units * pcpu_unit_pages * sizeof(pages[0]); in pcpu_get_pages() 39 if (!pages) in pcpu_get_pages() 40 pages = pcpu_mem_zalloc(pages_size, GFP_KERNEL); in pcpu_get_pages() 41 return pages; in pcpu_get_pages() 55 struct page **pages, int page_start, int page_end) in pcpu_free_pages() argument 62 struct page *page = pages[pcpu_page_idx(cpu, i)]; in pcpu_free_pages() 83 struct page **pages, int page_start, int page_end, in pcpu_alloc_pages() argument 93 struct page **pagep = &pages[pcpu_page_idx(cpu, i)]; in pcpu_alloc_pages() 104 __free_page(pages[pcpu_page_idx(cpu, i)]); in pcpu_alloc_pages() [all …]
|
D | gup.c | 659 unsigned int gup_flags, struct page **pages, in __get_user_pages() argument 669 VM_BUG_ON(!!pages != !!(gup_flags & FOLL_GET)); in __get_user_pages() 691 pages ? &pages[i] : NULL); in __get_user_pages() 701 i = follow_hugetlb_page(mm, vma, pages, vmas, in __get_user_pages() 742 if (pages) { in __get_user_pages() 743 pages[i] = page; in __get_user_pages() 868 struct page **pages, in __get_user_pages_locked() argument 883 if (pages) in __get_user_pages_locked() 889 ret = __get_user_pages(tsk, mm, start, nr_pages, flags, pages, in __get_user_pages_locked() 901 if (!pages) in __get_user_pages_locked() [all …]
|
D | frame_vector.c | 124 struct page **pages; in put_vaddr_frames() local 128 pages = frame_vector_pages(vec); in put_vaddr_frames() 134 if (WARN_ON(IS_ERR(pages))) in put_vaddr_frames() 137 put_page(pages[i]); in put_vaddr_frames() 156 struct page **pages; in frame_vector_to_pages() local 164 pages = (struct page **)nums; in frame_vector_to_pages() 166 pages[i] = pfn_to_page(nums[i]); in frame_vector_to_pages() 182 struct page **pages; in frame_vector_to_pfns() local 186 pages = (struct page **)(vec->ptrs); in frame_vector_to_pfns() 187 nums = (unsigned long *)pages; in frame_vector_to_pfns() [all …]
|
/Linux-v4.19/fs/isofs/ |
D | compress.c | 47 struct page **pages, unsigned poffset, in zisofs_uncompress_block() argument 73 if (!pages[i]) in zisofs_uncompress_block() 75 memset(page_address(pages[i]), 0, PAGE_SIZE); in zisofs_uncompress_block() 76 flush_dcache_page(pages[i]); in zisofs_uncompress_block() 77 SetPageUptodate(pages[i]); in zisofs_uncompress_block() 127 if (pages[curpage]) { in zisofs_uncompress_block() 128 stream.next_out = page_address(pages[curpage]) in zisofs_uncompress_block() 180 if (pages[curpage]) { in zisofs_uncompress_block() 181 flush_dcache_page(pages[curpage]); in zisofs_uncompress_block() 182 SetPageUptodate(pages[curpage]); in zisofs_uncompress_block() [all …]
|
/Linux-v4.19/drivers/gpu/drm/i915/selftests/ |
D | huge_gem_object.c | 28 struct sg_table *pages) in huge_free_pages() argument 33 for (sg = pages->sgl; sg && nreal--; sg = __sg_next(sg)) in huge_free_pages() 36 sg_free_table(pages); in huge_free_pages() 37 kfree(pages); in huge_free_pages() 46 struct sg_table *pages; in huge_get_pages() local 49 pages = kmalloc(sizeof(*pages), GFP); in huge_get_pages() 50 if (!pages) in huge_get_pages() 53 if (sg_alloc_table(pages, npages, GFP)) { in huge_get_pages() 54 kfree(pages); in huge_get_pages() 58 sg = pages->sgl; in huge_get_pages() [all …]
|
/Linux-v4.19/include/drm/ttm/ |
D | ttm_set_memory.h | 40 static inline int ttm_set_pages_array_wb(struct page **pages, int addrinarray) in ttm_set_pages_array_wb() argument 42 return set_pages_array_wb(pages, addrinarray); in ttm_set_pages_array_wb() 45 static inline int ttm_set_pages_array_wc(struct page **pages, int addrinarray) in ttm_set_pages_array_wc() argument 47 return set_pages_array_wc(pages, addrinarray); in ttm_set_pages_array_wc() 50 static inline int ttm_set_pages_array_uc(struct page **pages, int addrinarray) in ttm_set_pages_array_uc() argument 52 return set_pages_array_uc(pages, addrinarray); in ttm_set_pages_array_uc() 78 static inline int ttm_set_pages_array_wb(struct page **pages, int addrinarray) in ttm_set_pages_array_wb() argument 83 unmap_page_from_agp(pages[i]); in ttm_set_pages_array_wb() 87 static inline int ttm_set_pages_array_wc(struct page **pages, int addrinarray) in ttm_set_pages_array_wc() argument 92 map_page_into_agp(pages[i]); in ttm_set_pages_array_wc() [all …]
|
/Linux-v4.19/drivers/xen/ |
D | xlate_mmu.c | 47 static void xen_for_each_gfn(struct page **pages, unsigned nr_gfn, in xen_for_each_gfn() argument 56 page = pages[i / XEN_PFN_PER_PAGE]; in xen_for_each_gfn() 70 struct page **pages; member 99 struct page *page = info->pages[info->index++]; in remap_pte_fn() 148 struct page **pages) in xen_xlate_remap_gfn_array() argument 163 data.pages = pages; in xen_xlate_remap_gfn_array() 184 int nr, struct page **pages) in xen_xlate_unmap_gfn_range() argument 186 xen_for_each_gfn(pages, nr, unmap_gfn, NULL); in xen_xlate_unmap_gfn_range() 217 struct page **pages; in xen_xlate_map_ballooned_pages() local 226 pages = kcalloc(nr_pages, sizeof(pages[0]), GFP_KERNEL); in xen_xlate_map_ballooned_pages() [all …]
|
/Linux-v4.19/drivers/gpu/drm/xen/ |
D | xen_drm_front_gem.c | 31 struct page **pages; member 50 xen_obj->pages = kvmalloc_array(xen_obj->num_pages, in gem_alloc_pages_array() 52 return !xen_obj->pages ? -ENOMEM : 0; in gem_alloc_pages_array() 57 kvfree(xen_obj->pages); in gem_free_pages_array() 58 xen_obj->pages = NULL; in gem_free_pages_array() 105 xen_obj->pages); in gem_create() 121 xen_obj->pages = drm_gem_get_pages(&xen_obj->base); in gem_create() 122 if (IS_ERR_OR_NULL(xen_obj->pages)) { in gem_create() 123 ret = PTR_ERR(xen_obj->pages); in gem_create() 124 xen_obj->pages = NULL; in gem_create() [all …]
|
/Linux-v4.19/fs/ramfs/ |
D | file-nommu.c | 69 struct page *pages; in ramfs_nommu_expand_for_mapping() local 88 pages = alloc_pages(gfp, order); in ramfs_nommu_expand_for_mapping() 89 if (!pages) in ramfs_nommu_expand_for_mapping() 96 split_page(pages, order); in ramfs_nommu_expand_for_mapping() 100 __free_page(pages + loop); in ramfs_nommu_expand_for_mapping() 104 data = page_address(pages); in ramfs_nommu_expand_for_mapping() 109 struct page *page = pages + loop; in ramfs_nommu_expand_for_mapping() 128 __free_page(pages + loop++); in ramfs_nommu_expand_for_mapping() 211 struct page **pages = NULL, **ptr, *page; in ramfs_nommu_get_unmapped_area() local 227 pages = kcalloc(lpages, sizeof(struct page *), GFP_KERNEL); in ramfs_nommu_get_unmapped_area() [all …]
|
/Linux-v4.19/drivers/gpu/drm/ttm/ |
D | ttm_page_alloc.c | 247 static void ttm_pages_put(struct page *pages[], unsigned npages, in ttm_pages_put() argument 253 if (ttm_set_pages_array_wb(pages, npages)) in ttm_pages_put() 259 if (ttm_set_pages_wb(pages[i], pages_nr)) in ttm_pages_put() 262 __free_pages(pages[i], order); in ttm_pages_put() 442 static int ttm_set_pages_caching(struct page **pages, in ttm_set_pages_caching() argument 449 r = ttm_set_pages_array_uc(pages, cpages); in ttm_set_pages_caching() 454 r = ttm_set_pages_array_wc(pages, cpages); in ttm_set_pages_caching() 469 static void ttm_handle_caching_state_failure(struct list_head *pages, in ttm_handle_caching_state_failure() argument 487 static int ttm_alloc_new_pages(struct list_head *pages, gfp_t gfp_flags, in ttm_alloc_new_pages() argument 519 ttm_handle_caching_state_failure(pages, in ttm_alloc_new_pages() [all …]
|
/Linux-v4.19/arch/s390/mm/ |
D | gup.c | 22 unsigned long end, int write, struct page **pages, int *nr) in gup_pte_range() argument 49 pages[*nr] = page; in gup_pte_range() 58 unsigned long end, int write, struct page **pages, int *nr) in gup_huge_pmd() argument 74 pages[*nr] = page; in gup_huge_pmd() 97 unsigned long end, int write, struct page **pages, int *nr) in gup_pmd_range() argument 121 write, pages, nr)) in gup_pmd_range() 124 write, pages, nr)) in gup_pmd_range() 132 unsigned long end, int write, struct page **pages, int *nr) in gup_huge_pud() argument 148 pages[*nr] = page; in gup_huge_pud() 170 unsigned long end, int write, struct page **pages, int *nr) in gup_pud_range() argument [all …]
|
/Linux-v4.19/fs/squashfs/ |
D | page_actor.c | 32 if (actor->next_page == actor->pages) in cache_next_page() 44 int pages, int length) in squashfs_page_actor_init() argument 51 actor->length = length ? : pages * PAGE_SIZE; in squashfs_page_actor_init() 53 actor->pages = pages; in squashfs_page_actor_init() 73 return actor->pageaddr = actor->next_page == actor->pages ? NULL : in direct_next_page() 84 int pages, int length) in squashfs_page_actor_init_special() argument 91 actor->length = length ? : pages * PAGE_SIZE; in squashfs_page_actor_init_special() 93 actor->pages = pages; in squashfs_page_actor_init_special()
|
D | file_direct.c | 24 int pages, struct page **page, int bytes); 38 int i, n, pages, missing_pages, bytes, res = -ENOMEM; in squashfs_readpage_block() local 46 pages = end_index - start_index + 1; in squashfs_readpage_block() 48 page = kmalloc_array(pages, sizeof(void *), GFP_KERNEL); in squashfs_readpage_block() 56 actor = squashfs_page_actor_init_special(page, pages, 0); in squashfs_readpage_block() 61 for (missing_pages = 0, i = 0, n = start_index; i < pages; i++, n++) { in squashfs_readpage_block() 86 res = squashfs_read_cache(target_page, block, bsize, pages, in squashfs_readpage_block() 107 pageaddr = kmap_atomic(page[pages - 1]); in squashfs_readpage_block() 113 for (i = 0; i < pages; i++) { in squashfs_readpage_block() 130 for (i = 0; i < pages; i++) { in squashfs_readpage_block() [all …]
|
/Linux-v4.19/arch/arm/plat-omap/ |
D | sram.c | 68 int pages; in omap_sram_push() local 76 pages = PAGE_ALIGN(size) / PAGE_SIZE; in omap_sram_push() 78 set_memory_rw(base, pages); in omap_sram_push() 82 set_memory_ro(base, pages); in omap_sram_push() 83 set_memory_x(base, pages); in omap_sram_push() 104 int pages; in omap_map_sram() local 128 pages = PAGE_ALIGN(omap_sram_size) / PAGE_SIZE; in omap_map_sram() 130 set_memory_ro(base, pages); in omap_map_sram() 131 set_memory_x(base, pages); in omap_map_sram()
|
/Linux-v4.19/drivers/staging/android/ion/ |
D | ion_cma_heap.c | 33 struct page *pages; in ion_cma_allocate() local 42 pages = cma_alloc(cma_heap->cma, nr_pages, align, false); in ion_cma_allocate() 43 if (!pages) in ion_cma_allocate() 46 if (PageHighMem(pages)) { in ion_cma_allocate() 48 struct page *page = pages; in ion_cma_allocate() 59 memset(page_address(pages), 0, size); in ion_cma_allocate() 70 sg_set_page(table->sgl, pages, size, 0); in ion_cma_allocate() 72 buffer->priv_virt = pages; in ion_cma_allocate() 79 cma_release(cma_heap->cma, pages, nr_pages); in ion_cma_allocate() 86 struct page *pages = buffer->priv_virt; in ion_cma_free() local [all …]
|
/Linux-v4.19/drivers/gpu/drm/vgem/ |
D | vgem_drv.c | 54 kvfree(vgem_obj->pages); in vgem_gem_free_object() 81 if (obj->pages) { in vgem_gem_fault() 82 get_page(obj->pages[page_offset]); in vgem_gem_fault() 83 vmf->page = obj->pages[page_offset]; in vgem_gem_fault() 288 struct page **pages; in vgem_pin_pages() local 290 pages = drm_gem_get_pages(&bo->base); in vgem_pin_pages() 291 if (IS_ERR(pages)) { in vgem_pin_pages() 294 return pages; in vgem_pin_pages() 297 bo->pages = pages; in vgem_pin_pages() 301 return bo->pages; in vgem_pin_pages() [all …]
|
/Linux-v4.19/arch/sparc/mm/ |
D | gup.c | 23 unsigned long end, int write, struct page **pages, int *nr) in gup_pte_range() argument 62 pages[*nr] = page; in gup_pte_range() 70 unsigned long end, int write, struct page **pages, in gup_huge_pmd() argument 87 pages[*nr] = page; in gup_huge_pmd() 109 unsigned long end, int write, struct page **pages, in gup_huge_pud() argument 126 pages[*nr] = page; in gup_huge_pud() 148 int write, struct page **pages, int *nr) in gup_pmd_range() argument 162 write, pages, nr)) in gup_pmd_range() 165 pages, nr)) in gup_pmd_range() 173 int write, struct page **pages, int *nr) in gup_pud_range() argument [all …]
|
/Linux-v4.19/arch/mips/mm/ |
D | gup.c | 39 int write, struct page **pages, int *nr) in gup_pte_range() argument 55 pages[*nr] = page; in gup_pte_range() 73 int write, struct page **pages, int *nr) in gup_huge_pmd() argument 90 pages[*nr] = page; in gup_huge_pmd() 101 int write, struct page **pages, int *nr) in gup_pmd_range() argument 114 if (!gup_huge_pmd(pmd, addr, next, write, pages,nr)) in gup_pmd_range() 117 if (!gup_pte_range(pmd, addr, next, write, pages,nr)) in gup_pmd_range() 126 int write, struct page **pages, int *nr) in gup_huge_pud() argument 143 pages[*nr] = page; in gup_huge_pud() 154 int write, struct page **pages, int *nr) in gup_pud_range() argument [all …]
|
/Linux-v4.19/net/rds/ |
D | info.c | 65 struct page **pages; member 122 iter->addr = kmap_atomic(*iter->pages); in rds_info_copy() 127 "bytes %lu\n", *iter->pages, iter->addr, in rds_info_copy() 140 iter->pages++; in rds_info_copy() 167 struct page **pages = NULL; in rds_info_getsockopt() local 191 pages = kmalloc_array(nr_pages, sizeof(struct page *), GFP_KERNEL); in rds_info_getsockopt() 192 if (!pages) { in rds_info_getsockopt() 196 ret = get_user_pages_fast(start, nr_pages, 1, pages); in rds_info_getsockopt() 215 iter.pages = pages; in rds_info_getsockopt() 238 for (i = 0; pages && i < nr_pages; i++) in rds_info_getsockopt() [all …]
|
/Linux-v4.19/drivers/gpu/drm/udl/ |
D | udl_gem.c | 112 if (!obj->pages) in udl_gem_fault() 115 page = obj->pages[page_offset]; in udl_gem_fault() 121 struct page **pages; in udl_gem_get_pages() local 123 if (obj->pages) in udl_gem_get_pages() 126 pages = drm_gem_get_pages(&obj->base); in udl_gem_get_pages() 127 if (IS_ERR(pages)) in udl_gem_get_pages() 128 return PTR_ERR(pages); in udl_gem_get_pages() 130 obj->pages = pages; in udl_gem_get_pages() 138 kvfree(obj->pages); in udl_gem_put_pages() 139 obj->pages = NULL; in udl_gem_put_pages() [all …]
|
/Linux-v4.19/Documentation/admin-guide/mm/ |
D | hugetlbpage.rst | 30 persistent hugetlb pages in the kernel's huge page pool. It also displays 32 and surplus huge pages in the pool of huge pages of default size. 48 is the size of the pool of huge pages. 50 is the number of huge pages in the pool that are not yet 53 is short for "reserved," and is the number of huge pages for 55 but no allocation has yet been made. Reserved huge pages 57 huge page from the pool of huge pages at fault time. 59 is short for "surplus," and is the number of huge pages in 61 maximum number of surplus huge pages is controlled by 67 pages of all sizes. [all …]
|
/Linux-v4.19/drivers/gpu/drm/virtio/ |
D | virtgpu_object.c | 38 if (bo->pages) in virtio_gpu_ttm_bo_destroy() 125 struct page **pages = bo->tbo.ttm->pages; in virtio_gpu_object_get_sg_table() local 133 if (bo->pages) in virtio_gpu_object_get_sg_table() 138 bo->pages = kmalloc(sizeof(struct sg_table), GFP_KERNEL); in virtio_gpu_object_get_sg_table() 139 if (!bo->pages) in virtio_gpu_object_get_sg_table() 142 ret = sg_alloc_table_from_pages(bo->pages, pages, nr_pages, 0, in virtio_gpu_object_get_sg_table() 148 kfree(bo->pages); in virtio_gpu_object_get_sg_table() 149 bo->pages = NULL; in virtio_gpu_object_get_sg_table() 155 sg_free_table(bo->pages); in virtio_gpu_object_free_sg_table() 156 kfree(bo->pages); in virtio_gpu_object_free_sg_table() [all …]
|
/Linux-v4.19/arch/m68k/mm/ |
D | sun3kmap.c | 50 unsigned long type, int pages) in do_pmeg_mapin() argument 56 while(pages) { in do_pmeg_mapin() 60 pages--; in do_pmeg_mapin() 69 int pages; in sun3_ioremap() local 88 pages = size / PAGE_SIZE; in sun3_ioremap() 92 while(pages) { in sun3_ioremap() 96 if(seg_pages > pages) in sun3_ioremap() 97 seg_pages = pages; in sun3_ioremap() 101 pages -= seg_pages; in sun3_ioremap()
|
/Linux-v4.19/drivers/gpu/drm/ |
D | drm_scatter.c | 55 for (i = 0; i < entry->pages; i++) { in drm_sg_cleanup() 87 unsigned long pages, i, j; in drm_legacy_sg_alloc() local 104 pages = (request->size + PAGE_SIZE - 1) / PAGE_SIZE; in drm_legacy_sg_alloc() 105 DRM_DEBUG("size=%ld pages=%ld\n", request->size, pages); in drm_legacy_sg_alloc() 107 entry->pages = pages; in drm_legacy_sg_alloc() 108 entry->pagelist = kcalloc(pages, sizeof(*entry->pagelist), GFP_KERNEL); in drm_legacy_sg_alloc() 114 entry->busaddr = kcalloc(pages, sizeof(*entry->busaddr), GFP_KERNEL); in drm_legacy_sg_alloc() 121 entry->virtual = drm_vmalloc_dma(pages << PAGE_SHIFT); in drm_legacy_sg_alloc() 132 memset(entry->virtual, 0, pages << PAGE_SHIFT); in drm_legacy_sg_alloc() 139 for (i = (unsigned long)entry->virtual, j = 0; j < pages; in drm_legacy_sg_alloc() [all …]
|