Lines Matching defs:pool
19 #define DEBUGFS_POOL_COUNTER_RESET(pool) (pool->debugfs_pool_counter = 0)
20 #define DEBUGFS_POOL_COUNTER_ADD(pool, add) (pool->debugfs_pool_counter += add)
22 #define DEBUGFS_POOL_COUNTER_RESET(pool)
23 #define DEBUGFS_POOL_COUNTER_ADD(pool, add)
35 int coh901318_pool_create(struct coh901318_pool *pool,
39 spin_lock_init(&pool->lock);
40 pool->dev = dev;
41 pool->dmapool = dma_pool_create("lli_pool", dev, size, align, 0);
43 DEBUGFS_POOL_COUNTER_RESET(pool);
47 int coh901318_pool_destroy(struct coh901318_pool *pool)
50 dma_pool_destroy(pool->dmapool);
55 coh901318_lli_alloc(struct coh901318_pool *pool, unsigned int len)
66 spin_lock(&pool->lock);
68 head = dma_pool_alloc(pool->dmapool, GFP_NOWAIT, &phy);
73 DEBUGFS_POOL_COUNTER_ADD(pool, 1);
83 lli = dma_pool_alloc(pool->dmapool, GFP_NOWAIT, &phy);
88 DEBUGFS_POOL_COUNTER_ADD(pool, 1);
97 spin_unlock(&pool->lock);
102 spin_unlock(&pool->lock);
107 spin_unlock(&pool->lock);
108 coh901318_lli_free(pool, &head);
112 void coh901318_lli_free(struct coh901318_pool *pool,
126 spin_lock(&pool->lock);
130 dma_pool_free(pool->dmapool, l, l->phy_this);
131 DEBUGFS_POOL_COUNTER_ADD(pool, -1);
134 dma_pool_free(pool->dmapool, l, l->phy_this);
135 DEBUGFS_POOL_COUNTER_ADD(pool, -1);
137 spin_unlock(&pool->lock);
142 coh901318_lli_fill_memcpy(struct coh901318_pool *pool,
175 coh901318_lli_fill_single(struct coh901318_pool *pool,
231 coh901318_lli_fill_sg(struct coh901318_pool *pool,
249 spin_lock(&pool->lock);
307 spin_unlock(&pool->lock);
311 spin_unlock(&pool->lock);