/drivers/tee/ |
D | tee_shm.c | 16 static void release_registered_pages(struct tee_shm *shm) in release_registered_pages() argument 18 if (shm->pages) { in release_registered_pages() 19 if (shm->flags & TEE_SHM_USER_MAPPED) { in release_registered_pages() 20 unpin_user_pages(shm->pages, shm->num_pages); in release_registered_pages() 24 for (n = 0; n < shm->num_pages; n++) in release_registered_pages() 25 put_page(shm->pages[n]); in release_registered_pages() 28 kfree(shm->pages); in release_registered_pages() 32 static void tee_shm_release(struct tee_device *teedev, struct tee_shm *shm) in tee_shm_release() argument 34 if (shm->flags & TEE_SHM_POOL) { in tee_shm_release() 37 if (shm->flags & TEE_SHM_DMA_BUF) in tee_shm_release() [all …]
|
D | tee_shm_pool.c | 13 struct tee_shm *shm, size_t size) in pool_op_gen_alloc() argument 24 shm->kaddr = (void *)va; in pool_op_gen_alloc() 25 shm->paddr = gen_pool_virt_to_phys(genpool, va); in pool_op_gen_alloc() 26 shm->size = s; in pool_op_gen_alloc() 31 struct tee_shm *shm) in pool_op_gen_free() argument 33 gen_pool_free(poolm->private_data, (unsigned long)shm->kaddr, in pool_op_gen_free() 34 shm->size); in pool_op_gen_free() 35 shm->kaddr = NULL; in pool_op_gen_free()
|
D | tee_core.c | 291 struct tee_shm *shm; in tee_ioctl_shm_alloc() local 300 shm = tee_shm_alloc(ctx, data.size, TEE_SHM_MAPPED | TEE_SHM_DMA_BUF); in tee_ioctl_shm_alloc() 301 if (IS_ERR(shm)) in tee_ioctl_shm_alloc() 302 return PTR_ERR(shm); in tee_ioctl_shm_alloc() 304 data.id = shm->id; in tee_ioctl_shm_alloc() 305 data.flags = shm->flags; in tee_ioctl_shm_alloc() 306 data.size = shm->size; in tee_ioctl_shm_alloc() 311 ret = tee_shm_get_fd(shm); in tee_ioctl_shm_alloc() 318 tee_shm_put(shm); in tee_ioctl_shm_alloc() 328 struct tee_shm *shm; in tee_ioctl_shm_register() local [all …]
|
D | tee_private.h | 63 int tee_shm_get_fd(struct tee_shm *shm);
|
/drivers/tee/optee/ |
D | shm_pool.c | 16 struct tee_shm *shm, size_t size) in pool_op_alloc() argument 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() 34 if (!(shm->flags & TEE_SHM_PRIV)) { in pool_op_alloc() 47 shm->flags |= TEE_SHM_REGISTER; in pool_op_alloc() 48 rc = optee_shm_register(shm->ctx, shm, pages, nr_pages, in pool_op_alloc() 49 (unsigned long)shm->kaddr); in pool_op_alloc() 63 struct tee_shm *shm) in pool_op_free() argument 65 if (!(shm->flags & TEE_SHM_PRIV)) in pool_op_free() [all …]
|
D | rpc.c | 105 msg.buf = params[2].u.memref.shm->kaddr; in handle_rpc_func_cmd_i2c_transfer() 269 struct tee_shm *shm; in cmd_alloc_suppl() local 282 shm = tee_shm_get_from_id(optee->supp.ctx, param.u.value.c); in cmd_alloc_suppl() 284 return shm; in cmd_alloc_suppl() 293 struct tee_shm *shm; in handle_rpc_func_cmd_shm_alloc() local 315 shm = cmd_alloc_suppl(ctx, sz); in handle_rpc_func_cmd_shm_alloc() 318 shm = tee_shm_alloc(optee->ctx, sz, in handle_rpc_func_cmd_shm_alloc() 326 if (IS_ERR(shm)) { in handle_rpc_func_cmd_shm_alloc() 331 if (tee_shm_get_pa(shm, 0, &pa)) { in handle_rpc_func_cmd_shm_alloc() 336 sz = tee_shm_get_size(shm); in handle_rpc_func_cmd_shm_alloc() [all …]
|
D | call.c | 183 struct tee_shm *shm; in get_msg_arg() local 186 shm = tee_shm_alloc(ctx, OPTEE_MSG_GET_ARG_SIZE(num_params), in get_msg_arg() 188 if (IS_ERR(shm)) in get_msg_arg() 189 return shm; in get_msg_arg() 191 ma = tee_shm_get_va(shm, 0); in get_msg_arg() 197 rc = tee_shm_get_pa(shm, 0, msg_parg); in get_msg_arg() 206 tee_shm_free(shm); in get_msg_arg() 210 return shm; in get_msg_arg() 219 struct tee_shm *shm; in optee_open_session() local 226 shm = get_msg_arg(ctx, arg->num_params + 2, &msg_arg, &msg_parg); in optee_open_session() [all …]
|
D | core.c | 43 struct tee_shm *shm; in optee_from_msg_param() local 71 shm = (struct tee_shm *)(unsigned long) in optee_from_msg_param() 73 if (!shm) { in optee_from_msg_param() 75 p->u.memref.shm = NULL; in optee_from_msg_param() 78 rc = tee_shm_get_pa(shm, 0, &pa); in optee_from_msg_param() 82 p->u.memref.shm = shm; in optee_from_msg_param() 90 shm = (struct tee_shm *)(unsigned long) in optee_from_msg_param() 93 if (!shm) { in optee_from_msg_param() 95 p->u.memref.shm = NULL; in optee_from_msg_param() 99 p->u.memref.shm = shm; in optee_from_msg_param() [all …]
|
D | optee_private.h | 166 int optee_shm_register(struct tee_context *ctx, struct tee_shm *shm, 169 int optee_shm_unregister(struct tee_context *ctx, struct tee_shm *shm); 171 int optee_shm_register_supp(struct tee_context *ctx, struct tee_shm *shm, 174 int optee_shm_unregister_supp(struct tee_context *ctx, struct tee_shm *shm);
|
D | supp.c | 198 if (tee_param_is_memref(params + n) && params[n].u.memref.shm) in supp_check_recv_params() 199 tee_shm_put(params[n].u.memref.shm); in supp_check_recv_params()
|
D | device.c | 39 param[0].u.memref.shm = device_shm; in get_devices()
|
/drivers/tee/amdtee/ |
D | shm_pool.c | 11 static int pool_op_alloc(struct tee_shm_pool_mgr *poolm, struct tee_shm *shm, in pool_op_alloc() argument 22 shm->kaddr = (void *)va; in pool_op_alloc() 23 shm->paddr = __psp_pa((void *)va); in pool_op_alloc() 24 shm->size = PAGE_SIZE << order; in pool_op_alloc() 27 rc = amdtee_map_shmem(shm); in pool_op_alloc() 30 shm->kaddr = NULL; in pool_op_alloc() 37 static void pool_op_free(struct tee_shm_pool_mgr *poolm, struct tee_shm *shm) in pool_op_free() argument 40 amdtee_unmap_shmem(shm); in pool_op_free() 41 free_pages((unsigned long)shm->kaddr, get_order(shm->size)); in pool_op_free() 42 shm->kaddr = NULL; in pool_op_free()
|
D | core.c | 153 u32 get_buffer_id(struct tee_shm *shm) in get_buffer_id() argument 155 struct amdtee_context_data *ctxdata = shm->ctx->data; in get_buffer_id() 161 if (shmdata->kaddr == shm->kaddr) { in get_buffer_id() 341 int amdtee_map_shmem(struct tee_shm *shm) in amdtee_map_shmem() argument 349 if (!shm) in amdtee_map_shmem() 357 shmem.kaddr = shm->kaddr; in amdtee_map_shmem() 358 shmem.size = shm->size; in amdtee_map_shmem() 371 shmnode->kaddr = shm->kaddr; in amdtee_map_shmem() 373 ctxdata = shm->ctx->data; in amdtee_map_shmem() 383 void amdtee_unmap_shmem(struct tee_shm *shm) in amdtee_unmap_shmem() argument [all …]
|
D | amdtee_private.h | 148 int amdtee_map_shmem(struct tee_shm *shm); 150 void amdtee_unmap_shmem(struct tee_shm *shm); 171 u32 get_buffer_id(struct tee_shm *shm);
|
D | call.c | 48 u32 buf_id = get_buffer_id(tee[i].u.memref.shm); in tee_params_to_amd_params()
|
/drivers/media/platform/s5p-mfc/ |
D | s5p_mfc_opr_v5.c | 224 ctx->shm.size = buf_size->shm; in s5p_mfc_alloc_instance_buffer_v5() 225 ret = s5p_mfc_alloc_priv_buf(dev, BANK_L_CTX, &ctx->shm); in s5p_mfc_alloc_instance_buffer_v5() 233 ctx->shm.ofs = ctx->shm.dma - dev->dma_base[BANK_L_CTX]; in s5p_mfc_alloc_instance_buffer_v5() 234 BUG_ON(ctx->shm.ofs & ((1 << MFC_BANK1_ALIGN_ORDER) - 1)); in s5p_mfc_alloc_instance_buffer_v5() 236 memset(ctx->shm.virt, 0, buf_size->shm); in s5p_mfc_alloc_instance_buffer_v5() 245 s5p_mfc_release_priv_buf(ctx->dev, &ctx->shm); in s5p_mfc_release_instance_buffer_v5() 263 *(u32 *)(ctx->shm.virt + ofs) = data; in s5p_mfc_write_info_v5() 271 return *(u32 *)(ctx->shm.virt + ofs); in s5p_mfc_read_info_v5() 358 mfc_write(dev, ctx->shm.ofs, S5P_FIMV_SI_CH0_HOST_WR_ADR); in s5p_mfc_set_shared_buffer() 679 unsigned int shm; in s5p_mfc_set_enc_params() local [all …]
|
D | s5p_mfc_common.h | 207 unsigned int shm; member 697 struct s5p_mfc_priv_buf shm; member
|
D | s5p_mfc.c | 1517 .shm = SHARED_BUF_SIZE,
|
/drivers/char/tpm/ |
D | tpm_ftpm_tee.c | 82 struct tee_shm *shm = pvt_data->shm; in ftpm_tee_tpm_op_send() local 106 .shm = shm, in ftpm_tee_tpm_op_send() 112 temp_buf = tee_shm_get_va(shm, 0); in ftpm_tee_tpm_op_send() 124 .shm = shm, in ftpm_tee_tpm_op_send() 138 temp_buf = tee_shm_get_va(shm, command_params[1].u.memref.shm_offs); in ftpm_tee_tpm_op_send() 257 pvt_data->shm = tee_shm_alloc_kernel_buf(pvt_data->ctx, in ftpm_tee_probe() 260 if (IS_ERR(pvt_data->shm)) { in ftpm_tee_probe() 290 tee_shm_free(pvt_data->shm); in ftpm_tee_probe() 324 tee_shm_free(pvt_data->shm); in ftpm_tee_remove() 352 tee_shm_free(pvt_data->shm); in ftpm_plat_tee_shutdown()
|
D | tpm_ftpm_tee.h | 37 struct tee_shm *shm; member
|
/drivers/net/wireless/broadcom/b43legacy/ |
D | debugfs.c | 329 B43legacy_DEBUGFS_FOPS(shm, shm_read_file, NULL, 1); 397 ADD_FILE(shm, 0400); in b43legacy_debugfs_add_device()
|
/drivers/net/wwan/iosm/ |
D | iosm_ipc_protocol_ops.h | 306 } __packed shm; member
|
/drivers/firmware/broadcom/ |
D | tee_bnxt_fw.c | 81 param[0].u.memref.shm = pvt_data.fw_shm_pool; in prepare_args()
|
/drivers/char/hw_random/ |
D | optee-rng.c | 92 param[0].u.memref.shm = pvt_data->entropy_shm_pool; in get_optee_rng_data()
|
/drivers/gpu/drm/ |
D | drm_bufs.c | 91 unsigned long user_token, int hashed_handle, int shm) in drm_map_handle() argument 115 if (shm && (SHMLBA > PAGE_SIZE)) { in drm_map_handle()
|