Home
last modified time | relevance | path

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

12

/Linux-v4.19/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);
/Linux-v4.19/include/linux/
Dtee_drv.h62 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-v4.19/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()
/Linux-v4.19/drivers/media/platform/s5p-mfc/
Ds5p_mfc_opr_v5.c227 ctx->shm.size = buf_size->shm; in s5p_mfc_alloc_instance_buffer_v5()
228 ret = s5p_mfc_alloc_priv_buf(dev, BANK_L_CTX, &ctx->shm); in s5p_mfc_alloc_instance_buffer_v5()
236 ctx->shm.ofs = ctx->shm.dma - dev->dma_base[BANK_L_CTX]; in s5p_mfc_alloc_instance_buffer_v5()
237 BUG_ON(ctx->shm.ofs & ((1 << MFC_BANK1_ALIGN_ORDER) - 1)); in s5p_mfc_alloc_instance_buffer_v5()
239 memset(ctx->shm.virt, 0, buf_size->shm); in s5p_mfc_alloc_instance_buffer_v5()
248 s5p_mfc_release_priv_buf(ctx->dev, &ctx->shm); in s5p_mfc_release_instance_buffer_v5()
266 *(u32 *)(ctx->shm.virt + ofs) = data; in s5p_mfc_write_info_v5()
274 return *(u32 *)(ctx->shm.virt + ofs); in s5p_mfc_read_info_v5()
361 mfc_write(dev, ctx->shm.ofs, S5P_FIMV_SI_CH0_HOST_WR_ADR); in s5p_mfc_set_shared_buffer()
682 unsigned int shm; in s5p_mfc_set_enc_params() local
[all …]
Ds5p_mfc_common.h211 unsigned int shm; member
691 struct s5p_mfc_priv_buf shm; member
/Linux-v4.19/sound/usb/usx2y/
Dusx2yhwdeppcm.c115 struct snd_usX2Y_hwdep_pcm_shm *shm = usX2Y->hwdep_pcm_shm; in usX2Y_hwdep_urb_play_prepare() local
118 if (0 > shm->playback_iso_start) { in usX2Y_hwdep_urb_play_prepare()
119 shm->playback_iso_start = shm->captured_iso_head - in usX2Y_hwdep_urb_play_prepare()
121 if (0 > shm->playback_iso_start) in usX2Y_hwdep_urb_play_prepare()
122 shm->playback_iso_start += ARRAY_SIZE(shm->captured_iso); in usX2Y_hwdep_urb_play_prepare()
123 shm->playback_iso_head = shm->playback_iso_start; in usX2Y_hwdep_urb_play_prepare()
129 counts = shm->captured_iso[shm->playback_iso_head].length / usX2Y->stride; in usX2Y_hwdep_urb_play_prepare()
135 urb->iso_frame_desc[pack].offset = shm->captured_iso[shm->playback_iso_head].offset; in usX2Y_hwdep_urb_play_prepare()
136 urb->iso_frame_desc[pack].length = shm->captured_iso[shm->playback_iso_head].length; in usX2Y_hwdep_urb_play_prepare()
140 if (++shm->playback_iso_head >= ARRAY_SIZE(shm->captured_iso)) in usX2Y_hwdep_urb_play_prepare()
[all …]
DusX2Yhwdep.c93 struct us428ctls_sharedmem *shm = us428->us428ctls_sharedmem; in snd_us428ctls_poll() local
99 if (shm != NULL && shm->CtlSnapShotLast != shm->CtlSnapShotRed) in snd_us428ctls_poll()
/Linux-v4.19/tools/testing/selftests/vm/
D.gitignore2 hugepage-shm
DMakefile13 TEST_GEN_FILES += hugepage-shm
Drun_vmtests82 ./hugepage-shm
/Linux-v4.19/ipc/
DMakefile7 obj-$(CONFIG_SYSVIPC) += util.o msgutil.o msg.o sem.o shm.o syscall.o
/Linux-v4.19/drivers/block/
Dsx8.c270 void *shm; member
1164 struct carm_response *resp = (struct carm_response *) host->shm; in carm_handle_responses()
1398 struct carm_response *resp = (struct carm_response *) host->shm; in carm_init_responses()
1551 host->shm = pci_alloc_consistent(host->pdev, CARM_SHM_SIZE, in carm_init_shm()
1553 if (!host->shm) in carm_init_shm()
1556 host->msg_base = host->shm + RBUF_LEN; in carm_init_shm()
1559 memset(host->shm, 0xff, RBUF_LEN); in carm_init_shm()
1709 pci_free_consistent(pdev, CARM_SHM_SIZE, host->shm, host->shm_dma); in carm_init_one()
1739 pci_free_consistent(pdev, CARM_SHM_SIZE, host->shm, host->shm_dma); in carm_remove_one()
/Linux-v4.19/Documentation/filesystems/
Dtmpfs.txt35 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-v4.19/tools/testing/selftests/rcutorture/doc/
Drcu-test-image.txt23 tmpfs /dev/shm tmpfs defaults 0 0
/Linux-v4.19/drivers/net/wireless/broadcom/b43legacy/
Ddebugfs.c342 B43legacy_DEBUGFS_FOPS(shm, shm_read_file, NULL, 1);
439 ADD_FILE(shm, 0400); in b43legacy_debugfs_add_device()
/Linux-v4.19/Documentation/sparc/
Dadi.txt159 #include <sys/shm.h>
213 perror("shm attach failed");
223 /* Set the ADI version tag on the shm segment
/Linux-v4.19/Documentation/
Ddontdiff141 hugepage-shm

12