Lines Matching refs:pool
12 static int pool_op_gen_alloc(struct tee_shm_pool *pool, struct tee_shm *shm,
16 struct gen_pool *genpool = pool->private_data;
30 * This is from a static shared memory pool so no need to register
37 static void pool_op_gen_free(struct tee_shm_pool *pool, struct tee_shm *shm)
39 gen_pool_free(pool->private_data, (unsigned long)shm->kaddr,
44 static void pool_op_gen_destroy_pool(struct tee_shm_pool *pool)
46 gen_pool_destroy(pool->private_data);
47 kfree(pool);
61 struct tee_shm_pool *pool;
68 pool = kzalloc(sizeof(*pool), GFP_KERNEL);
69 if (!pool)
72 pool->private_data = gen_pool_create(min_alloc_order, -1);
73 if (!pool->private_data) {
78 rc = gen_pool_add_virt(pool->private_data, vaddr, paddr, size, -1);
80 gen_pool_destroy(pool->private_data);
84 pool->ops = &pool_ops_generic;
86 return pool;
88 kfree(pool);