Lines Matching refs:pool
27 * 4. Dynamic shared memory pool based on alloc_pages()
368 * 4. Dynamic shared memory pool based on alloc_pages()
370 * Implements an OP-TEE specific shared memory pool.
374 static int pool_ffa_op_alloc(struct tee_shm_pool *pool,
377 return optee_pool_op_alloc_helper(pool, shm, size, align,
381 static void pool_ffa_op_free(struct tee_shm_pool *pool,
384 optee_pool_op_free_helper(pool, shm, optee_ffa_shm_unregister);
387 static void pool_ffa_op_destroy_pool(struct tee_shm_pool *pool)
389 kfree(pool);
399 * optee_ffa_shm_pool_alloc_pages() - create page-based allocator pool
401 * This pool is used with OP-TEE over FF-A. In this case command buffers
406 struct tee_shm_pool *pool = kzalloc(sizeof(*pool), GFP_KERNEL);
408 if (!pool)
411 pool->ops = &pool_ffa_ops;
413 return pool;
629 * an argument struct. This is also what the shm pool allocator
791 struct tee_shm_pool *pool;
814 pool = optee_ffa_shm_pool_alloc_pages();
815 if (IS_ERR(pool)) {
816 rc = PTR_ERR(pool);
819 optee->pool = pool;
825 teedev = tee_device_alloc(&optee_ffa_clnt_desc, NULL, optee->pool,
833 teedev = tee_device_alloc(&optee_ffa_supp_desc, NULL, optee->pool,
890 tee_shm_pool_free(pool);