Lines Matching refs:gfp
46 static void dma_atomic_pool_size_add(gfp_t gfp, size_t size) in dma_atomic_pool_size_add() argument
48 if (gfp & __GFP_DMA) in dma_atomic_pool_size_add()
50 else if (gfp & __GFP_DMA32) in dma_atomic_pool_size_add()
56 static bool cma_in_zone(gfp_t gfp) in cma_in_zone() argument
72 if (IS_ENABLED(CONFIG_ZONE_DMA) && (gfp & GFP_DMA)) in cma_in_zone()
74 if (IS_ENABLED(CONFIG_ZONE_DMA32) && (gfp & GFP_DMA32)) in cma_in_zone()
80 gfp_t gfp) in atomic_pool_expand() argument
92 if (cma_in_zone(gfp)) in atomic_pool_expand()
96 page = alloc_pages(gfp, order); in atomic_pool_expand()
125 dma_atomic_pool_size_add(gfp, pool_size); in atomic_pool_expand()
145 static void atomic_pool_resize(struct gen_pool *pool, gfp_t gfp) in atomic_pool_resize() argument
148 atomic_pool_expand(pool, gen_pool_size(pool), gfp); in atomic_pool_resize()
163 gfp_t gfp) in __dma_atomic_pool_init() argument
174 ret = atomic_pool_expand(pool, pool_size, gfp); in __dma_atomic_pool_init()
178 pool_size >> 10, &gfp); in __dma_atomic_pool_init()
183 gen_pool_size(pool) >> 10, &gfp); in __dma_atomic_pool_init()
224 static inline struct gen_pool *dma_guess_pool(struct gen_pool *prev, gfp_t gfp) in dma_guess_pool() argument
227 if (IS_ENABLED(CONFIG_ZONE_DMA32) && (gfp & GFP_DMA32)) in dma_guess_pool()
229 if (atomic_pool_dma && (gfp & GFP_DMA)) in dma_guess_pool()
266 void **cpu_addr, gfp_t gfp, in dma_alloc_from_pool() argument
272 while ((pool = dma_guess_pool(pool, gfp))) { in dma_alloc_from_pool()