diff options
author | Tao Huang <huangtao@rock-chips.com> | 2018-03-09 14:15:35 +0800 |
---|---|---|
committer | Tao Huang <huangtao@rock-chips.com> | 2018-03-09 14:24:18 +0800 |
commit | 319604562878c372fe22fe9a354849e32d95d3fd (patch) | |
tree | f85b9a03d97a2895ac186e2c1a2d1c6de50526a8 /security | |
parent | 67e46ea01439010eadbc220c7600fa6dae01e8e8 (diff) |
OPTEE: rename tee_shm_pool_alloc to rk_tee_shm_pool_alloc
keep compitable with new version driver
Change-Id: I8e3f12e252f712860adad57d84bd231769bd8997
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/optee_linuxdriver/armtz/tee_mem.c | 4 | ||||
-rw-r--r-- | security/optee_linuxdriver/armtz/tee_mem.h | 2 | ||||
-rw-r--r-- | security/optee_linuxdriver/armtz/tee_tz_drv.c | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/security/optee_linuxdriver/armtz/tee_mem.c b/security/optee_linuxdriver/armtz/tee_mem.c index fe5a43d57342..9b9ca667b212 100644 --- a/security/optee_linuxdriver/armtz/tee_mem.c +++ b/security/optee_linuxdriver/armtz/tee_mem.c @@ -370,7 +370,7 @@ unsigned long tee_shm_pool_v2p(struct device *dev, struct shm_pool *pool, * Allocate a memory chunk inside the memory region managed by the pool. * */ -unsigned long tee_shm_pool_alloc(struct device *dev, +unsigned long rk_tee_shm_pool_alloc(struct device *dev, struct shm_pool *pool, size_t size, size_t alignment) { @@ -508,7 +508,7 @@ failed_out: _KFREE(next_chunk); dev_err(dev, - "tee_shm_pool_alloc() FAILED, size=0x%zx, align=0x%zx free=%zu\n", + "rk_tee_shm_pool_alloc() FAILED, size=0x%zx, align=0x%zx free=%zu\n", size, alignment, pool->size - pool->used); #if defined(_DUMP_INFO_ALLOCATOR) && (_DUMP_INFO_ALLOCATOR > 1) diff --git a/security/optee_linuxdriver/armtz/tee_mem.h b/security/optee_linuxdriver/armtz/tee_mem.h index a66a8f5a5550..4901ea9f4673 100644 --- a/security/optee_linuxdriver/armtz/tee_mem.h +++ b/security/optee_linuxdriver/armtz/tee_mem.h @@ -29,7 +29,7 @@ void *tee_shm_pool_p2v(struct device *dev, struct shm_pool *pool, unsigned long tee_shm_pool_v2p(struct device *dev, struct shm_pool *pool, void *vaddr); -unsigned long tee_shm_pool_alloc(struct device *dev, +unsigned long rk_tee_shm_pool_alloc(struct device *dev, struct shm_pool *pool, size_t size, size_t alignment); diff --git a/security/optee_linuxdriver/armtz/tee_tz_drv.c b/security/optee_linuxdriver/armtz/tee_tz_drv.c index 073355af293b..c806bf30c729 100644 --- a/security/optee_linuxdriver/armtz/tee_tz_drv.c +++ b/security/optee_linuxdriver/armtz/tee_tz_drv.c @@ -384,7 +384,7 @@ static u32 handle_rpc(struct tee_tz *ptee, struct smc_param *param) switch (TEESMC_RETURN_GET_RPC_FUNC(param->a0)) { case TEESMC_RPC_FUNC_ALLOC_ARG: - param->a1 = tee_shm_pool_alloc(DEV, ptee->shm_pool, + param->a1 = rk_tee_shm_pool_alloc(DEV, ptee->shm_pool, param->a1, 4); break; case TEESMC_RPC_FUNC_ALLOC_PAYLOAD: @@ -518,7 +518,7 @@ static void *alloc_tee_arg(struct tee_tz *ptee, unsigned long *p, size_t l) return NULL; /* assume a 4 bytes aligned is sufficient */ - *p = tee_shm_pool_alloc(DEV, ptee->shm_pool, l, ALLOC_ALIGN); + *p = rk_tee_shm_pool_alloc(DEV, ptee->shm_pool, l, ALLOC_ALIGN); if (*p == 0) return NULL; @@ -904,7 +904,7 @@ static struct tee_shm *tz_alloc(struct tee *tee, size_t size, uint32_t flags) shm->size_alloc = ((size / SZ_4K) + 1) * SZ_4K; shm->size_req = size; - shm->paddr = tee_shm_pool_alloc(tee->dev, ptee->shm_pool, + shm->paddr = rk_tee_shm_pool_alloc(tee->dev, ptee->shm_pool, shm->size_alloc, ALLOC_ALIGN); if (!shm->paddr) { dev_err(tee->dev, "%s: cannot alloc memory, size 0x%lx\n", |