Lines Matching refs:msg_arg

437 	struct optee_msg_arg *msg_arg;  in optee_shm_register()  local
467 msg_arg = tee_shm_get_va(shm_arg, 0); in optee_shm_register()
468 if (IS_ERR(msg_arg)) { in optee_shm_register()
469 rc = PTR_ERR(msg_arg); in optee_shm_register()
476 memset(msg_arg, 0, OPTEE_MSG_GET_ARG_SIZE(1)); in optee_shm_register()
477 msg_arg->num_params = 1; in optee_shm_register()
478 msg_arg->cmd = OPTEE_MSG_CMD_REGISTER_SHM; in optee_shm_register()
479 msg_arg->params->attr = OPTEE_MSG_ATTR_TYPE_TMEM_OUTPUT | in optee_shm_register()
481 msg_arg->params->u.tmem.shm_ref = (unsigned long)shm; in optee_shm_register()
482 msg_arg->params->u.tmem.size = tee_shm_get_size(shm); in optee_shm_register()
487 msg_arg->params->u.tmem.buf_ptr = virt_to_phys(pages_list) | in optee_shm_register()
491 msg_arg->ret != TEEC_SUCCESS) in optee_shm_register()
503 struct optee_msg_arg *msg_arg; in optee_shm_unregister() local
521 msg_arg = tee_shm_get_va(shm_arg, 0); in optee_shm_unregister()
522 if (IS_ERR(msg_arg)) { in optee_shm_unregister()
523 rc = PTR_ERR(msg_arg); in optee_shm_unregister()
527 memset(msg_arg, 0, sz); in optee_shm_unregister()
528 msg_arg->num_params = 1; in optee_shm_unregister()
529 msg_arg->cmd = OPTEE_MSG_CMD_UNREGISTER_SHM; in optee_shm_unregister()
530 msg_arg->params[0].attr = OPTEE_MSG_ATTR_TYPE_RMEM_INPUT; in optee_shm_unregister()
531 msg_arg->params[0].u.rmem.shm_ref = (unsigned long)shm; in optee_shm_unregister()
534 msg_arg->ret != TEEC_SUCCESS) in optee_shm_unregister()
951 struct optee_msg_arg *msg_arg; in simple_call_with_arg() local
955 msg_arg = optee_get_msg_arg(ctx, 0, &entry, &shm, &offs); in simple_call_with_arg()
956 if (IS_ERR(msg_arg)) in simple_call_with_arg()
957 return PTR_ERR(msg_arg); in simple_call_with_arg()
959 msg_arg->cmd = cmd; in simple_call_with_arg()