Lines Matching refs:mapped
100 struct iova_bitmap_map mapped; member
130 unsigned long pgsize = 1 << bitmap->mapped.pgshift; in iova_bitmap_offset_to_index()
141 unsigned long pgshift = bitmap->mapped.pgshift; in iova_bitmap_index_to_offset()
163 struct iova_bitmap_map *mapped = &bitmap->mapped; in iova_bitmap_get() local
192 FOLL_WRITE, mapped->pages); in iova_bitmap_get()
196 mapped->npages = (unsigned long)ret; in iova_bitmap_get()
198 mapped->iova = iova_bitmap_mapped_iova(bitmap); in iova_bitmap_get()
205 mapped->pgoff = offset_in_page(addr); in iova_bitmap_get()
216 struct iova_bitmap_map *mapped = &bitmap->mapped; in iova_bitmap_put() local
218 if (mapped->npages) { in iova_bitmap_put()
219 unpin_user_pages(mapped->pages, mapped->npages); in iova_bitmap_put()
220 mapped->npages = 0; in iova_bitmap_put()
241 struct iova_bitmap_map *mapped; in iova_bitmap_alloc() local
249 mapped = &bitmap->mapped; in iova_bitmap_alloc()
250 mapped->pgshift = __ffs(page_size); in iova_bitmap_alloc()
256 mapped->iova = iova; in iova_bitmap_alloc()
257 mapped->pages = (struct page **)__get_free_page(GFP_KERNEL); in iova_bitmap_alloc()
258 if (!mapped->pages) { in iova_bitmap_alloc()
282 struct iova_bitmap_map *mapped = &bitmap->mapped; in iova_bitmap_free() local
286 if (mapped->pages) { in iova_bitmap_free()
287 free_page((unsigned long)mapped->pages); in iova_bitmap_free()
288 mapped->pages = NULL; in iova_bitmap_free()
302 bytes = (bitmap->mapped.npages << PAGE_SHIFT) - bitmap->mapped.pgoff; in iova_bitmap_mapped_remaining()
405 struct iova_bitmap_map *mapped = &bitmap->mapped; in iova_bitmap_set() local
406 unsigned long cur_bit = ((iova - mapped->iova) >> in iova_bitmap_set()
407 mapped->pgshift) + mapped->pgoff * BITS_PER_BYTE; in iova_bitmap_set()
408 unsigned long last_bit = (((iova + length - 1) - mapped->iova) >> in iova_bitmap_set()
409 mapped->pgshift) + mapped->pgoff * BITS_PER_BYTE; in iova_bitmap_set()
410 unsigned long last_page_idx = mapped->npages - 1; in iova_bitmap_set()
422 kaddr = kmap_local_page(mapped->pages[page_idx]); in iova_bitmap_set()