Lines Matching defs:drv_info

88 static struct ffa_drv_info *drv_info;
196 if (drv_info->version > FFA_VERSION_1_0 &&
200 mutex_lock(&drv_info->rx_lock);
208 mutex_unlock(&drv_info->rx_lock);
214 if (drv_info->version > FFA_VERSION_1_0) {
225 memcpy(buffer + idx, drv_info->rx_buffer + idx * sz,
230 mutex_unlock(&drv_info->rx_lock);
428 mem_region->sender_id = drv_info->vm_id;
501 buffer = drv_info->tx_buffer;
502 mutex_lock(&drv_info->tx_lock);
508 mutex_unlock(&drv_info->tx_lock);
561 drv_info->mem_ops_native = true;
566 return drv_info->version;
598 return ffa_msg_send_direct_req(drv_info->vm_id, dev->vm_id,
604 if (drv_info->mem_ops_native)
619 if (drv_info->mem_ops_native)
657 if (drv_info->version > FFA_VERSION_1_0)
699 if (drv_info->version > FFA_VERSION_1_0 &&
718 drv_info = kzalloc(sizeof(*drv_info), GFP_KERNEL);
719 if (!drv_info) {
724 ret = ffa_version_check(&drv_info->version);
728 if (ffa_id_get(&drv_info->vm_id)) {
734 drv_info->rx_buffer = alloc_pages_exact(RXTX_BUFFER_SIZE, GFP_KERNEL);
735 if (!drv_info->rx_buffer) {
740 drv_info->tx_buffer = alloc_pages_exact(RXTX_BUFFER_SIZE, GFP_KERNEL);
741 if (!drv_info->tx_buffer) {
746 ret = ffa_rxtx_map(virt_to_phys(drv_info->tx_buffer),
747 virt_to_phys(drv_info->rx_buffer),
754 mutex_init(&drv_info->rx_lock);
755 mutex_init(&drv_info->tx_lock);
763 if (drv_info->tx_buffer)
764 free_pages_exact(drv_info->tx_buffer, RXTX_BUFFER_SIZE);
765 free_pages_exact(drv_info->rx_buffer, RXTX_BUFFER_SIZE);
767 kfree(drv_info);
776 ffa_rxtx_unmap(drv_info->vm_id);
777 free_pages_exact(drv_info->tx_buffer, RXTX_BUFFER_SIZE);
778 free_pages_exact(drv_info->rx_buffer, RXTX_BUFFER_SIZE);
779 kfree(drv_info);