/drivers/video/omap2/ |
D | vram.c | 59 unsigned pages; member 66 unsigned pages; member 73 unsigned pages) in omap_vram_create_region() argument 82 rm->pages = pages; in omap_vram_create_region() 97 unsigned long paddr, unsigned pages) in omap_vram_create_allocation() argument 108 new->pages = pages; in omap_vram_create_allocation() 129 unsigned pages; in omap_vram_add_region() local 136 pages = size >> PAGE_SHIFT; in omap_vram_add_region() 138 rm = omap_vram_create_region(paddr, pages); in omap_vram_add_region() 170 end = alloc->paddr + (alloc->pages >> PAGE_SHIFT); in omap_vram_free() [all …]
|
/drivers/gpu/drm/ttm/ |
D | ttm_page_alloc.c | 220 static int set_pages_array_wb(struct page **pages, int addrinarray) in set_pages_array_wb() argument 226 unmap_page_from_agp(pages[i]); in set_pages_array_wb() 231 static int set_pages_array_wc(struct page **pages, int addrinarray) in set_pages_array_wc() argument 237 map_page_into_agp(pages[i]); in set_pages_array_wc() 242 static int set_pages_array_uc(struct page **pages, int addrinarray) in set_pages_array_uc() argument 248 map_page_into_agp(pages[i]); in set_pages_array_uc() 276 static void ttm_pages_put(struct page *pages[], unsigned npages) in ttm_pages_put() argument 279 if (set_pages_array_wb(pages, npages)) in ttm_pages_put() 282 __free_page(pages[i]); in ttm_pages_put() 428 static int ttm_set_pages_caching(struct page **pages, in ttm_set_pages_caching() argument [all …]
|
D | ttm_tt.c | 53 ttm->pages = drm_calloc_large(ttm->num_pages, sizeof(void*)); in ttm_tt_alloc_page_directory() 58 ttm->ttm.pages = drm_calloc_large(ttm->ttm.num_pages, sizeof(void*)); in ttm_dma_tt_alloc_page_directory() 120 drm_clflush_pages(ttm->pages, ttm->num_pages); in ttm_tt_set_caching() 123 cur_page = ttm->pages[i]; in ttm_tt_set_caching() 139 cur_page = ttm->pages[j]; in ttm_tt_set_caching() 199 if (!ttm->pages) { in ttm_tt_init() 210 drm_free_large(ttm->pages); in ttm_tt_fini() 211 ttm->pages = NULL; in ttm_tt_fini() 232 if (!ttm->pages || !ttm_dma->dma_address) { in ttm_dma_tt_init() 245 drm_free_large(ttm->pages); in ttm_dma_tt_fini() [all …]
|
/drivers/media/video/ |
D | videobuf2-dma-sg.c | 26 struct page **pages; member 57 buf->pages = kzalloc(buf->sg_desc.num_pages * sizeof(struct page *), in vb2_dma_sg_alloc() 59 if (!buf->pages) in vb2_dma_sg_alloc() 63 buf->pages[i] = alloc_page(GFP_KERNEL | __GFP_ZERO | __GFP_NOWARN); in vb2_dma_sg_alloc() 64 if (NULL == buf->pages[i]) in vb2_dma_sg_alloc() 67 buf->pages[i], PAGE_SIZE, 0); in vb2_dma_sg_alloc() 82 __free_page(buf->pages[i]); in vb2_dma_sg_alloc() 83 kfree(buf->pages); in vb2_dma_sg_alloc() 105 __free_page(buf->pages[i]); in vb2_dma_sg_put() 106 kfree(buf->pages); in vb2_dma_sg_put() [all …]
|
D | videobuf2-vmalloc.c | 25 struct page **pages; member 100 buf->pages = kzalloc(buf->n_pages * sizeof(struct page *), in vb2_vmalloc_get_userptr() 102 if (!buf->pages) in vb2_vmalloc_get_userptr() 109 buf->pages, NULL); in vb2_vmalloc_get_userptr() 113 buf->vaddr = vm_map_ram(buf->pages, buf->n_pages, -1, in vb2_vmalloc_get_userptr() 126 put_page(buf->pages[n_pages]); in vb2_vmalloc_get_userptr() 127 kfree(buf->pages); in vb2_vmalloc_get_userptr() 141 if (buf->pages) { in vb2_vmalloc_put_userptr() 146 set_page_dirty_lock(buf->pages[i]); in vb2_vmalloc_put_userptr() 147 put_page(buf->pages[i]); in vb2_vmalloc_put_userptr() [all …]
|
D | videobuf-dma-sg.c | 95 static struct scatterlist *videobuf_pages_to_sg(struct page **pages, in videobuf_pages_to_sg() argument 101 if (NULL == pages[0]) in videobuf_pages_to_sg() 108 if (PageHighMem(pages[0])) in videobuf_pages_to_sg() 111 sg_set_page(&sglist[0], pages[0], in videobuf_pages_to_sg() 115 if (NULL == pages[i]) in videobuf_pages_to_sg() 117 if (PageHighMem(pages[i])) in videobuf_pages_to_sg() 119 sg_set_page(&sglist[i], pages[i], min_t(size_t, PAGE_SIZE, size), 0); in videobuf_pages_to_sg() 178 dma->pages = kmalloc(dma->nr_pages * sizeof(struct page *), GFP_KERNEL); in videobuf_dma_init_user_locked() 179 if (NULL == dma->pages) in videobuf_dma_init_user_locked() 188 dma->pages, NULL); in videobuf_dma_init_user_locked() [all …]
|
D | videobuf-vmalloc.c | 162 int pages; in __videobuf_iolock() local 179 pages = PAGE_ALIGN(vb->size); in __videobuf_iolock() 192 mem->vaddr = vmalloc_user(pages); in __videobuf_iolock() 194 printk(KERN_ERR "vmalloc (%d pages) failed\n", pages); in __videobuf_iolock() 198 mem->vaddr, pages); in __videobuf_iolock() 238 int retval, pages; in __videobuf_mmap_mapper() local 256 pages = PAGE_ALIGN(vma->vm_end - vma->vm_start); in __videobuf_mmap_mapper() 257 mem->vaddr = vmalloc_user(pages); in __videobuf_mmap_mapper() 259 printk(KERN_ERR "vmalloc (%d pages) failed\n", pages); in __videobuf_mmap_mapper() 262 dprintk(1, "vmalloc is at addr %p (%d pages)\n", mem->vaddr, pages); in __videobuf_mmap_mapper()
|
/drivers/staging/omapdrm/ |
D | omap_gem_helpers.c | 39 struct page *p, **pages; in _drm_gem_get_pages() local 48 pages = drm_malloc_ab(npages, sizeof(struct page *)); in _drm_gem_get_pages() 49 if (pages == NULL) in _drm_gem_get_pages() 58 pages[i] = p; in _drm_gem_get_pages() 80 return pages; in _drm_gem_get_pages() 84 page_cache_release(pages[i]); in _drm_gem_get_pages() 86 drm_free_large(pages); in _drm_gem_get_pages() 95 void _drm_gem_put_pages(struct drm_gem_object *obj, struct page **pages, in _drm_gem_put_pages() argument 104 set_page_dirty(pages[i]); in _drm_gem_put_pages() 107 mark_page_accessed(pages[i]); in _drm_gem_put_pages() [all …]
|
D | omap_gem.c | 29 void _drm_gem_put_pages(struct drm_gem_object *obj, struct page **pages, 87 struct page **pages; member 121 static int get_pages(struct drm_gem_object *obj, struct page ***pages); 216 struct page **pages; in omap_gem_attach_pages() local 218 WARN_ON(omap_obj->pages); in omap_gem_attach_pages() 224 pages = _drm_gem_get_pages(obj, GFP_KERNEL); in omap_gem_attach_pages() 225 if (IS_ERR(pages)) { in omap_gem_attach_pages() 226 dev_err(obj->dev->dev, "could not get pages: %ld\n", PTR_ERR(pages)); in omap_gem_attach_pages() 227 return PTR_ERR(pages); in omap_gem_attach_pages() 237 addrs[i] = dma_map_page(obj->dev->dev, pages[i], in omap_gem_attach_pages() [all …]
|
/drivers/gpu/drm/gma500/ |
D | gtt.c | 82 struct page **pages; in psb_gtt_insert() local 85 if (r->pages == NULL) { in psb_gtt_insert() 93 pages = r->pages; in psb_gtt_insert() 96 set_pages_array_uc(pages, r->npage); in psb_gtt_insert() 100 pte = psb_gtt_mask_pte(page_to_pfn(r->pages[i]), 0); in psb_gtt_insert() 104 pte = psb_gtt_mask_pte(page_to_pfn(r->pages[i]), 0); in psb_gtt_insert() 136 set_pages_array_wb(r->pages, r->npage); in psb_gtt_remove() 169 pte = psb_gtt_mask_pte(page_to_pfn(r->pages[i]), 0); in psb_gtt_roll() 173 pte = psb_gtt_mask_pte(page_to_pfn(r->pages[i]), 0); in psb_gtt_roll() 193 int pages = gt->gem.size / PAGE_SIZE; in psb_gtt_attach_pages() local [all …]
|
/drivers/gpu/drm/exynos/ |
D | exynos_drm_gem.c | 88 struct page *p, **pages; in exynos_gem_get_pages() local 97 pages = drm_malloc_ab(npages, sizeof(struct page *)); in exynos_gem_get_pages() 98 if (pages == NULL) in exynos_gem_get_pages() 107 pages[i] = p; in exynos_gem_get_pages() 110 return pages; in exynos_gem_get_pages() 114 page_cache_release(pages[i]); in exynos_gem_get_pages() 116 drm_free_large(pages); in exynos_gem_get_pages() 121 struct page **pages, in exynos_gem_put_pages() argument 130 set_page_dirty(pages[i]); in exynos_gem_put_pages() 133 mark_page_accessed(pages[i]); in exynos_gem_put_pages() [all …]
|
/drivers/gpu/drm/udl/ |
D | udl_gem.c | 98 if (!obj->pages) in udl_gem_fault() 101 page = obj->pages[page_offset]; in udl_gem_fault() 130 if (obj->pages) in udl_gem_get_pages() 134 BUG_ON(obj->pages != NULL); in udl_gem_get_pages() 135 obj->pages = drm_malloc_ab(page_count, sizeof(struct page *)); in udl_gem_get_pages() 136 if (obj->pages == NULL) in udl_gem_get_pages() 147 obj->pages[i] = page; in udl_gem_get_pages() 153 page_cache_release(obj->pages[i]); in udl_gem_get_pages() 154 drm_free_large(obj->pages); in udl_gem_get_pages() 155 obj->pages = NULL; in udl_gem_get_pages() [all …]
|
/drivers/firewire/ |
D | core-iso.c | 51 buffer->pages = kmalloc(page_count * sizeof(buffer->pages[0]), in fw_iso_buffer_init() 53 if (buffer->pages == NULL) in fw_iso_buffer_init() 57 buffer->pages[i] = alloc_page(GFP_KERNEL | GFP_DMA32 | __GFP_ZERO); in fw_iso_buffer_init() 58 if (buffer->pages[i] == NULL) in fw_iso_buffer_init() 61 address = dma_map_page(card->device, buffer->pages[i], in fw_iso_buffer_init() 64 __free_page(buffer->pages[i]); in fw_iso_buffer_init() 67 set_page_private(buffer->pages[i], address); in fw_iso_buffer_init() 74 address = page_private(buffer->pages[j]); in fw_iso_buffer_init() 77 __free_page(buffer->pages[j]); in fw_iso_buffer_init() 79 kfree(buffer->pages); in fw_iso_buffer_init() [all …]
|
/drivers/gpu/drm/ |
D | drm_scatter.c | 54 for (i = 0; i < entry->pages; i++) { in drm_sg_cleanup() 76 unsigned long pages, i, j; in drm_sg_alloc() local 90 pages = (request->size + PAGE_SIZE - 1) / PAGE_SIZE; in drm_sg_alloc() 91 DRM_DEBUG("size=%ld pages=%ld\n", request->size, pages); in drm_sg_alloc() 93 entry->pages = pages; in drm_sg_alloc() 94 entry->pagelist = kcalloc(pages, sizeof(*entry->pagelist), GFP_KERNEL); in drm_sg_alloc() 100 entry->busaddr = kcalloc(pages, sizeof(*entry->busaddr), GFP_KERNEL); in drm_sg_alloc() 107 entry->virtual = drm_vmalloc_dma(pages << PAGE_SHIFT); in drm_sg_alloc() 118 memset(entry->virtual, 0, pages << PAGE_SHIFT); in drm_sg_alloc() 125 for (i = (unsigned long)entry->virtual, j = 0; j < pages; in drm_sg_alloc() [all …]
|
D | ati_pcigart.c | 60 unsigned long pages; in drm_ati_pcigart_cleanup() local 73 pages = (entry->pages <= max_pages) in drm_ati_pcigart_cleanup() 74 ? entry->pages : max_pages; in drm_ati_pcigart_cleanup() 76 for (i = 0; i < pages; i++) { in drm_ati_pcigart_cleanup() 101 unsigned long pages; in drm_ati_pcigart_init() local 142 pages = (entry->pages <= max_real_pages) in drm_ati_pcigart_init() 143 ? entry->pages : max_real_pages; in drm_ati_pcigart_init() 152 for (i = 0; i < pages; i++) { in drm_ati_pcigart_init()
|
D | drm_cache.c | 50 static void drm_cache_flush_clflush(struct page *pages[], in drm_cache_flush_clflush() argument 57 drm_clflush_page(*pages++); in drm_cache_flush_clflush() 69 drm_clflush_pages(struct page *pages[], unsigned long num_pages) in drm_clflush_pages() argument 74 drm_cache_flush_clflush(pages, num_pages); in drm_clflush_pages() 84 struct page *page = pages[i]; in drm_clflush_pages()
|
/drivers/lguest/x86/ |
D | core.c | 85 static void copy_in_guest_info(struct lg_cpu *cpu, struct lguest_pages *pages) in copy_in_guest_info() argument 93 if (__this_cpu_read(lg_last_cpu) != cpu || cpu->last_pages != pages) { in copy_in_guest_info() 95 cpu->last_pages = pages; in copy_in_guest_info() 103 pages->state.host_cr3 = __pa(current->mm->pgd); in copy_in_guest_info() 108 map_switcher_in_guest(cpu, pages); in copy_in_guest_info() 114 pages->state.guest_tss.sp1 = cpu->esp1; in copy_in_guest_info() 115 pages->state.guest_tss.ss1 = cpu->ss1; in copy_in_guest_info() 119 copy_traps(cpu, pages->state.guest_idt, default_idt_entries); in copy_in_guest_info() 123 copy_gdt(cpu, pages->state.guest_gdt); in copy_in_guest_info() 126 copy_gdt_tls(cpu, pages->state.guest_gdt); in copy_in_guest_info() [all …]
|
/drivers/xen/ |
D | gntdev.c | 87 struct page **pages; member 90 static int unmap_grant_pages(struct grant_map *map, int offset, int pages); 113 if (map->pages) in gntdev_free_map() 114 free_xenballooned_pages(map->count, map->pages); in gntdev_free_map() 115 kfree(map->pages); in gntdev_free_map() 136 add->pages = kcalloc(count, sizeof(add->pages[0]), GFP_KERNEL); in gntdev_alloc_map() 141 NULL == add->pages) in gntdev_alloc_map() 144 if (alloc_xenballooned_pages(count, add->pages, false /* lowmem */)) in gntdev_alloc_map() 211 if (map->pages && !use_ptemod) in gntdev_put_map() 247 pfn_to_kaddr(page_to_pfn(map->pages[i])); in map_grant_pages() [all …]
|
/drivers/md/ |
D | dm-kcopyd.c | 40 struct page_list *pages; member 116 pl->next = kc->pages; in kcopyd_put_pages() 117 kc->pages = pl; in kcopyd_put_pages() 126 unsigned int nr, struct page_list **pages) in kcopyd_get_pages() argument 130 *pages = NULL; in kcopyd_get_pages() 136 pl = kc->pages; in kcopyd_get_pages() 139 kc->pages = pl->next; in kcopyd_get_pages() 142 pl->next = *pages; in kcopyd_get_pages() 143 *pages = pl; in kcopyd_get_pages() 149 if (*pages) in kcopyd_get_pages() [all …]
|
/drivers/gpu/drm/vmwgfx/ |
D | vmwgfx_gmr.c | 37 struct page *pages[], in vmw_gmr2_bind() argument 84 *cmd = page_to_pfn(*pages++); in vmw_gmr2_bind() 86 *((uint64_t *)cmd) = page_to_pfn(*pages++); in vmw_gmr2_bind() 129 struct page *pages[], in vmw_gmr_build_descriptors() argument 167 pfn = page_to_pfn(*pages); in vmw_gmr_build_descriptors() 184 ++pages; in vmw_gmr_build_descriptors() 239 static unsigned long vmw_gmr_count_descriptors(struct page *pages[], in vmw_gmr_count_descriptors() argument 247 pfn = page_to_pfn(*pages++); in vmw_gmr_count_descriptors() 257 struct page *pages[], in vmw_gmr_bind() argument 265 return vmw_gmr2_bind(dev_priv, pages, num_pages, gmr_id); in vmw_gmr_bind() [all …]
|
/drivers/base/ |
D | firmware_class.c | 98 struct page **pages; member 162 __free_page(fw_priv->pages[i]); in fw_dev_release() 163 kfree(fw_priv->pages); in fw_dev_release() 203 if (fw->pages) { in firmware_free_data() 205 __free_page(fw->pages[i]); in firmware_free_data() 206 kfree(fw->pages); in firmware_free_data() 246 __free_page(fw_priv->pages[i]); in firmware_loading_store() 247 kfree(fw_priv->pages); in firmware_loading_store() 248 fw_priv->pages = NULL; in firmware_loading_store() 256 fw_priv->fw->data = vmap(fw_priv->pages, in firmware_loading_store() [all …]
|
/drivers/net/ethernet/mellanox/mlx4/ |
D | en_resources.c | 69 struct page **pages; in mlx4_en_map_buffer() local 75 pages = kmalloc(sizeof *pages * buf->nbufs, GFP_KERNEL); in mlx4_en_map_buffer() 76 if (!pages) in mlx4_en_map_buffer() 80 pages[i] = virt_to_page(buf->page_list[i].buf); in mlx4_en_map_buffer() 82 buf->direct.buf = vmap(pages, buf->nbufs, VM_MAP, PAGE_KERNEL); in mlx4_en_map_buffer() 83 kfree(pages); in mlx4_en_map_buffer()
|
/drivers/dma/ |
D | iovlock.c | 53 struct page **pages; in dma_pin_iovec_pages() local 79 pages = (struct page **) &local_list->page_list[nr_iovecs]; in dma_pin_iovec_pages() 94 page_list->pages = pages; in dma_pin_iovec_pages() 95 pages += page_list->nr_pages; in dma_pin_iovec_pages() 106 page_list->pages, in dma_pin_iovec_pages() 134 set_page_dirty_lock(page_list->pages[j]); in dma_unpin_iovec_pages() 135 page_cache_release(page_list->pages[j]); in dma_unpin_iovec_pages() 183 page_list->pages[page_idx], in dma_memcpy_to_iovec() 252 page_list->pages[page_idx], in dma_memcpy_pg_to_iovec()
|
/drivers/hwmon/pmbus/ |
D | ucd9200.c | 102 info->pages = 0; in ucd9200_probe() 106 info->pages++; in ucd9200_probe() 108 if (!info->pages) { in ucd9200_probe() 112 dev_info(&client->dev, "%d rails configured\n", info->pages); in ucd9200_probe() 122 for (i = 0; i < info->pages; i++) { in ucd9200_probe() 143 if (info->pages > 1) in ucd9200_probe() 153 for (i = 1; i < info->pages; i++) in ucd9200_probe()
|
/drivers/usb/storage/ |
D | alauda.c | 736 unsigned int page, unsigned int pages, unsigned char *data) in alauda_read_block_raw() argument 741 PBA_ZONE(pba), 0, PBA_LO(pba) + page, pages, 0, MEDIA_PORT(us) in alauda_read_block_raw() 745 pba, page, pages); in alauda_read_block_raw() 753 data, (MEDIA_INFO(us).pagesize + 64) * pages, NULL); in alauda_read_block_raw() 763 unsigned int page, unsigned int pages, unsigned char *data) in alauda_read_block() argument 768 rc = alauda_read_block_raw(us, pba, page, pages, data); in alauda_read_block() 773 for (i = 0; i < pages; i++) { in alauda_read_block() 816 unsigned int page, unsigned int pages, in alauda_write_lba() argument 885 for (i = page; i < page+pages; i++) { in alauda_write_lba() 961 unsigned int pages; in alauda_read_data() local [all …]
|