Lines Matching refs:mem

44 static bool __maybe_unused param_mem_from_mobj(struct param_mem *mem,  in param_mem_from_mobj()  argument
57 mem->mobj = mobj_get(mobj); in param_mem_from_mobj()
58 mem->offs = pa - b; in param_mem_from_mobj()
59 mem->size = sz; in param_mem_from_mobj()
65 struct param_mem *mem) in set_fmem_param() argument
72 mem->mobj = NULL; in set_fmem_param()
73 mem->offs = 0; in set_fmem_param()
74 mem->size = 0; in set_fmem_param()
77 mem->mobj = mobj_ffa_get_by_cookie(global_id, in set_fmem_param()
79 if (!mem->mobj) in set_fmem_param()
82 mem->offs = reg_pair_to_64(READ_ONCE(fmem->offs_high), in set_fmem_param()
84 mem->size = sz; in set_fmem_param()
90 if (ADD_OVERFLOW(mem->offs, mem->size, &req_size) || in set_fmem_param()
91 mem->mobj->size < req_size) in set_fmem_param()
99 uint32_t attr, struct param_mem *mem) in set_tmem_param() argument
109 mem->mobj = NULL; in set_tmem_param()
110 mem->offs = 0; in set_tmem_param()
111 mem->size = 0; in set_tmem_param()
119 mem->mobj = msg_param_mobj_from_noncontig(pa, sz, shm_ref, in set_tmem_param()
121 if (!mem->mobj) in set_tmem_param()
123 mem->offs = 0; in set_tmem_param()
124 mem->size = sz; in set_tmem_param()
130 if (param_mem_from_mobj(mem, shm_mobj, pa, sz)) in set_tmem_param()
137 if (param_mem_from_mobj(mem, *mobj, pa, sz)) in set_tmem_param()
146 struct param_mem *mem) in set_rmem_param() argument
152 mem->mobj = mobj_reg_shm_get_by_cookie(shm_ref); in set_rmem_param()
153 if (!mem->mobj) in set_rmem_param()
156 mem->offs = READ_ONCE(rmem->offs); in set_rmem_param()
157 mem->size = sz; in set_rmem_param()
163 if (ADD_OVERFLOW(mem->offs, mem->size, &req_size) || in set_rmem_param()
164 mem->mobj->size < req_size) in set_rmem_param()
212 &ta_param->u[n].mem); in copy_in_params()
223 &ta_param->u[n].mem); in copy_in_params()
234 &ta_param->u[n].mem); in copy_in_params()
267 mobj_put(param->u[n].mem.mobj); in cleanup_shm_refs()
287 params[n].u.tmem.size = ta_param->u[n].mem.size; in copy_out_param()
291 params[n].u.rmem.size = ta_param->u[n].mem.size; in copy_out_param()