Lines Matching defs:pool
42 * 3. Dynamic shared memory pool based on alloc_pages()
579 * 3. Dynamic shared memory pool based on alloc_pages()
581 * Implements an OP-TEE specific shared memory pool which is used
587 static int pool_op_alloc(struct tee_shm_pool *pool,
595 return optee_pool_op_alloc_helper(pool, shm, size, align, NULL);
597 return optee_pool_op_alloc_helper(pool, shm, size, align,
601 static void pool_op_free(struct tee_shm_pool *pool,
605 optee_pool_op_free_helper(pool, shm, optee_shm_unregister);
607 optee_pool_op_free_helper(pool, shm, NULL);
610 static void pool_op_destroy_pool(struct tee_shm_pool *pool)
612 kfree(pool);
622 * optee_shm_pool_alloc_pages() - create page-based allocator pool
624 * This pool is used when OP-TEE supports dymanic SHM. In this case
629 struct tee_shm_pool *pool = kzalloc(sizeof(*pool), GFP_KERNEL);
631 if (!pool)
634 pool->ops = &pool_ops;
636 return pool;
1608 struct tee_shm_pool *pool = ERR_PTR(-EINVAL);
1668 pool = optee_shm_pool_alloc_pages();
1674 if (IS_ERR(pool) && (sec_caps & OPTEE_SMC_SEC_CAP_HAVE_RESERVED_SHM)) {
1676 * The static memory pool can use non-zero page offsets so
1689 pool = optee_config_shm_memremap(invoke_fn, &memremaped_shm);
1692 if (IS_ERR(pool))
1693 return PTR_ERR(pool);
1706 teedev = tee_device_alloc(&optee_clnt_desc, NULL, pool, optee);
1713 teedev = tee_device_alloc(&optee_supp_desc, NULL, pool, optee);
1732 optee->pool = pool;
1811 tee_shm_pool_free(pool);