Home
last modified time | relevance | path

Searched refs:shm (Results 1 – 16 of 16) sorted by relevance

/drivers/tee/
Dtee_shm.c23 static void tee_shm_release(struct tee_shm *shm) in tee_shm_release() argument
25 struct tee_device *teedev = shm->teedev; in tee_shm_release()
28 idr_remove(&teedev->idr, shm->id); in tee_shm_release()
29 if (shm->ctx) in tee_shm_release()
30 list_del(&shm->link); in tee_shm_release()
33 if (shm->flags & TEE_SHM_POOL) { in tee_shm_release()
36 if (shm->flags & TEE_SHM_DMA_BUF) in tee_shm_release()
41 poolm->ops->free(poolm, shm); in tee_shm_release()
42 } else if (shm->flags & TEE_SHM_REGISTER) { in tee_shm_release()
44 int rc = teedev->desc->ops->shm_unregister(shm->ctx, shm); in tee_shm_release()
[all …]
Dtee_core.c130 struct tee_shm *shm; in tee_ioctl_shm_alloc() local
139 shm = tee_shm_alloc(ctx, data.size, TEE_SHM_MAPPED | TEE_SHM_DMA_BUF); in tee_ioctl_shm_alloc()
140 if (IS_ERR(shm)) in tee_ioctl_shm_alloc()
141 return PTR_ERR(shm); in tee_ioctl_shm_alloc()
143 data.id = shm->id; in tee_ioctl_shm_alloc()
144 data.flags = shm->flags; in tee_ioctl_shm_alloc()
145 data.size = shm->size; in tee_ioctl_shm_alloc()
150 ret = tee_shm_get_fd(shm); in tee_ioctl_shm_alloc()
157 tee_shm_put(shm); in tee_ioctl_shm_alloc()
167 struct tee_shm *shm; in tee_ioctl_shm_register() local
[all …]
Dtee_shm_pool.c22 struct tee_shm *shm, size_t size) in pool_op_gen_alloc() argument
33 shm->kaddr = (void *)va; in pool_op_gen_alloc()
34 shm->paddr = gen_pool_virt_to_phys(genpool, va); in pool_op_gen_alloc()
35 shm->size = s; in pool_op_gen_alloc()
40 struct tee_shm *shm) in pool_op_gen_free() argument
42 gen_pool_free(poolm->private_data, (unsigned long)shm->kaddr, in pool_op_gen_free()
43 shm->size); in pool_op_gen_free()
44 shm->kaddr = NULL; in pool_op_gen_free()
Dtee_private.h71 int tee_shm_get_fd(struct tee_shm *shm);
/drivers/tee/optee/
Drpc.c184 struct tee_shm *shm; in cmd_alloc_suppl() local
197 shm = tee_shm_get_from_id(optee->supp.ctx, param.u.value.c); in cmd_alloc_suppl()
199 return shm; in cmd_alloc_suppl()
207 struct tee_shm *shm; in handle_rpc_func_cmd_shm_alloc() local
229 shm = cmd_alloc_suppl(ctx, sz); in handle_rpc_func_cmd_shm_alloc()
232 shm = tee_shm_alloc(ctx, sz, TEE_SHM_MAPPED); in handle_rpc_func_cmd_shm_alloc()
239 if (IS_ERR(shm)) { in handle_rpc_func_cmd_shm_alloc()
244 if (tee_shm_get_pa(shm, 0, &pa)) { in handle_rpc_func_cmd_shm_alloc()
249 sz = tee_shm_get_size(shm); in handle_rpc_func_cmd_shm_alloc()
251 if (tee_shm_is_registered(shm)) { in handle_rpc_func_cmd_shm_alloc()
[all …]
Dcall.c186 struct tee_shm *shm; in get_msg_arg() local
189 shm = tee_shm_alloc(ctx, OPTEE_MSG_GET_ARG_SIZE(num_params), in get_msg_arg()
191 if (IS_ERR(shm)) in get_msg_arg()
192 return shm; in get_msg_arg()
194 ma = tee_shm_get_va(shm, 0); in get_msg_arg()
200 rc = tee_shm_get_pa(shm, 0, msg_parg); in get_msg_arg()
209 tee_shm_free(shm); in get_msg_arg()
213 return shm; in get_msg_arg()
222 struct tee_shm *shm; in optee_open_session() local
228 shm = get_msg_arg(ctx, arg->num_params + 2, &msg_arg, &msg_parg); in optee_open_session()
[all …]
Dshm_pool.c25 struct tee_shm *shm, size_t size) in pool_op_alloc() argument
34 shm->kaddr = page_address(page); in pool_op_alloc()
35 shm->paddr = page_to_phys(page); in pool_op_alloc()
36 shm->size = PAGE_SIZE << order; in pool_op_alloc()
42 struct tee_shm *shm) in pool_op_free() argument
44 free_pages((unsigned long)shm->kaddr, get_order(shm->size)); in pool_op_free()
45 shm->kaddr = NULL; in pool_op_free()
Dcore.c50 struct tee_shm *shm; in optee_from_msg_param() local
78 shm = (struct tee_shm *)(unsigned long) in optee_from_msg_param()
80 if (!shm) { in optee_from_msg_param()
82 p->u.memref.shm = NULL; in optee_from_msg_param()
85 rc = tee_shm_get_pa(shm, 0, &pa); in optee_from_msg_param()
89 p->u.memref.shm = shm; in optee_from_msg_param()
96 rc = tee_shm_get_pa(shm, o, NULL); in optee_from_msg_param()
107 shm = (struct tee_shm *)(unsigned long) in optee_from_msg_param()
110 if (!shm) { in optee_from_msg_param()
112 p->u.memref.shm = NULL; in optee_from_msg_param()
[all …]
Doptee_private.h164 int optee_shm_register(struct tee_context *ctx, struct tee_shm *shm,
167 int optee_shm_unregister(struct tee_context *ctx, struct tee_shm *shm);
169 int optee_shm_register_supp(struct tee_context *ctx, struct tee_shm *shm,
172 int optee_shm_unregister_supp(struct tee_context *ctx, struct tee_shm *shm);
Dsupp.c197 if (tee_param_is_memref(params + n) && params[n].u.memref.shm) in supp_check_recv_params()
198 tee_shm_put(params[n].u.memref.shm); in supp_check_recv_params()
/drivers/media/platform/s5p-mfc/
Ds5p_mfc_opr_v5.c229 ctx->shm.size = buf_size->shm; in s5p_mfc_alloc_instance_buffer_v5()
230 ret = s5p_mfc_alloc_priv_buf(dev->mem_dev_l, dev->bank1, &ctx->shm); in s5p_mfc_alloc_instance_buffer_v5()
238 ctx->shm.ofs = ctx->shm.dma - dev->bank1; in s5p_mfc_alloc_instance_buffer_v5()
239 BUG_ON(ctx->shm.ofs & ((1 << MFC_BANK1_ALIGN_ORDER) - 1)); in s5p_mfc_alloc_instance_buffer_v5()
241 memset(ctx->shm.virt, 0, buf_size->shm); in s5p_mfc_alloc_instance_buffer_v5()
250 s5p_mfc_release_priv_buf(ctx->dev->mem_dev_l, &ctx->shm); in s5p_mfc_release_instance_buffer_v5()
268 *(u32 *)(ctx->shm.virt + ofs) = data; in s5p_mfc_write_info_v5()
276 return *(u32 *)(ctx->shm.virt + ofs); in s5p_mfc_read_info_v5()
363 mfc_write(dev, ctx->shm.ofs, S5P_FIMV_SI_CH0_HOST_WR_ADR); in s5p_mfc_set_shared_buffer()
684 unsigned int shm; in s5p_mfc_set_enc_params() local
[all …]
Ds5p_mfc_common.h208 unsigned int shm; member
635 struct s5p_mfc_priv_buf shm; member
Ds5p_mfc.c1375 .shm = SHARED_BUF_SIZE,
/drivers/block/
Dsx8.c270 void *shm; member
1167 struct carm_response *resp = (struct carm_response *) host->shm; in carm_handle_responses()
1401 struct carm_response *resp = (struct carm_response *) host->shm; in carm_init_responses()
1554 host->shm = pci_alloc_consistent(host->pdev, CARM_SHM_SIZE, in carm_init_shm()
1556 if (!host->shm) in carm_init_shm()
1559 host->msg_base = host->shm + RBUF_LEN; in carm_init_shm()
1562 memset(host->shm, 0xff, RBUF_LEN); in carm_init_shm()
1712 pci_free_consistent(pdev, CARM_SHM_SIZE, host->shm, host->shm_dma); in carm_init_one()
1742 pci_free_consistent(pdev, CARM_SHM_SIZE, host->shm, host->shm_dma); in carm_remove_one()
/drivers/net/wireless/b43legacy/
Ddebugfs.c340 B43legacy_DEBUGFS_FOPS(shm, shm_read_file, NULL, 1);
437 ADD_FILE(shm, 0400); in b43legacy_debugfs_add_device()
/drivers/gpu/drm/
Ddrm_bufs.c79 unsigned long user_token, int hashed_handle, int shm) in drm_map_handle() argument
102 if (shm && (SHMLBA > PAGE_SIZE)) { in drm_map_handle()