Lines Matching refs:page
84 u64 page = __pa(queue->queue_pages[i]); in ipz_queue_abs_to_offset() local
85 if (addr >= page && addr < page + queue->pagesize) { in ipz_queue_abs_to_offset()
86 *q_offset = addr - page + i * queue->pagesize; in ipz_queue_abs_to_offset()
130 struct ipz_small_queue_page *page; in alloc_small_queue_page() local
136 page = list_entry(pd->free[order].next, in alloc_small_queue_page()
139 page = kmem_cache_zalloc(small_qp_cache, GFP_KERNEL); in alloc_small_queue_page()
140 if (!page) in alloc_small_queue_page()
143 page->page = get_zeroed_page(GFP_KERNEL); in alloc_small_queue_page()
144 if (!page->page) { in alloc_small_queue_page()
145 kmem_cache_free(small_qp_cache, page); in alloc_small_queue_page()
149 list_add(&page->list, &pd->free[order]); in alloc_small_queue_page()
152 bit = find_first_zero_bit(page->bitmap, IPZ_SPAGE_PER_KPAGE >> order); in alloc_small_queue_page()
153 __set_bit(bit, page->bitmap); in alloc_small_queue_page()
154 page->fill++; in alloc_small_queue_page()
156 if (page->fill == IPZ_SPAGE_PER_KPAGE >> order) in alloc_small_queue_page()
157 list_move(&page->list, &pd->full[order]); in alloc_small_queue_page()
161 queue->queue_pages[0] = (void *)(page->page | (bit << (order + 9))); in alloc_small_queue_page()
162 queue->small_page = page; in alloc_small_queue_page()
175 struct ipz_small_queue_page *page = queue->small_page; in free_small_queue_page() local
184 __clear_bit(bit, page->bitmap); in free_small_queue_page()
185 page->fill--; in free_small_queue_page()
187 if (page->fill == 0) { in free_small_queue_page()
188 list_del(&page->list); in free_small_queue_page()
192 if (page->fill == (IPZ_SPAGE_PER_KPAGE >> order) - 1) in free_small_queue_page()
194 list_move_tail(&page->list, &pd->free[order]); in free_small_queue_page()
199 free_page(page->page); in free_small_queue_page()
200 kmem_cache_free(small_qp_cache, page); in free_small_queue_page()