Searched refs:shm (Results 1 - 25 of 87) sorted by relevance

1234

/linux-master/drivers/tee/
H A Dtee_shm.c34 static void release_registered_pages(struct tee_shm *shm) argument
36 if (shm->pages) {
37 if (shm->flags & TEE_SHM_USER_MAPPED)
38 unpin_user_pages(shm->pages, shm->num_pages);
40 shm_put_kernel_pages(shm->pages, shm->num_pages);
42 kfree(shm->pages);
46 static void tee_shm_release(struct tee_device *teedev, struct tee_shm *shm) argument
48 if (shm
71 struct tee_shm *shm; local
133 struct tee_shm *shm; local
206 tee_dyn_shm_alloc_helper(struct tee_shm *shm, size_t size, size_t align, int (*shm_register)(struct tee_context *ctx, struct tee_shm *shm, struct page **pages, size_t num_pages, unsigned long start)) argument
257 tee_dyn_shm_free_helper(struct tee_shm *shm, int (*shm_unregister)(struct tee_context *ctx, struct tee_shm *shm)) argument
275 struct tee_shm *shm; local
372 struct tee_shm *shm; local
439 struct tee_shm *shm = filp->private_data; local
465 tee_shm_get_fd(struct tee_shm *shm) argument
484 tee_shm_free(struct tee_shm *shm) argument
497 tee_shm_get_va(struct tee_shm *shm, size_t offs) argument
515 tee_shm_get_pa(struct tee_shm *shm, size_t offs, phys_addr_t *pa) argument
535 struct tee_shm *shm; local
561 tee_shm_put(struct tee_shm *shm) argument
[all...]
H A Dtee_shm_pool.c12 static int pool_op_gen_alloc(struct tee_shm_pool *pool, struct tee_shm *shm, argument
26 shm->kaddr = (void *)va;
27 shm->paddr = gen_pool_virt_to_phys(genpool, va);
28 shm->size = s;
33 shm->flags &= ~TEE_SHM_DYNAMIC;
37 static void pool_op_gen_free(struct tee_shm_pool *pool, struct tee_shm *shm) argument
39 gen_pool_free(pool->private_data, (unsigned long)shm->kaddr,
40 shm->size);
41 shm->kaddr = NULL;
H A Dtee_private.h15 int tee_shm_get_fd(struct tee_shm *shm);
H A Dtee_core.c294 struct tee_shm *shm; local
303 shm = tee_shm_alloc_user_buf(ctx, data.size);
304 if (IS_ERR(shm))
305 return PTR_ERR(shm);
307 data.id = shm->id;
308 data.size = shm->size;
313 ret = tee_shm_get_fd(shm);
320 tee_shm_put(shm);
330 struct tee_shm *shm; local
339 shm
366 struct tee_shm *shm; local
[all...]
/linux-master/drivers/tee/amdtee/
H A Dshm_pool.c11 static int pool_op_alloc(struct tee_shm_pool *pool, struct tee_shm *shm, argument
26 shm->kaddr = (void *)va;
27 shm->paddr = __psp_pa((void *)va);
28 shm->size = PAGE_SIZE << order;
31 rc = amdtee_map_shmem(shm);
34 shm->kaddr = NULL;
41 static void pool_op_free(struct tee_shm_pool *pool, struct tee_shm *shm) argument
44 amdtee_unmap_shmem(shm);
45 free_pages((unsigned long)shm->kaddr, get_order(shm
[all...]
H A Dcore.c152 u32 get_buffer_id(struct tee_shm *shm) argument
154 struct amdtee_context_data *ctxdata = shm->ctx->data;
160 if (shmdata->kaddr == shm->kaddr) {
340 int amdtee_map_shmem(struct tee_shm *shm) argument
348 if (!shm)
356 shmem.kaddr = shm->kaddr;
357 shmem.size = shm->size;
370 shmnode->kaddr = shm->kaddr;
372 ctxdata = shm->ctx->data;
382 void amdtee_unmap_shmem(struct tee_shm *shm) argument
[all...]
H 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-master/include/linux/
H A Dtee_drv.h82 struct tee_shm *shm; member in struct:tee_param_memref
121 * @shm: Handle to shared memory to free
123 void tee_shm_free(struct tee_shm *shm);
127 * @shm: Shared memory handle
132 void *tee_shm_get_va(struct tee_shm *shm, size_t offs);
136 * @shm: Shared memory handle
142 int tee_shm_get_pa(struct tee_shm *shm, size_t offs, phys_addr_t *pa);
146 * @shm: Shared memory handle
149 static inline size_t tee_shm_get_size(struct tee_shm *shm) argument
151 return shm
160 tee_shm_get_pages(struct tee_shm *shm, size_t *num_pages) argument
172 tee_shm_get_page_offset(struct tee_shm *shm) argument
[all...]
H A Dtee_core.h98 int (*shm_register)(struct tee_context *ctx, struct tee_shm *shm,
101 int (*shm_unregister)(struct tee_context *ctx, struct tee_shm *shm);
190 int (*alloc)(struct tee_shm_pool *pool, struct tee_shm *shm,
192 void (*free)(struct tee_shm_pool *pool, struct tee_shm *shm);
197 * tee_shm_pool_alloc_res_mem() - Create a shm manager for reserved memory
235 int tee_dyn_shm_alloc_helper(struct tee_shm *shm, size_t size, size_t align,
237 struct tee_shm *shm,
241 void tee_dyn_shm_free_helper(struct tee_shm *shm,
243 struct tee_shm *shm));
247 * @shm
250 tee_shm_is_dynamic(struct tee_shm *shm) argument
266 tee_shm_get_id(struct tee_shm *shm) argument
[all...]
/linux-master/tools/testing/selftests/futex/functional/
H A Dfutex_wait.c9 #include <sys/shm.h>
54 void *shm; local
137 shm = mmap(NULL, sizeof(f_private), PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
138 if (shm == MAP_FAILED) {
143 memcpy(shm, &f_private, sizeof(f_private));
145 futex = shm;
154 res = futex_wake(shm, 1, 0);
165 munmap(shm, sizeof(f_private));
/linux-master/drivers/nvmem/
H A Dstm32-bsec-optee-ta.c142 struct tee_shm *shm; local
168 shm = tee_shm_alloc_kernel_buf(ctx, num_bytes);
169 if (IS_ERR(shm)) {
170 ret = PTR_ERR(shm);
175 param[1].u.memref.shm = shm;
186 shm_buf = tee_shm_get_va(shm, 0);
196 tee_shm_free(shm);
207 { struct tee_shm *shm; local
233 shm
[all...]
/linux-master/drivers/char/tpm/
H A Dtpm_ftpm_tee.h29 * @shm: Memory pool shared with fTPM TA in TEE.
37 struct tee_shm *shm; member in struct:ftpm_tee_private
H A Dtpm_ftpm_tee.c81 struct tee_shm *shm = pvt_data->shm; local
105 .shm = shm,
111 temp_buf = tee_shm_get_va(shm, 0);
123 .shm = shm,
137 temp_buf = tee_shm_get_va(shm, command_params[1].u.memref.shm_offs);
256 pvt_data->shm = tee_shm_alloc_kernel_buf(pvt_data->ctx,
259 if (IS_ERR(pvt_data->shm)) {
[all...]
/linux-master/drivers/tee/tstee/
H A Dcore.c167 struct tee_shm *shm = NULL; local
194 shm = tee_shm_get_from_id(ctx, shm_id);
195 if (IS_ERR(shm))
196 return PTR_ERR(shm);
198 if (shm->size < req_len) {
205 handle = shm->sec_world_id;
232 if (shm && shm->size >= ffa_args[TS_RPC_SERVICE_RESP_LEN])
236 if (shm)
237 tee_shm_put(shm);
242 tstee_shm_register(struct tee_context *ctx, struct tee_shm *shm, struct page **pages, size_t num_pages, unsigned long start __always_unused) argument
307 tstee_shm_unregister(struct tee_context *ctx, struct tee_shm *shm) argument
355 pool_op_alloc(struct tee_shm_pool *pool, struct tee_shm *shm, size_t size, size_t align) argument
361 pool_op_free(struct tee_shm_pool *pool, struct tee_shm *shm) argument
[all...]
/linux-master/drivers/tee/optee/
H A Dsmc_abi.c49 * A typical OP-TEE private shm allocation is 224 bytes (argument struct
85 struct tee_shm *shm; local
92 shm = (struct tee_shm *)(unsigned long)mp->u.tmem.shm_ref;
93 if (!shm) {
95 p->u.memref.shm = NULL;
99 rc = tee_shm_get_pa(shm, 0, &pa);
104 p->u.memref.shm = shm;
112 struct tee_shm *shm; local
117 shm
323 struct tee_shm *shm; local
452 optee_shm_register(struct tee_context *ctx, struct tee_shm *shm, struct page **pages, size_t num_pages, unsigned long start) argument
520 optee_shm_unregister(struct tee_context *ctx, struct tee_shm *shm) argument
561 optee_shm_register_supp(struct tee_context *ctx, struct tee_shm *shm, struct page **pages, size_t num_pages, unsigned long start) argument
572 optee_shm_unregister_supp(struct tee_context *ctx, struct tee_shm *shm) argument
587 pool_op_alloc(struct tee_shm_pool *pool, struct tee_shm *shm, size_t size, size_t align) argument
600 pool_op_free(struct tee_shm_pool *pool, struct tee_shm *shm) argument
651 struct tee_shm *shm; local
680 struct tee_shm *shm; local
819 struct tee_shm *shm; local
885 optee_smc_do_call_with_arg(struct tee_context *ctx, struct tee_shm *shm, u_int offs, bool system_thread) argument
[all...]
H A Dffa_abi.c41 struct tee_shm *shm; member in struct:shm_rhash
61 struct tee_shm *shm = NULL; local
68 shm = r->shm;
71 return shm;
74 static int optee_shm_add_ffa_handle(struct optee *optee, struct tee_shm *shm, argument
83 r->shm = shm;
126 struct tee_shm *shm = NULL; local
135 shm
192 struct tee_shm *shm = p->u.memref.shm; local
269 optee_ffa_shm_register(struct tee_context *ctx, struct tee_shm *shm, struct page **pages, size_t num_pages, unsigned long start) argument
313 optee_ffa_shm_unregister(struct tee_context *ctx, struct tee_shm *shm) argument
342 optee_ffa_shm_unregister_supp(struct tee_context *ctx, struct tee_shm *shm) argument
374 pool_ffa_op_alloc(struct tee_shm_pool *pool, struct tee_shm *shm, size_t size, size_t align) argument
381 pool_ffa_op_free(struct tee_shm_pool *pool, struct tee_shm *shm) argument
430 struct tee_shm *shm; local
470 struct tee_shm *shm; local
616 optee_ffa_do_call_with_arg(struct tee_context *ctx, struct tee_shm *shm, u_int offs, bool system_thread) argument
[all...]
H A Dcall.c38 struct tee_shm *shm; member in struct:optee_shm_arg_entry
238 tee_shm_free(entry->shm);
311 entry->shm = res;
317 res = tee_shm_get_va(entry->shm, offs);
325 *shm_ret = entry->shm;
369 struct tee_shm *shm; local
378 &entry, &shm, &offs);
413 if (optee->ops->do_call_with_arg(ctx, shm, offs,
473 struct tee_shm *shm; local
476 msg_arg = optee_get_msg_arg(ctx, 0, &entry, &shm,
520 struct tee_shm *shm; local
574 struct tee_shm *shm; local
649 struct tee_shm *shm; local
[all...]
H A Drpc.c88 msg.buf = params[2].u.memref.shm->kaddr;
215 struct tee_shm *shm; local
228 shm = tee_shm_get_from_id(optee->supp.ctx, param.u.value.c);
230 return shm;
233 void optee_rpc_cmd_free_suppl(struct tee_context *ctx, struct tee_shm *shm) argument
239 param.u.value.b = tee_shm_get_id(shm);
253 tee_shm_put(shm);
/linux-master/ipc/
H A DMakefile7 obj-$(CONFIG_SYSVIPC) += util.o msgutil.o msg.o sem.o shm.o syscall.o
/linux-master/arch/x86/um/shared/sysdep/
H A Dsyscalls_64.h11 #include <linux/shm.h>
/linux-master/drivers/media/platform/samsung/s5p-mfc/
H A Ds5p_mfc_opr_v5.c224 ctx->shm.size = buf_size->shm;
225 ret = s5p_mfc_alloc_priv_buf(dev, BANK_L_CTX, &ctx->shm);
233 ctx->shm.ofs = ctx->shm.dma - dev->dma_base[BANK_L_CTX];
234 BUG_ON(ctx->shm.ofs & ((1 << MFC_BANK1_ALIGN_ORDER) - 1));
236 memset(ctx->shm.virt, 0, buf_size->shm);
245 s5p_mfc_release_priv_buf(ctx->dev, &ctx->shm);
263 *(u32 *)(ctx->shm
681 unsigned int shm; local
765 unsigned int shm; local
922 unsigned int shm; local
1001 unsigned int shm; local
[all...]
/linux-master/drivers/rtc/
H A Drtc-optee.c44 * @shm: Memory pool shared with RTC device.
51 struct tee_shm *shm; member in struct:optee_rtc
69 param[0].u.memref.shm = priv->shm;
76 optee_tm = tee_shm_get_va(priv->shm, 0);
117 param[0].u.memref.shm = priv->shm;
120 rtc_data = tee_shm_get_va(priv->shm, 0);
204 param[0].u.memref.shm = priv->shm;
247 struct tee_shm *shm; local
[all...]
/linux-master/sound/usb/usx2y/
H A Dusx2yhwdeppcm.c107 struct snd_usx2y_hwdep_pcm_shm *shm = usx2y->hwdep_pcm_shm; local
110 if (shm->playback_iso_start < 0) {
111 shm->playback_iso_start = shm->captured_iso_head -
113 if (shm->playback_iso_start < 0)
114 shm->playback_iso_start += ARRAY_SIZE(shm->captured_iso);
115 shm->playback_iso_head = shm->playback_iso_start;
121 counts = shm
144 struct snd_usx2y_hwdep_pcm_shm *shm; local
[all...]
/linux-master/arch/arm/kernel/
H A Dsys_arm.c18 #include <linux/shm.h>
/linux-master/security/keys/trusted-keys/
H A Dtrusted_tee.c76 dev_err(pvt_data.dev, "shm register failed\n");
85 param[0].u.memref.shm = reg_shm;
89 param[1].u.memref.shm = reg_shm;
123 dev_err(pvt_data.dev, "shm register failed\n");
132 param[0].u.memref.shm = reg_shm;
136 param[1].u.memref.shm = reg_shm;
169 dev_err(pvt_data.dev, "key shm register failed\n");
178 param[0].u.memref.shm = reg_shm;

Completed in 215 milliseconds

1234