/Linux-v5.4/drivers/tee/ |
D | tee_shm.c | 14 static void tee_shm_release(struct tee_shm *shm) in tee_shm_release() argument 16 struct tee_device *teedev = shm->teedev; in tee_shm_release() 19 idr_remove(&teedev->idr, shm->id); in tee_shm_release() 20 if (shm->ctx) in tee_shm_release() 21 list_del(&shm->link); in tee_shm_release() 24 if (shm->flags & TEE_SHM_POOL) { in tee_shm_release() 27 if (shm->flags & TEE_SHM_DMA_BUF) in tee_shm_release() 32 poolm->ops->free(poolm, shm); in tee_shm_release() 33 } else if (shm->flags & TEE_SHM_REGISTER) { in tee_shm_release() 35 int rc = teedev->desc->ops->shm_unregister(shm->ctx, shm); 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 | 135 struct tee_shm *shm; in tee_ioctl_shm_alloc() local 144 shm = tee_shm_alloc(ctx, data.size, TEE_SHM_MAPPED | TEE_SHM_DMA_BUF); in tee_ioctl_shm_alloc() 145 if (IS_ERR(shm)) in tee_ioctl_shm_alloc() 146 return PTR_ERR(shm); in tee_ioctl_shm_alloc() 148 data.id = shm->id; in tee_ioctl_shm_alloc() 149 data.flags = shm->flags; in tee_ioctl_shm_alloc() 150 data.size = shm->size; in tee_ioctl_shm_alloc() 155 ret = tee_shm_get_fd(shm); in tee_ioctl_shm_alloc() 162 tee_shm_put(shm); in tee_ioctl_shm_alloc() 172 struct tee_shm *shm; in tee_ioctl_shm_register() local [all …]
|
D | tee_private.h | 62 int tee_shm_get_fd(struct tee_shm *shm);
|
/Linux-v5.4/drivers/tee/optee/ |
D | rpc.c | 175 struct tee_shm *shm; in cmd_alloc_suppl() local 188 shm = tee_shm_get_from_id(optee->supp.ctx, param.u.value.c); in cmd_alloc_suppl() 190 return shm; in cmd_alloc_suppl() 198 struct tee_shm *shm; in handle_rpc_func_cmd_shm_alloc() local 220 shm = cmd_alloc_suppl(ctx, sz); in handle_rpc_func_cmd_shm_alloc() 223 shm = tee_shm_alloc(ctx, sz, TEE_SHM_MAPPED); in handle_rpc_func_cmd_shm_alloc() 230 if (IS_ERR(shm)) { in handle_rpc_func_cmd_shm_alloc() 235 if (tee_shm_get_pa(shm, 0, &pa)) { in handle_rpc_func_cmd_shm_alloc() 240 sz = tee_shm_get_size(shm); in handle_rpc_func_cmd_shm_alloc() 242 if (tee_shm_is_registered(shm)) { in handle_rpc_func_cmd_shm_alloc() [all …]
|
D | call.c | 178 struct tee_shm *shm; in get_msg_arg() local 181 shm = tee_shm_alloc(ctx, OPTEE_MSG_GET_ARG_SIZE(num_params), in get_msg_arg() 183 if (IS_ERR(shm)) in get_msg_arg() 184 return shm; in get_msg_arg() 186 ma = tee_shm_get_va(shm, 0); in get_msg_arg() 192 rc = tee_shm_get_pa(shm, 0, msg_parg); in get_msg_arg() 201 tee_shm_free(shm); in get_msg_arg() 205 return shm; in get_msg_arg() 214 struct tee_shm *shm; in optee_open_session() local 220 shm = get_msg_arg(ctx, arg->num_params + 2, &msg_arg, &msg_parg); in optee_open_session() [all …]
|
D | shm_pool.c | 16 struct tee_shm *shm, size_t size) in pool_op_alloc() argument 25 shm->kaddr = page_address(page); in pool_op_alloc() 26 shm->paddr = page_to_phys(page); in pool_op_alloc() 27 shm->size = PAGE_SIZE << order; in pool_op_alloc() 33 struct tee_shm *shm) in pool_op_free() argument 35 free_pages((unsigned long)shm->kaddr, get_order(shm->size)); in pool_op_free() 36 shm->kaddr = NULL; in pool_op_free()
|
D | core.c | 41 struct tee_shm *shm; in optee_from_msg_param() local 69 shm = (struct tee_shm *)(unsigned long) in optee_from_msg_param() 71 if (!shm) { in optee_from_msg_param() 73 p->u.memref.shm = NULL; in optee_from_msg_param() 76 rc = tee_shm_get_pa(shm, 0, &pa); in optee_from_msg_param() 80 p->u.memref.shm = shm; in optee_from_msg_param() 87 rc = tee_shm_get_pa(shm, o, NULL); in optee_from_msg_param() 98 shm = (struct tee_shm *)(unsigned long) in optee_from_msg_param() 101 if (!shm) { in optee_from_msg_param() 103 p->u.memref.shm = NULL; in optee_from_msg_param() [all …]
|
D | optee_private.h | 156 int optee_shm_register(struct tee_context *ctx, struct tee_shm *shm, 159 int optee_shm_unregister(struct tee_context *ctx, struct tee_shm *shm); 161 int optee_shm_register_supp(struct tee_context *ctx, struct tee_shm *shm, 164 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 | 51 param[0].u.memref.shm = device_shm; in get_devices()
|
/Linux-v5.4/include/linux/ |
D | tee_drv.h | 62 struct tee_shm *shm; member 110 int (*shm_register)(struct tee_context *ctx, struct tee_shm *shm, 113 int (*shm_unregister)(struct tee_context *ctx, struct tee_shm *shm); 219 int (*alloc)(struct tee_shm_pool_mgr *poolmgr, struct tee_shm *shm, 221 void (*free)(struct tee_shm_pool_mgr *poolmgr, struct tee_shm *shm); 350 static inline bool tee_shm_is_registered(struct tee_shm *shm) in tee_shm_is_registered() argument 352 return shm && (shm->flags & TEE_SHM_REGISTER); in tee_shm_is_registered() 359 void tee_shm_free(struct tee_shm *shm); 365 void tee_shm_put(struct tee_shm *shm); 374 int tee_shm_va2pa(struct tee_shm *shm, void *va, phys_addr_t *pa); [all …]
|
/Linux-v5.4/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 …]
|
/Linux-v5.4/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() 258 pvt_data->shm = tee_shm_alloc(pvt_data->ctx, in ftpm_tee_probe() 261 if (IS_ERR(pvt_data->shm)) { in ftpm_tee_probe() 291 tee_shm_free(pvt_data->shm); in ftpm_tee_probe() 318 tee_shm_free(pvt_data->shm); in ftpm_tee_remove()
|
D | tpm_ftpm_tee.h | 37 struct tee_shm *shm; member
|
/Linux-v5.4/sound/usb/usx2y/ |
D | usx2yhwdeppcm.c | 103 struct snd_usX2Y_hwdep_pcm_shm *shm = usX2Y->hwdep_pcm_shm; in usX2Y_hwdep_urb_play_prepare() local 106 if (0 > shm->playback_iso_start) { in usX2Y_hwdep_urb_play_prepare() 107 shm->playback_iso_start = shm->captured_iso_head - in usX2Y_hwdep_urb_play_prepare() 109 if (0 > shm->playback_iso_start) in usX2Y_hwdep_urb_play_prepare() 110 shm->playback_iso_start += ARRAY_SIZE(shm->captured_iso); in usX2Y_hwdep_urb_play_prepare() 111 shm->playback_iso_head = shm->playback_iso_start; in usX2Y_hwdep_urb_play_prepare() 117 counts = shm->captured_iso[shm->playback_iso_head].length / usX2Y->stride; in usX2Y_hwdep_urb_play_prepare() 123 urb->iso_frame_desc[pack].offset = shm->captured_iso[shm->playback_iso_head].offset; in usX2Y_hwdep_urb_play_prepare() 124 urb->iso_frame_desc[pack].length = shm->captured_iso[shm->playback_iso_head].length; in usX2Y_hwdep_urb_play_prepare() 128 if (++shm->playback_iso_head >= ARRAY_SIZE(shm->captured_iso)) in usX2Y_hwdep_urb_play_prepare() [all …]
|
D | usX2Yhwdep.c | 81 struct us428ctls_sharedmem *shm = us428->us428ctls_sharedmem; in snd_us428ctls_poll() local 87 if (shm != NULL && shm->CtlSnapShotLast != shm->CtlSnapShotRed) in snd_us428ctls_poll()
|
/Linux-v5.4/tools/testing/selftests/vm/ |
D | .gitignore | 2 hugepage-shm
|
D | Makefile | 9 TEST_GEN_FILES += hugepage-shm
|
D | run_vmtests | 82 ./hugepage-shm
|
/Linux-v5.4/ipc/ |
D | Makefile | 7 obj-$(CONFIG_SYSVIPC) += util.o msgutil.o msg.o sem.o shm.o syscall.o
|
/Linux-v5.4/drivers/block/ |
D | sx8.c | 266 void *shm; member 1014 struct carm_response *resp = (struct carm_response *) host->shm; in carm_handle_responses() 1248 struct carm_response *resp = (struct carm_response *) host->shm; in carm_init_responses() 1392 host->shm = dma_alloc_coherent(&host->pdev->dev, CARM_SHM_SIZE, in carm_init_shm() 1394 if (!host->shm) in carm_init_shm() 1397 host->msg_base = host->shm + RBUF_LEN; in carm_init_shm() 1400 memset(host->shm, 0xff, RBUF_LEN); in carm_init_shm() 1546 dma_free_coherent(&pdev->dev, CARM_SHM_SIZE, host->shm, host->shm_dma); in carm_init_one() 1579 dma_free_coherent(&pdev->dev, CARM_SHM_SIZE, host->shm, host->shm_dma); in carm_remove_one()
|
/Linux-v5.4/Documentation/filesystems/ |
D | tmpfs.txt | 35 2) glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for 39 tmpfs /dev/shm tmpfs defaults 0 0 46 necessary to mount the predecessor of tmpfs (shm fs) to use SYSV
|
/Linux-v5.4/tools/testing/selftests/rcutorture/doc/ |
D | rcu-test-image.txt | 23 tmpfs /dev/shm tmpfs defaults 0 0
|
/Linux-v5.4/drivers/net/wireless/broadcom/b43legacy/ |
D | debugfs.c | 329 B43legacy_DEBUGFS_FOPS(shm, shm_read_file, NULL, 1); 409 ADD_FILE(shm, 0400); in b43legacy_debugfs_add_device()
|