• Home
  • Raw
  • Download

Lines Matching refs:vaddr

25 	void				*vaddr;  member
47 buf->vaddr = vmalloc_user(buf->size); in vb2_vmalloc_alloc()
52 if (!buf->vaddr) { in vb2_vmalloc_alloc()
67 vfree(buf->vaddr); in vb2_vmalloc_put()
72 static void *vb2_vmalloc_get_userptr(void *alloc_ctx, unsigned long vaddr, in vb2_vmalloc_get_userptr() argument
86 offset = vaddr & ~PAGE_MASK; in vb2_vmalloc_get_userptr()
90 vma = find_vma(current->mm, vaddr); in vb2_vmalloc_get_userptr()
92 if (vb2_get_contig_userptr(vaddr, size, &vma, &physp)) in vb2_vmalloc_get_userptr()
95 buf->vaddr = ioremap_nocache(physp, size); in vb2_vmalloc_get_userptr()
96 if (!buf->vaddr) in vb2_vmalloc_get_userptr()
99 first = vaddr >> PAGE_SHIFT; in vb2_vmalloc_get_userptr()
100 last = (vaddr + size - 1) >> PAGE_SHIFT; in vb2_vmalloc_get_userptr()
109 vaddr & PAGE_MASK, buf->n_pages, in vb2_vmalloc_get_userptr()
115 buf->vaddr = vm_map_ram(buf->pages, buf->n_pages, -1, in vb2_vmalloc_get_userptr()
117 if (!buf->vaddr) in vb2_vmalloc_get_userptr()
121 buf->vaddr += offset; in vb2_vmalloc_get_userptr()
140 unsigned long vaddr = (unsigned long)buf->vaddr & PAGE_MASK; in vb2_vmalloc_put_userptr() local
144 if (vaddr) in vb2_vmalloc_put_userptr()
145 vm_unmap_ram((void *)vaddr, buf->n_pages); in vb2_vmalloc_put_userptr()
155 iounmap(buf->vaddr); in vb2_vmalloc_put_userptr()
164 if (!buf->vaddr) { in vb2_vmalloc_vaddr()
170 return buf->vaddr; in vb2_vmalloc_vaddr()
189 ret = remap_vmalloc_range(vma, buf->vaddr, 0); in vb2_vmalloc_mmap()
219 buf->vaddr = dma_buf_vmap(buf->dbuf); in vb2_vmalloc_map_dmabuf()
221 return buf->vaddr ? 0 : -EFAULT; in vb2_vmalloc_map_dmabuf()
228 dma_buf_vunmap(buf->dbuf, buf->vaddr); in vb2_vmalloc_unmap_dmabuf()
229 buf->vaddr = NULL; in vb2_vmalloc_unmap_dmabuf()
236 if (buf->vaddr) in vb2_vmalloc_detach_dmabuf()
237 dma_buf_vunmap(buf->dbuf, buf->vaddr); in vb2_vmalloc_detach_dmabuf()
271 .vaddr = vb2_vmalloc_vaddr,