Home
last modified time | relevance | path

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

1234

/openbmc/linux/drivers/tee/
H A Dtee_shm.c48 unpin_user_pages(shm->pages, shm->num_pages); in release_registered_pages()
50 shm_put_kernel_pages(shm->pages, shm->num_pages); in release_registered_pages()
72 kfree(shm); in tee_shm_release()
94 shm = kzalloc(sizeof(*shm), GFP_KERNEL); in shm_alloc_helper()
95 if (!shm) { in shm_alloc_helper()
119 return shm; in shm_alloc_helper()
121 kfree(shm); in shm_alloc_helper()
238 shm = kzalloc(sizeof(*shm), GFP_KERNEL); in register_shm_helper()
283 unpin_user_pages(shm->pages, shm->num_pages); in register_shm_helper()
285 shm_put_kernel_pages(shm->pages, shm->num_pages); in register_shm_helper()
[all …]
H A Dtee_shm_pool.c12 static int pool_op_gen_alloc(struct tee_shm_pool *pool, struct tee_shm *shm, in pool_op_gen_alloc() argument
26 shm->kaddr = (void *)va; in pool_op_gen_alloc()
27 shm->paddr = gen_pool_virt_to_phys(genpool, va); in pool_op_gen_alloc()
28 shm->size = s; in pool_op_gen_alloc()
33 shm->flags &= ~TEE_SHM_DYNAMIC; in pool_op_gen_alloc()
37 static void pool_op_gen_free(struct tee_shm_pool *pool, struct tee_shm *shm) in pool_op_gen_free() argument
39 gen_pool_free(pool->private_data, (unsigned long)shm->kaddr, in pool_op_gen_free()
40 shm->size); in pool_op_gen_free()
41 shm->kaddr = NULL; in pool_op_gen_free()
H A Dtee_core.c291 struct tee_shm *shm; in tee_ioctl_shm_alloc() local
301 if (IS_ERR(shm)) in tee_ioctl_shm_alloc()
304 data.id = shm->id; in tee_ioctl_shm_alloc()
317 tee_shm_put(shm); in tee_ioctl_shm_alloc()
327 struct tee_shm *shm; in tee_ioctl_shm_register() local
337 if (IS_ERR(shm)) in tee_ioctl_shm_register()
340 data.id = shm->id; in tee_ioctl_shm_register()
352 tee_shm_put(shm); in tee_ioctl_shm_register()
403 if (IS_ERR(shm)) in params_from_user()
418 shm = NULL; in params_from_user()
[all …]
/openbmc/u-boot/drivers/tee/
H A Dtee-uclass.c65 shm = calloc(1, sizeof(*shm)); in __tee_shm_add()
66 if (!shm) { in __tee_shm_add()
71 shm->dev = dev; in __tee_shm_add()
72 shm->addr = p; in __tee_shm_add()
88 *shmp = shm; in __tee_shm_add()
92 free(shm); in __tee_shm_add()
121 if (!shm) in tee_shm_free()
125 tee_get_ops(shm->dev)->shm_unregister(shm->dev, shm); in tee_shm_free()
133 free(shm); in tee_shm_free()
142 if (s == shm) in tee_shm_is_registered()
[all …]
/openbmc/linux/drivers/tee/amdtee/
H A Dshm_pool.c11 static int pool_op_alloc(struct tee_shm_pool *pool, struct tee_shm *shm, in pool_op_alloc() argument
26 shm->kaddr = (void *)va; in pool_op_alloc()
27 shm->paddr = __psp_pa((void *)va); in pool_op_alloc()
28 shm->size = PAGE_SIZE << order; in pool_op_alloc()
31 rc = amdtee_map_shmem(shm); in pool_op_alloc()
34 shm->kaddr = NULL; in pool_op_alloc()
41 static void pool_op_free(struct tee_shm_pool *pool, struct tee_shm *shm) in pool_op_free() argument
44 amdtee_unmap_shmem(shm); in pool_op_free()
45 free_pages((unsigned long)shm->kaddr, get_order(shm->size)); in pool_op_free()
46 shm->kaddr = NULL; in pool_op_free()
H 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()
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()
389 if (!shm) in amdtee_unmap_shmem()
392 buf_id = get_buffer_id(shm); in amdtee_unmap_shmem()
[all …]
/openbmc/linux/include/linux/
H A Dtee_drv.h63 struct tee_shm *shm; member
286 return shm && (shm->flags & TEE_SHM_DYNAMIC); in tee_shm_is_dynamic()
293 void tee_shm_free(struct tee_shm *shm);
299 void tee_shm_put(struct tee_shm *shm);
308 void *tee_shm_get_va(struct tee_shm *shm, size_t offs);
327 return shm->size; in tee_shm_get_size()
339 *num_pages = shm->num_pages; in tee_shm_get_pages()
340 return shm->pages; in tee_shm_get_pages()
350 return shm->offset; in tee_shm_get_page_offset()
358 static inline int tee_shm_get_id(struct tee_shm *shm) in tee_shm_get_id() argument
[all …]
/openbmc/linux/drivers/tee/optee/
H 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()
451 if (IS_ERR(shm)) { in handle_ffa_rpc_func_cmd_shm_alloc()
477 if (!shm) in handle_ffa_rpc_func_cmd_shm_free()
[all …]
H A Dcore.c24 struct tee_shm *shm, in optee_pool_op_alloc_helper()
41 shm->kaddr = page_address(page); in optee_pool_op_alloc_helper()
42 shm->paddr = page_to_phys(page); in optee_pool_op_alloc_helper()
43 shm->size = PAGE_SIZE << order; in optee_pool_op_alloc_helper()
58 rc = shm_register(shm->ctx, shm, pages, nr_pages, in optee_pool_op_alloc_helper()
59 (unsigned long)shm->kaddr); in optee_pool_op_alloc_helper()
68 free_pages((unsigned long)shm->kaddr, order); in optee_pool_op_alloc_helper()
74 struct tee_shm *shm)) in optee_pool_op_free_helper()
77 shm_unregister(shm->ctx, shm); in optee_pool_op_free_helper()
78 free_pages((unsigned long)shm->kaddr, get_order(shm->size)); in optee_pool_op_free_helper()
[all …]
H A Dsmc_abi.c85 struct tee_shm *shm; in from_msg_param_tmp_mem() local
93 if (!shm) { in from_msg_param_tmp_mem()
104 p->u.memref.shm = shm; in from_msg_param_tmp_mem()
112 struct tee_shm *shm; in from_msg_param_reg_mem() local
119 if (shm) { in from_msg_param_reg_mem()
121 p->u.memref.shm = shm; in from_msg_param_reg_mem()
334 tee_shm_free(shm); in __optee_disable_shm_cache()
668 tee_shm_free(shm); in handle_rpc_func_cmd_shm_free()
714 if (IS_ERR(shm)) { in handle_rpc_func_cmd_shm_alloc()
770 tee_shm_free(shm); in handle_rpc_func_cmd_shm_alloc()
[all …]
H A Dcall.c38 struct tee_shm *shm; member
156 tee_shm_free(entry->shm); in optee_shm_arg_cache_uninit()
229 entry->shm = res; in optee_get_msg_arg()
235 res = tee_shm_get_va(entry->shm, offs); in optee_get_msg_arg()
243 *shm_ret = entry->shm; in optee_get_msg_arg()
287 struct tee_shm *shm; in optee_open_session() local
296 &entry, &shm, &offs); in optee_open_session()
368 struct tee_shm *shm; in optee_close_session_helper() local
410 struct tee_shm *shm; in optee_invoke_func() local
422 &entry, &shm, &offs); in optee_invoke_func()
[all …]
H A Drpc.c88 msg.buf = params[2].u.memref.shm->kaddr; in handle_rpc_func_cmd_i2c_transfer()
215 struct tee_shm *shm; in optee_rpc_cmd_alloc_suppl() local
228 shm = tee_shm_get_from_id(optee->supp.ctx, param.u.value.c); in optee_rpc_cmd_alloc_suppl()
230 return shm; in optee_rpc_cmd_alloc_suppl()
233 void optee_rpc_cmd_free_suppl(struct tee_context *ctx, struct tee_shm *shm) in optee_rpc_cmd_free_suppl() argument
239 param.u.value.b = tee_shm_get_id(shm); in optee_rpc_cmd_free_suppl()
253 tee_shm_put(shm); in optee_rpc_cmd_free_suppl()
/openbmc/linux/drivers/nvmem/
H A Dstm32-bsec-optee-ta.c142 struct tee_shm *shm; in stm32_bsec_optee_ta_read() local
169 if (IS_ERR(shm)) { in stm32_bsec_optee_ta_read()
170 ret = PTR_ERR(shm); in stm32_bsec_optee_ta_read()
175 param[1].u.memref.shm = shm; in stm32_bsec_optee_ta_read()
196 tee_shm_free(shm); in stm32_bsec_optee_ta_read()
207 { struct tee_shm *shm; in stm32_bsec_optee_ta_write() local
234 if (IS_ERR(shm)) { in stm32_bsec_optee_ta_write()
235 ret = PTR_ERR(shm); in stm32_bsec_optee_ta_write()
240 param[1].u.memref.shm = shm; in stm32_bsec_optee_ta_write()
247 tee_shm_free(shm); in stm32_bsec_optee_ta_write()
[all …]
/openbmc/openbmc/meta-openembedded/meta-oe/recipes-devtools/php/php/
H A D0001-ext-opcache-config.m4-enable-opcache.patch39 -#include <sys/shm.h>
47 - char *shm;
62 - shmdt(shm);
72 - shmdt(shm);
79 - strcpy(shm, "hello");
85 - strcpy(shm, "bye");
127 - char *shm;
134 - strcpy(shm, "hello");
140 - strcpy(shm, "bye");
192 - char *shm;
[all …]
/openbmc/u-boot/drivers/tee/optee/
H A Dcore.c203 struct tee_shm *shm; in from_msg_param() local
232 if (!shm) { in from_msg_param()
238 p->u.memref.shm = shm; in from_msg_param()
250 struct tee_shm *shm; in handle_rpc() local
256 &shm)) { in handle_rpc()
270 tee_shm_free(shm); in handle_rpc()
333 struct tee_shm *shm; in optee_close_session() local
344 tee_shm_free(shm); in optee_close_session()
396 tee_shm_free(shm); in optee_open_session()
434 tee_shm_free(shm); in optee_invoke_func()
[all …]
H A Dsupplicant.c20 struct tee_shm *shm; in cmd_shm_alloc() local
33 TEE_SHM_REGISTER | TEE_SHM_ALLOC, &shm); in cmd_shm_alloc()
42 pl = optee_alloc_and_init_page_list(shm->addr, shm->size, &ph_ptr); in cmd_shm_alloc()
45 tee_shm_free(shm); in cmd_shm_alloc()
53 arg->params[0].u.tmem.size = shm->size; in cmd_shm_alloc()
54 arg->params[0].u.tmem.shm_ref = (ulong)shm; in cmd_shm_alloc()
/openbmc/linux/drivers/media/platform/samsung/s5p-mfc/
H 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 …]
/openbmc/linux/drivers/rtc/
H A Drtc-optee.c51 struct tee_shm *shm; member
69 param[0].u.memref.shm = priv->shm; in optee_rtc_readtime()
76 optee_tm = tee_shm_get_va(priv->shm, 0); in optee_rtc_readtime()
117 param[0].u.memref.shm = priv->shm; in optee_rtc_settime()
204 param[0].u.memref.shm = priv->shm; in optee_rtc_read_info()
211 info = tee_shm_get_va(priv->shm, 0); in optee_rtc_read_info()
247 struct tee_shm *shm; in optee_rtc_probe() local
278 if (IS_ERR(shm)) { in optee_rtc_probe()
280 err = PTR_ERR(shm); in optee_rtc_probe()
284 priv->shm = shm; in optee_rtc_probe()
[all …]
/openbmc/openbmc/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/
H A D0004-shm.c-Mark-glibc-specific-changes-so.patch4 Subject: [PATCH] shm.c: Mark glibc specific changes so
11 shm.c | 3 ++-
14 diff --git a/shm.c b/shm.c
16 --- a/shm.c
17 +++ b/shm.c
/openbmc/linux/drivers/char/tpm/
H A Dtpm_ftpm_tee.c81 struct tee_shm *shm = pvt_data->shm; in ftpm_tee_tpm_op_send() local
105 .shm = shm, in ftpm_tee_tpm_op_send()
111 temp_buf = tee_shm_get_va(shm, 0); in ftpm_tee_tpm_op_send()
123 .shm = shm, in ftpm_tee_tpm_op_send()
137 temp_buf = tee_shm_get_va(shm, command_params[1].u.memref.shm_offs); in ftpm_tee_tpm_op_send()
256 pvt_data->shm = tee_shm_alloc_kernel_buf(pvt_data->ctx, in ftpm_tee_probe()
259 if (IS_ERR(pvt_data->shm)) { in ftpm_tee_probe()
289 tee_shm_free(pvt_data->shm); in ftpm_tee_probe()
323 tee_shm_free(pvt_data->shm); in ftpm_tee_remove()
351 tee_shm_free(pvt_data->shm); in ftpm_plat_tee_shutdown()
/openbmc/linux/sound/usb/usx2y/
H 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 …]
/openbmc/linux/tools/testing/selftests/futex/functional/
H 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()
/openbmc/linux/Documentation/devicetree/bindings/spi/
H A Dnuvoton,wpcm450-fiu.yaml35 nuvoton,shm:
37 description: a phandle to the SHM block (see ../arm/nuvoton,shm.yaml)
55 nuvoton,shm = <&shm>;
63 shm: syscon@c8001000 {
64 compatible = "nuvoton,wpcm450-shm", "syscon";
/openbmc/openbmc/poky/meta/recipes-core/systemd/systemd/
H A Dinit43 [ -e /dev/shm ] || mkdir -m 1777 /dev/shm
63 [ -e /dev/shm/udev.cache ] && rm -f /dev/shm/udev.cache
65 echo "$VERSION$CMDLINE$DEVICES$ATAGS" > /dev/shm/udev.cache
68 echo "$VERSION$CMDLINE$DEVICES$ATAGS" > /dev/shm/udev.cache
/openbmc/u-boot/include/
H A Dtee.h96 struct tee_shm *shm; member
225 int (*shm_register)(struct udevice *dev, struct tee_shm *shm);
232 int (*shm_unregister)(struct udevice *dev, struct tee_shm *shm);
282 void tee_shm_free(struct tee_shm *shm);
292 bool tee_shm_is_registered(struct tee_shm *shm, struct udevice *dev);

1234