Lines Matching refs:active
71 } active; member
136 struct pvcalls_data_intf *intf = map->active.ring; in pvcalls_front_write_todo()
153 struct pvcalls_data_intf *intf = map->active.ring; in pvcalls_front_read_todo()
235 unbind_from_irqhandler(map->active.irq, map); in pvcalls_front_destroy_active()
245 gnttab_end_foreign_access(map->active.ring->ref[i], NULL); in pvcalls_front_destroy_active()
246 gnttab_end_foreign_access(map->active.ref, NULL); in pvcalls_front_destroy_active()
265 wake_up_interruptible(&map->active.inflight_conn_req); in pvcalls_front_conn_handler()
347 if (!map->active.ring) in free_active_ring()
350 free_pages_exact(map->active.data.in, in free_active_ring()
351 PAGE_SIZE << map->active.ring->ring_order); in free_active_ring()
352 free_page((unsigned long)map->active.ring); in free_active_ring()
359 map->active.ring = (struct pvcalls_data_intf *) in alloc_active_ring()
361 if (!map->active.ring) in alloc_active_ring()
364 map->active.ring->ring_order = PVCALLS_RING_ORDER; in alloc_active_ring()
370 map->active.data.in = bytes; in alloc_active_ring()
371 map->active.data.out = bytes + in alloc_active_ring()
387 init_waitqueue_head(&map->active.inflight_conn_req); in create_active()
389 bytes = map->active.data.in; in create_active()
391 map->active.ring->ref[i] = gnttab_grant_foreign_access( in create_active()
395 map->active.ref = gnttab_grant_foreign_access( in create_active()
397 pfn_to_gfn(virt_to_pfn((void *)map->active.ring)), 0); in create_active()
409 map->active.irq = irq; in create_active()
411 mutex_init(&map->active.in_mutex); in create_active()
412 mutex_init(&map->active.out_mutex); in create_active()
466 req->u.connect.ref = map->active.ref; in pvcalls_front_connect()
556 mutex_lock(&map->active.out_mutex); in pvcalls_front_sendmsg()
558 mutex_unlock(&map->active.out_mutex); in pvcalls_front_sendmsg()
567 sent = __write_ring(map->active.ring, in pvcalls_front_sendmsg()
568 &map->active.data, &msg->msg_iter, in pvcalls_front_sendmsg()
573 notify_remote_via_irq(map->active.irq); in pvcalls_front_sendmsg()
580 mutex_unlock(&map->active.out_mutex); in pvcalls_front_sendmsg()
647 mutex_lock(&map->active.in_mutex); in pvcalls_front_recvmsg()
652 wait_event_interruptible(map->active.inflight_conn_req, in pvcalls_front_recvmsg()
655 ret = __read_ring(map->active.ring, &map->active.data, in pvcalls_front_recvmsg()
659 notify_remote_via_irq(map->active.irq); in pvcalls_front_recvmsg()
665 mutex_unlock(&map->active.in_mutex); in pvcalls_front_recvmsg()
858 req->u.accept.ref = map2->active.ref; in pvcalls_front_accept()
972 struct pvcalls_data_intf *intf = map->active.ring; in pvcalls_front_poll_active()
977 poll_wait(file, &map->active.inflight_conn_req, wait); in pvcalls_front_poll_active()
1055 map->active.ring->in_error = -EBADF; in pvcalls_front_release()
1056 wake_up_interruptible(&map->active.inflight_conn_req); in pvcalls_front_release()
1110 map->active.ring->in_error = -EBADF; in pvcalls_front_remove()
1111 wake_up_interruptible(&map->active.inflight_conn_req); in pvcalls_front_remove()