Lines Matching +full:op +full:- +full:tee
1 // SPDX-License-Identifier: GPL-2.0-only
7 #include <linux/dma-buf.h>
24 return -ENOMEM; in pool_op_alloc()
26 shm->kaddr = page_address(page); in pool_op_alloc()
27 shm->paddr = page_to_phys(page); in pool_op_alloc()
28 shm->size = PAGE_SIZE << order; in pool_op_alloc()
31 * Shared memory private to the OP-TEE driver doesn't need in pool_op_alloc()
32 * to be registered with OP-TEE. in pool_op_alloc()
34 if (!(shm->flags & TEE_SHM_PRIV)) { in pool_op_alloc()
40 rc = -ENOMEM; in pool_op_alloc()
49 shm->flags |= TEE_SHM_REGISTER; in pool_op_alloc()
50 rc = optee_shm_register(shm->ctx, shm, pages, nr_pages, in pool_op_alloc()
51 (unsigned long)shm->kaddr); in pool_op_alloc()
67 if (!(shm->flags & TEE_SHM_PRIV)) in pool_op_free()
68 optee_shm_unregister(shm->ctx, shm); in pool_op_free()
70 free_pages((unsigned long)shm->kaddr, get_order(shm->size)); in pool_op_free()
71 shm->kaddr = NULL; in pool_op_free()
86 * optee_shm_pool_alloc_pages() - create page-based allocator pool
88 * This pool is used when OP-TEE supports dymanic SHM. In this case
96 return ERR_PTR(-ENOMEM); in optee_shm_pool_alloc_pages()
98 mgr->ops = &pool_ops; in optee_shm_pool_alloc_pages()