Lines Matching refs:ep

37 	struct scif_endpt *ep;  in scif_recv_munmap()  local
39 ep = (struct scif_endpt *)recv_window->ep; in scif_recv_munmap()
45 req.head = &ep->rma_info.reg_list; in scif_recv_munmap()
46 msg->payload[0] = ep->remote_ep; in scif_recv_munmap()
48 mutex_lock(&ep->rma_info.rma_lock); in scif_recv_munmap()
60 atomic_inc(&ep->rma_info.tw_refcount); in scif_recv_munmap()
61 ep->rma_info.async_list_del = 1; in scif_recv_munmap()
63 scif_free_window_offset(ep, window, window->offset); in scif_recv_munmap()
66 mutex_unlock(&ep->rma_info.rma_lock); in scif_recv_munmap()
75 static void __scif_zap_mmaps(struct scif_endpt *ep) in __scif_zap_mmaps() argument
82 spin_lock(&ep->lock); in __scif_zap_mmaps()
83 list_for_each(item, &ep->rma_info.vma_list) { in __scif_zap_mmaps()
90 __func__, ep, info->vma, size); in __scif_zap_mmaps()
92 spin_unlock(&ep->lock); in __scif_zap_mmaps()
101 struct scif_endpt *ep; in _scif_zap_mmaps() local
106 ep = list_entry(item, struct scif_endpt, list); in _scif_zap_mmaps()
107 if (ep->remote_dev->node == node) in _scif_zap_mmaps()
108 __scif_zap_mmaps(ep); in _scif_zap_mmaps()
131 static void __scif_cleanup_rma_for_zombies(struct scif_endpt *ep) in __scif_cleanup_rma_for_zombies() argument
136 list_for_each_safe(pos, tmp, &ep->rma_info.remote_reg_list) { in __scif_cleanup_rma_for_zombies()
145 atomic_inc(&ep->rma_info.tw_refcount); in __scif_cleanup_rma_for_zombies()
155 struct scif_endpt *ep; in scif_cleanup_rma_for_zombies() local
160 ep = list_entry(item, struct scif_endpt, list); in scif_cleanup_rma_for_zombies()
161 if (ep->remote_dev && ep->remote_dev->node == node) in scif_cleanup_rma_for_zombies()
162 __scif_cleanup_rma_for_zombies(ep); in scif_cleanup_rma_for_zombies()
169 static int scif_insert_vma(struct scif_endpt *ep, struct vm_area_struct *vma) in scif_insert_vma() argument
180 spin_lock(&ep->lock); in scif_insert_vma()
181 list_add_tail(&info->list, &ep->rma_info.vma_list); in scif_insert_vma()
182 spin_unlock(&ep->lock); in scif_insert_vma()
188 static void scif_delete_vma(struct scif_endpt *ep, struct vm_area_struct *vma) in scif_delete_vma() argument
193 spin_lock(&ep->lock); in scif_delete_vma()
194 list_for_each(item, &ep->rma_info.vma_list) { in scif_delete_vma()
202 spin_unlock(&ep->lock); in scif_delete_vma()
205 static phys_addr_t scif_get_phys(phys_addr_t phys, struct scif_endpt *ep) in scif_get_phys() argument
207 struct scif_dev *scifdev = (struct scif_dev *)ep->remote_dev; in scif_get_phys()
224 struct scif_endpt *ep = (struct scif_endpt *)epd; in scif_get_pages() local
231 ep, offset, len); in scif_get_pages()
232 err = scif_verify_epd(ep); in scif_get_pages()
249 req.head = &ep->rma_info.remote_reg_list; in scif_get_pages()
251 mutex_lock(&ep->rma_info.rma_lock); in scif_get_pages()
255 dev_err(&ep->remote_dev->sdev->dev, in scif_get_pages()
274 if (scif_is_mgmt_node() && !scifdev_self(ep->remote_dev)) { in scif_get_pages()
292 ep); in scif_get_pages()
293 if (scif_is_mgmt_node() && !scifdev_self(ep->remote_dev)) in scif_get_pages()
295 ep->remote_dev->sdev->aper->va + in scif_get_pages()
297 ep->remote_dev->sdev->aper->pa; in scif_get_pages()
302 mutex_unlock(&ep->rma_info.rma_lock); in scif_get_pages()
312 dev_err(&ep->remote_dev->sdev->dev, in scif_get_pages()
321 struct scif_endpt *ep; in scif_put_pages() local
333 ep = (struct scif_endpt *)window->ep; in scif_put_pages()
340 if (ep->state != SCIFEP_CONNECTED && ep->state != SCIFEP_DISCONNECTED) in scif_put_pages()
343 mutex_lock(&ep->rma_info.rma_lock); in scif_put_pages()
350 mutex_unlock(&ep->rma_info.rma_lock); in scif_put_pages()
351 scif_drain_dma_intr(ep->remote_dev->sdev, in scif_put_pages()
352 ep->rma_info.dma_chan); in scif_put_pages()
355 msg.src = ep->port; in scif_put_pages()
358 scif_nodeqp_send(ep->remote_dev, &msg); in scif_put_pages()
362 mutex_unlock(&ep->rma_info.rma_lock); in scif_put_pages()
387 struct scif_endpt *ep = (struct scif_endpt *)start_window->ep; in scif_rma_list_mmap() local
388 struct list_head *head = &ep->rma_info.remote_reg_list; in scif_rma_list_mmap()
406 phys_addr = scif_get_phys(phys_addr, ep); in scif_rma_list_mmap()
430 head = &ep->rma_info.remote_reg_list; in scif_rma_list_mmap()
464 struct scif_endpt *ep = (struct scif_endpt *)start_window->ep; in scif_rma_list_munmap() local
465 struct list_head *head = &ep->rma_info.remote_reg_list; in scif_rma_list_munmap()
469 msg.src = ep->port; in scif_rma_list_munmap()
480 struct scif_dev *rdev = ep->remote_dev; in scif_rma_list_munmap()
483 ep->rma_info.dma_chan); in scif_rma_list_munmap()
487 scif_nodeqp_send(ep->remote_dev, &msg); in scif_rma_list_munmap()
504 struct scif_endpt *ep; /* End point for remote window */ member
540 scif_insert_vma(vmapvt->ep, vma); in scif_vma_open()
553 struct scif_endpt *ep; in scif_munmap() local
565 ep = vmapvt->ep; in scif_munmap()
570 ep, nr_pages, offset); in scif_munmap()
576 req.head = &ep->rma_info.remote_reg_list; in scif_munmap()
578 mutex_lock(&ep->rma_info.rma_lock); in scif_munmap()
587 mutex_unlock(&ep->rma_info.rma_lock); in scif_munmap()
595 scif_delete_vma(ep, vma); in scif_munmap()
615 struct scif_endpt *ep = (struct scif_endpt *)epd; in scif_mmap() local
623 ep, start_offset, nr_pages); in scif_mmap()
624 err = scif_verify_epd(ep); in scif_mmap()
630 err = scif_insert_vma(ep, vma); in scif_mmap()
636 scif_delete_vma(ep, vma); in scif_mmap()
640 vmapvt->ep = ep; in scif_mmap()
648 req.head = &ep->rma_info.remote_reg_list; in scif_mmap()
650 mutex_lock(&ep->rma_info.rma_lock); in scif_mmap()
654 dev_err(&ep->remote_dev->sdev->dev, in scif_mmap()
660 if (!scifdev_self(ep->remote_dev)) in scif_mmap()
677 if (!scifdev_self(ep->remote_dev)) in scif_mmap()
683 dev_err(&ep->remote_dev->sdev->dev, in scif_mmap()
691 mutex_unlock(&ep->rma_info.rma_lock); in scif_mmap()
694 dev_err(&ep->remote_dev->sdev->dev, in scif_mmap()
696 scif_delete_vma(ep, vma); in scif_mmap()