Lines Matching refs:pool

67 bool page_pool_get_stats(const struct page_pool *pool,
92 static inline struct page *page_pool_dev_alloc_pages(struct page_pool *pool) in page_pool_dev_alloc_pages() argument
96 return page_pool_alloc_pages(pool, gfp); in page_pool_dev_alloc_pages()
110 static inline struct page *page_pool_dev_alloc_frag(struct page_pool *pool, in page_pool_dev_alloc_frag() argument
116 return page_pool_alloc_frag(pool, offset, size, gfp); in page_pool_dev_alloc_frag()
119 static inline struct page *page_pool_alloc(struct page_pool *pool, in page_pool_alloc() argument
123 unsigned int max_size = PAGE_SIZE << pool->p.order; in page_pool_alloc()
129 return page_pool_alloc_pages(pool, gfp); in page_pool_alloc()
132 page = page_pool_alloc_frag(pool, offset, *size, gfp); in page_pool_alloc()
140 if (pool->frag_offset + *size > max_size) { in page_pool_alloc()
142 pool->frag_offset = max_size; in page_pool_alloc()
161 static inline struct page *page_pool_dev_alloc(struct page_pool *pool, in page_pool_dev_alloc() argument
167 return page_pool_alloc(pool, offset, size, gfp); in page_pool_dev_alloc()
170 static inline void *page_pool_alloc_va(struct page_pool *pool, in page_pool_alloc_va() argument
177 page = page_pool_alloc(pool, &offset, size, gfp & ~__GFP_HIGHMEM); in page_pool_alloc_va()
196 static inline void *page_pool_dev_alloc_va(struct page_pool *pool, in page_pool_dev_alloc_va() argument
201 return page_pool_alloc_va(pool, size, gfp); in page_pool_dev_alloc_va()
212 page_pool_get_dma_dir(const struct page_pool *pool) in page_pool_get_dma_dir() argument
214 return pool->p.dma_dir; in page_pool_get_dma_dir()
311 static inline void page_pool_put_netmem(struct page_pool *pool, in page_pool_put_netmem() argument
323 page_pool_put_unrefed_netmem(pool, netmem, dma_sync_size, allow_direct); in page_pool_put_netmem()
340 static inline void page_pool_put_page(struct page_pool *pool, in page_pool_put_page() argument
345 page_pool_put_netmem(pool, page_to_netmem(page), dma_sync_size, in page_pool_put_page()
349 static inline void page_pool_put_full_netmem(struct page_pool *pool, in page_pool_put_full_netmem() argument
353 page_pool_put_netmem(pool, netmem, -1, allow_direct); in page_pool_put_full_netmem()
365 static inline void page_pool_put_full_page(struct page_pool *pool, in page_pool_put_full_page() argument
368 page_pool_put_netmem(pool, page_to_netmem(page), -1, allow_direct); in page_pool_put_full_page()
379 static inline void page_pool_recycle_direct(struct page_pool *pool, in page_pool_recycle_direct() argument
382 page_pool_put_full_page(pool, page, true); in page_pool_recycle_direct()
396 static inline void page_pool_free_va(struct page_pool *pool, void *va, in page_pool_free_va() argument
399 page_pool_put_page(pool, virt_to_head_page(va), -1, allow_direct); in page_pool_free_va()
436 static inline void page_pool_dma_sync_for_cpu(const struct page_pool *pool, in page_pool_dma_sync_for_cpu() argument
440 dma_sync_single_range_for_cpu(pool->p.dev, in page_pool_dma_sync_for_cpu()
442 offset + pool->p.offset, dma_sync_size, in page_pool_dma_sync_for_cpu()
443 page_pool_get_dma_dir(pool)); in page_pool_dma_sync_for_cpu()
446 static inline bool page_pool_put(struct page_pool *pool) in page_pool_put() argument
448 return refcount_dec_and_test(&pool->user_cnt); in page_pool_put()
451 static inline void page_pool_nid_changed(struct page_pool *pool, int new_nid) in page_pool_nid_changed() argument
453 if (unlikely(pool->p.nid != new_nid)) in page_pool_nid_changed()
454 page_pool_update_nid(pool, new_nid); in page_pool_nid_changed()