Home
last modified time | relevance | path

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

12345678910>>...122

/linux/drivers/tee/
A Dtee_shm.c19 unpin_user_pages(shm->pages, shm->num_pages); in release_registered_pages()
54 kfree(shm); in tee_shm_release()
87 shm = kzalloc(sizeof(*shm), GFP_KERNEL); in tee_shm_alloc()
88 if (!shm) { in tee_shm_alloc()
119 return shm; in tee_shm_alloc()
123 kfree(shm); in tee_shm_alloc()
174 shm = kzalloc(sizeof(*shm), GFP_KERNEL); in tee_shm_register()
243 if (shm) { in tee_shm_register()
353 if (pa >= (shm->paddr + shm->size)) in tee_shm_pa2va()
357 void *v = tee_shm_get_va(shm, pa - shm->paddr); in tee_shm_pa2va()
[all …]
A Dtee_core.c287 struct tee_shm *shm; in tee_ioctl_shm_alloc() local
297 if (IS_ERR(shm)) in tee_ioctl_shm_alloc()
300 data.id = shm->id; in tee_ioctl_shm_alloc()
314 tee_shm_put(shm); in tee_ioctl_shm_alloc()
324 struct tee_shm *shm; in tee_ioctl_shm_register() local
335 if (IS_ERR(shm)) in tee_ioctl_shm_register()
338 data.id = shm->id; in tee_ioctl_shm_register()
351 tee_shm_put(shm); in tee_ioctl_shm_register()
402 if (IS_ERR(shm)) in params_from_user()
417 shm = NULL; in params_from_user()
[all …]
A Dtee_shm_pool.c13 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()
/linux/drivers/tee/optee/
A Dcall.c124 if (IS_ERR(shm)) in optee_get_msg_arg()
125 return shm; in optee_get_msg_arg()
129 tee_shm_free(shm); in optee_get_msg_arg()
137 return shm; in optee_get_msg_arg()
154 if (IS_ERR(shm)) in optee_open_session()
215 tee_shm_free(shm); in optee_open_session()
227 if (IS_ERR(shm)) in optee_close_session_helper()
234 tee_shm_free(shm); in optee_close_session_helper()
275 if (IS_ERR(shm)) in optee_invoke_func()
301 tee_shm_free(shm); in optee_invoke_func()
[all …]
A Dsmc_abi.c53 struct tee_shm *shm; in from_msg_param_tmp_mem() local
61 if (!shm) { in from_msg_param_tmp_mem()
72 p->u.memref.shm = shm; in from_msg_param_tmp_mem()
80 struct tee_shm *shm; in from_msg_param_reg_mem() local
87 if (shm) { in from_msg_param_reg_mem()
89 p->u.memref.shm = shm; in from_msg_param_reg_mem()
508 optee_shm_unregister(shm->ctx, shm); in pool_op_free()
510 free_pages((unsigned long)shm->kaddr, get_order(shm->size)); in pool_op_free()
511 shm->kaddr = NULL; in pool_op_free()
617 if (IS_ERR(shm)) { in handle_rpc_func_cmd_shm_alloc()
[all …]
A Dffa_abi.c41 struct tee_shm *shm; member
68 shm = r->shm; in optee_shm_from_ffa_handle()
71 return shm; in optee_shm_from_ffa_handle()
83 r->shm = shm; in optee_shm_add_ffa_handle()
136 p->u.memref.shm = shm; in from_msg_param_ffa_mem()
138 if (shm) { in from_msg_param_ffa_mem()
192 struct tee_shm *shm = p->u.memref.shm; in to_msg_param_ffa_mem() local
197 if (shm) { in to_msg_param_ffa_mem()
382 optee_ffa_shm_unregister(shm->ctx, shm); in pool_ffa_op_free()
383 free_pages((unsigned long)shm->kaddr, get_order(shm->size)); in pool_ffa_op_free()
[all …]
A Dcore.c22 struct tee_shm *shm, size_t size, in optee_pool_op_alloc_helper() argument
24 struct tee_shm *shm, in optee_pool_op_alloc_helper()
37 shm->kaddr = page_address(page); in optee_pool_op_alloc_helper()
38 shm->paddr = page_to_phys(page); in optee_pool_op_alloc_helper()
39 shm->size = PAGE_SIZE << order; in optee_pool_op_alloc_helper()
54 shm->flags |= TEE_SHM_REGISTER; in optee_pool_op_alloc_helper()
55 rc = shm_register(shm->ctx, shm, pages, nr_pages, in optee_pool_op_alloc_helper()
56 (unsigned long)shm->kaddr); in optee_pool_op_alloc_helper()
A Drpc.c105 msg.buf = params[2].u.memref.shm->kaddr; in handle_rpc_func_cmd_i2c_transfer()
272 struct tee_shm *shm; in optee_rpc_cmd_alloc_suppl() local
285 shm = tee_shm_get_from_id(optee->supp.ctx, param.u.value.c); in optee_rpc_cmd_alloc_suppl()
287 return shm; in optee_rpc_cmd_alloc_suppl()
290 void optee_rpc_cmd_free_suppl(struct tee_context *ctx, struct tee_shm *shm) in optee_rpc_cmd_free_suppl() argument
296 param.u.value.b = tee_shm_get_id(shm); in optee_rpc_cmd_free_suppl()
310 tee_shm_put(shm); in optee_rpc_cmd_free_suppl()
A Doptee_private.h220 struct tee_shm *shm, size_t size,
222 struct tee_shm *shm,
263 void optee_rpc_cmd_free_suppl(struct tee_context *ctx, struct tee_shm *shm);
/linux/include/linux/
A Dtee_drv.h66 struct tee_shm *shm; member
362 return shm && (shm->flags & TEE_SHM_REGISTER); in tee_shm_is_registered()
369 void tee_shm_free(struct tee_shm *shm);
375 void tee_shm_put(struct tee_shm *shm);
402 void *tee_shm_get_va(struct tee_shm *shm, size_t offs);
421 return shm->size; in tee_shm_get_size()
433 *num_pages = shm->num_pages; in tee_shm_get_pages()
434 return shm->pages; in tee_shm_get_pages()
444 return shm->offset; in tee_shm_get_page_offset()
452 static inline int tee_shm_get_id(struct tee_shm *shm) in tee_shm_get_id() argument
[all …]
/linux/drivers/tee/amdtee/
A Dshm_pool.c11 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()
A Dcore.c153 u32 get_buffer_id(struct tee_shm *shm) in get_buffer_id() argument
161 if (shmdata->kaddr == shm->kaddr) { in get_buffer_id()
340 int amdtee_map_shmem(struct tee_shm *shm) in amdtee_map_shmem() argument
348 if (!shm) in amdtee_map_shmem()
356 shmem.kaddr = shm->kaddr; in amdtee_map_shmem()
357 shmem.size = shm->size; in amdtee_map_shmem()
370 shmnode->kaddr = shm->kaddr; in amdtee_map_shmem()
372 ctxdata = shm->ctx->data; in amdtee_map_shmem()
388 if (!shm) in amdtee_unmap_shmem()
391 buf_id = get_buffer_id(shm); in amdtee_unmap_shmem()
[all …]
A Damdtee_private.h148 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);
/linux/drivers/media/platform/s5p-mfc/
A Ds5p_mfc_opr_v5.c224 ctx->shm.size = buf_size->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()
236 memset(ctx->shm.virt, 0, buf_size->shm); in s5p_mfc_alloc_instance_buffer_v5()
679 unsigned int shm; in s5p_mfc_set_enc_params() local
763 unsigned int shm; in s5p_mfc_set_enc_params_h264() local
865 shm &= ~(0xFFF); in s5p_mfc_set_enc_params_h264()
879 shm &= ~(0xFF); in s5p_mfc_set_enc_params_h264()
920 unsigned int shm; in s5p_mfc_set_enc_params_mpeg4() local
944 shm &= ~(0xFFF); in s5p_mfc_set_enc_params_mpeg4()
999 unsigned int shm; in s5p_mfc_set_enc_params_h263() local
[all …]
/linux/drivers/char/tpm/
A Dtpm_ftpm_tee.c82 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()
A Dtpm_ftpm_tee.h37 struct tee_shm *shm; member
/linux/sound/usb/usx2y/
A Dusx2yhwdeppcm.c111 shm->playback_iso_start = shm->captured_iso_head - in usx2y_hwdep_urb_play_prepare()
113 if (shm->playback_iso_start < 0) in usx2y_hwdep_urb_play_prepare()
114 shm->playback_iso_start += ARRAY_SIZE(shm->captured_iso); in usx2y_hwdep_urb_play_prepare()
115 shm->playback_iso_head = shm->playback_iso_start; in usx2y_hwdep_urb_play_prepare()
121 counts = shm->captured_iso[shm->playback_iso_head].length / usx2y->stride; in usx2y_hwdep_urb_play_prepare()
127 urb->iso_frame_desc[pack].offset = shm->captured_iso[shm->playback_iso_head].offset; in usx2y_hwdep_urb_play_prepare()
128 urb->iso_frame_desc[pack].length = shm->captured_iso[shm->playback_iso_head].length; in usx2y_hwdep_urb_play_prepare()
132 if (++shm->playback_iso_head >= ARRAY_SIZE(shm->captured_iso)) in usx2y_hwdep_urb_play_prepare()
133 shm->playback_iso_head = 0; in usx2y_hwdep_urb_play_prepare()
157 shm->captured_iso_head = head; in usx2y_usbpcm_urb_capt_iso_advance()
[all …]
A DusX2Yhwdep.c73 struct us428ctls_sharedmem *shm = us428->us428ctls_sharedmem; in snd_us428ctls_poll() local
80 if (shm && shm->ctl_snapshot_last != shm->ctl_snapshot_red) in snd_us428ctls_poll()
/linux/tools/testing/selftests/futex/functional/
A Dfutex_wait.c54 void *shm; in main() local
137 shm = mmap(NULL, sizeof(f_private), PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in main()
138 if (shm == MAP_FAILED) { in main()
143 memcpy(shm, &f_private, sizeof(f_private)); in main()
145 futex = shm; in main()
154 res = futex_wake(shm, 1, 0); in main()
165 munmap(shm, sizeof(f_private)); in main()
/linux/security/keys/trusted-keys/
A Dtrusted_tee.c95 param[0].u.memref.shm = reg_shm_in; in trusted_tee_seal()
99 param[1].u.memref.shm = reg_shm_out; in trusted_tee_seal()
156 param[0].u.memref.shm = reg_shm_in; in trusted_tee_unseal()
160 param[1].u.memref.shm = reg_shm_out; in trusted_tee_unseal()
207 param[0].u.memref.shm = reg_shm; in trusted_tee_get_random()
/linux/Documentation/translations/zh_CN/filesystems/
A Dtmpfs.rst36 2) glibc 2.2及更高版本期望将tmpfs挂载在/dev/shm上以用于POSIX共享内存
39 tmpfs /dev/shm tmpfs defaults 0 0
44 tmpfs的前身(shm fs)才能使用SYSV共享内存)
/linux/Documentation/translations/zh_TW/filesystems/
A Dtmpfs.rst37 2) glibc 2.2及更高版本期望將tmpfs掛載在/dev/shm上以用於POSIX共享內存
40 tmpfs /dev/shm tmpfs defaults 0 0
45 tmpfs的前身(shm fs)才能使用SYSV共享內存)
/linux/drivers/block/
A Dsx8.c266 void *shm; member
1015 struct carm_response *resp = (struct carm_response *) host->shm; in carm_handle_responses()
1250 struct carm_response *resp = (struct carm_response *) host->shm; in carm_init_responses()
1385 host->shm = dma_alloc_coherent(&host->pdev->dev, CARM_SHM_SIZE, in carm_init_shm()
1387 if (!host->shm) in carm_init_shm()
1390 host->msg_base = host->shm + RBUF_LEN; in carm_init_shm()
1393 memset(host->shm, 0xff, RBUF_LEN); in carm_init_shm()
1542 dma_free_coherent(&pdev->dev, CARM_SHM_SIZE, host->shm, host->shm_dma); in carm_init_one()
1575 dma_free_coherent(&pdev->dev, CARM_SHM_SIZE, host->shm, host->shm_dma); in carm_remove_one()
/linux/ipc/
A Dbuilt-in.a8 shm.o/
A DMakefile7 obj-$(CONFIG_SYSVIPC) += util.o msgutil.o msg.o sem.o shm.o syscall.o

Completed in 47 milliseconds

12345678910>>...122