epi 77 drivers/media/usb/dvb-usb/m920x.c int ret, i, epi, flags = 0; epi 98 drivers/media/usb/dvb-usb/m920x.c epi = d->adapter[i].props.fe[0].stream.endpoint - 0x81; epi 100 drivers/media/usb/dvb-usb/m920x.c if (epi < 0 || epi >= M9206_MAX_ADAPTERS) { epi 105 drivers/media/usb/dvb-usb/m920x.c adap_enabled[epi] = 1; epi 692 drivers/usb/gadget/udc/gr_udc.c epctrl = gr_read32(&dev->epi[0].regs->epctrl); epi 693 drivers/usb/gadget/udc/gr_udc.c gr_write32(&dev->epi[0].regs->epctrl, epctrl | GR_EPCTRL_CS); epi 832 drivers/usb/gadget/udc/gr_udc.c status = gr_queue_int(&dev->epi[0], dev->ep0reqi, GFP_ATOMIC); epi 993 drivers/usb/gadget/udc/gr_udc.c ep = (is_in ? &dev->epi[epnum] : &dev->epo[epnum]); epi 1222 drivers/usb/gadget/udc/gr_udc.c gr_ep_nuke(&dev->epi[0]); epi 1224 drivers/usb/gadget/udc/gr_udc.c dev->epi[0].stopped = 0; epi 1414 drivers/usb/gadget/udc/gr_udc.c ep = &dev->epi[i]; epi 1483 drivers/usb/gadget/udc/gr_udc.c if (ep == &dev->epo[0] || ep == &dev->epi[0]) epi 1612 drivers/usb/gadget/udc/gr_udc.c if (ep == &dev->epo[0] || ep == &dev->epi[0]) epi 1674 drivers/usb/gadget/udc/gr_udc.c if ((ep == &dev->epi[0]) && (dev->ep0state == GR_EP0_ODATA)) { epi 1676 drivers/usb/gadget/udc/gr_udc.c ep->ep.driver_data = dev->epi[0].ep.driver_data; epi 1965 drivers/usb/gadget/udc/gr_udc.c ep = &dev->epi[num]; epi 1967 drivers/usb/gadget/udc/gr_udc.c ep->regs = &dev->regs->epi[num]; epi 2039 drivers/usb/gadget/udc/gr_udc.c dev->gadget.ep0 = &dev->epi[0].ep; epi 2067 drivers/usb/gadget/udc/gr_udc.c gr_write32(&dev->epi[0].regs->epctrl, epctrl_val | GR_EPCTRL_PI); epi 2069 drivers/usb/gadget/udc/gr_udc.c gr_write32(&dev->epi[0].regs->dmactrl, dmactrl_val); epi 2079 drivers/usb/gadget/udc/gr_udc.c ep = &dev->epi[num]; epi 2102 drivers/usb/gadget/udc/gr_udc.c gr_free_request(&dev->epi[0].ep, &dev->ep0reqi->req); epi 39 drivers/usb/gadget/udc/gr_udc.h struct gr_epregs epi[GR_MAXEP]; /* 0x100 - 0x1fc */ epi 189 drivers/usb/gadget/udc/gr_udc.h struct gr_ep epi[GR_MAXEP]; epi 251 fs/eventpoll.c struct epitem *epi; epi 335 fs/eventpoll.c static inline int ep_is_linked(struct epitem *epi) epi 337 fs/eventpoll.c return !list_empty(&epi->rdllink); epi 354 fs/eventpoll.c return container_of(p, struct ep_pqueue, pt)->epi; epi 415 fs/eventpoll.c static inline void ep_set_busy_poll_napi_id(struct epitem *epi) epi 426 fs/eventpoll.c sock = sock_from_file(epi->ffd.file, &err); epi 435 fs/eventpoll.c ep = epi->ep; epi 458 fs/eventpoll.c static inline void ep_set_busy_poll_napi_id(struct epitem *epi) epi 609 fs/eventpoll.c static void ep_unregister_pollwait(struct eventpoll *ep, struct epitem *epi) epi 611 fs/eventpoll.c struct list_head *lsthead = &epi->pwqlist; epi 624 fs/eventpoll.c static inline struct wakeup_source *ep_wakeup_source(struct epitem *epi) epi 626 fs/eventpoll.c return rcu_dereference_check(epi->ws, lockdep_is_held(&epi->ep->mtx)); epi 630 fs/eventpoll.c static inline void ep_pm_stay_awake(struct epitem *epi) epi 632 fs/eventpoll.c struct wakeup_source *ws = ep_wakeup_source(epi); epi 638 fs/eventpoll.c static inline bool ep_has_wakeup_source(struct epitem *epi) epi 640 fs/eventpoll.c return rcu_access_pointer(epi->ws) ? true : false; epi 644 fs/eventpoll.c static inline void ep_pm_stay_awake_rcu(struct epitem *epi) epi 649 fs/eventpoll.c ws = rcu_dereference(epi->ws); epi 675 fs/eventpoll.c struct epitem *epi, *nepi; epi 712 fs/eventpoll.c for (nepi = READ_ONCE(ep->ovflist); (epi = nepi) != NULL; epi 713 fs/eventpoll.c nepi = epi->next, epi->next = EP_UNACTIVE_PTR) { epi 720 fs/eventpoll.c if (!ep_is_linked(epi)) { epi 725 fs/eventpoll.c list_add(&epi->rdllink, &ep->rdllist); epi 726 fs/eventpoll.c ep_pm_stay_awake(epi); epi 766 fs/eventpoll.c struct epitem *epi = container_of(head, struct epitem, rcu); epi 767 fs/eventpoll.c kmem_cache_free(epi_cache, epi); epi 774 fs/eventpoll.c static int ep_remove(struct eventpoll *ep, struct epitem *epi) epi 776 fs/eventpoll.c struct file *file = epi->ffd.file; epi 783 fs/eventpoll.c ep_unregister_pollwait(ep, epi); epi 787 fs/eventpoll.c list_del_rcu(&epi->fllink); epi 790 fs/eventpoll.c rb_erase_cached(&epi->rbn, &ep->rbr); epi 793 fs/eventpoll.c if (ep_is_linked(epi)) epi 794 fs/eventpoll.c list_del_init(&epi->rdllink); epi 797 fs/eventpoll.c wakeup_source_unregister(ep_wakeup_source(epi)); epi 805 fs/eventpoll.c call_rcu(&epi->rcu, epi_rcu_free); epi 815 fs/eventpoll.c struct epitem *epi; epi 835 fs/eventpoll.c epi = rb_entry(rbp, struct epitem, rbn); epi 837 fs/eventpoll.c ep_unregister_pollwait(ep, epi); epi 851 fs/eventpoll.c epi = rb_entry(rbp, struct epitem, rbn); epi 852 fs/eventpoll.c ep_remove(ep, epi); epi 884 fs/eventpoll.c static __poll_t ep_item_poll(const struct epitem *epi, poll_table *pt, epi 890 fs/eventpoll.c pt->_key = epi->event.events; epi 891 fs/eventpoll.c if (!is_file_epoll(epi->ffd.file)) epi 892 fs/eventpoll.c return vfs_poll(epi->ffd.file, pt) & epi->event.events; epi 894 fs/eventpoll.c ep = epi->ffd.file->private_data; epi 895 fs/eventpoll.c poll_wait(epi->ffd.file, &ep->poll_wait, pt); epi 898 fs/eventpoll.c return ep_scan_ready_list(epi->ffd.file->private_data, epi 900 fs/eventpoll.c locked) & epi->event.events; epi 906 fs/eventpoll.c struct epitem *epi, *tmp; epi 913 fs/eventpoll.c list_for_each_entry_safe(epi, tmp, head, rdllink) { epi 914 fs/eventpoll.c if (ep_item_poll(epi, &pt, depth)) { epi 922 fs/eventpoll.c __pm_relax(ep_wakeup_source(epi)); epi 923 fs/eventpoll.c list_del_init(&epi->rdllink); epi 954 fs/eventpoll.c struct epitem *epi = rb_entry(rbp, struct epitem, rbn); epi 955 fs/eventpoll.c struct inode *inode = file_inode(epi->ffd.file); epi 959 fs/eventpoll.c epi->ffd.fd, epi->event.events, epi 960 fs/eventpoll.c (long long)epi->event.data, epi 961 fs/eventpoll.c (long long)epi->ffd.file->f_pos, epi 988 fs/eventpoll.c struct epitem *epi, *next; epi 1004 fs/eventpoll.c list_for_each_entry_safe(epi, next, &file->f_ep_links, fllink) { epi 1005 fs/eventpoll.c ep = epi->ep; epi 1007 fs/eventpoll.c ep_remove(ep, epi); epi 1052 fs/eventpoll.c struct epitem *epi, *epir = NULL; epi 1057 fs/eventpoll.c epi = rb_entry(rbp, struct epitem, rbn); epi 1058 fs/eventpoll.c kcmp = ep_cmp_ffd(&ffd, &epi->ffd); epi 1064 fs/eventpoll.c epir = epi; epi 1076 fs/eventpoll.c struct epitem *epi; epi 1079 fs/eventpoll.c epi = rb_entry(rbp, struct epitem, rbn); epi 1080 fs/eventpoll.c if (epi->ffd.fd == tfd) { epi 1082 fs/eventpoll.c return epi; epi 1097 fs/eventpoll.c struct epitem *epi; epi 1105 fs/eventpoll.c epi = ep_find_tfd(ep, tfd, toff); epi 1106 fs/eventpoll.c if (epi) epi 1107 fs/eventpoll.c file_raw = epi->ffd.file; epi 1175 fs/eventpoll.c static inline bool chain_epi_lockless(struct epitem *epi) epi 1177 fs/eventpoll.c struct eventpoll *ep = epi->ep; epi 1180 fs/eventpoll.c if (epi->next != EP_UNACTIVE_PTR) epi 1184 fs/eventpoll.c if (cmpxchg(&epi->next, EP_UNACTIVE_PTR, NULL) != EP_UNACTIVE_PTR) epi 1188 fs/eventpoll.c epi->next = xchg(&ep->ovflist, epi); epi 1214 fs/eventpoll.c struct epitem *epi = ep_item_from_wait(wait); epi 1215 fs/eventpoll.c struct eventpoll *ep = epi->ep; epi 1222 fs/eventpoll.c ep_set_busy_poll_napi_id(epi); epi 1230 fs/eventpoll.c if (!(epi->event.events & ~EP_PRIVATE_BITS)) epi 1239 fs/eventpoll.c if (pollflags && !(pollflags & epi->event.events)) epi 1249 fs/eventpoll.c if (chain_epi_lockless(epi)) epi 1250 fs/eventpoll.c ep_pm_stay_awake_rcu(epi); epi 1251 fs/eventpoll.c } else if (!ep_is_linked(epi)) { epi 1253 fs/eventpoll.c if (list_add_tail_lockless(&epi->rdllink, &ep->rdllist)) epi 1254 fs/eventpoll.c ep_pm_stay_awake_rcu(epi); epi 1262 fs/eventpoll.c if ((epi->event.events & EPOLLEXCLUSIVE) && epi 1266 fs/eventpoll.c if (epi->event.events & EPOLLIN) epi 1270 fs/eventpoll.c if (epi->event.events & EPOLLOUT) epi 1290 fs/eventpoll.c if (!(epi->event.events & EPOLLEXCLUSIVE)) epi 1319 fs/eventpoll.c struct epitem *epi = ep_item_from_epqueue(pt); epi 1322 fs/eventpoll.c if (epi->nwait >= 0 && (pwq = kmem_cache_alloc(pwq_cache, GFP_KERNEL))) { epi 1325 fs/eventpoll.c pwq->base = epi; epi 1326 fs/eventpoll.c if (epi->event.events & EPOLLEXCLUSIVE) epi 1330 fs/eventpoll.c list_add_tail(&pwq->llink, &epi->pwqlist); epi 1331 fs/eventpoll.c epi->nwait++; epi 1334 fs/eventpoll.c epi->nwait = -1; epi 1338 fs/eventpoll.c static void ep_rbtree_insert(struct eventpoll *ep, struct epitem *epi) epi 1348 fs/eventpoll.c kcmp = ep_cmp_ffd(&epi->ffd, &epic->ffd); epi 1355 fs/eventpoll.c rb_link_node(&epi->rbn, parent, p); epi 1356 fs/eventpoll.c rb_insert_color_cached(&epi->rbn, &ep->rbr, leftmost); epi 1400 fs/eventpoll.c struct epitem *epi; epi 1404 fs/eventpoll.c list_for_each_entry_rcu(epi, &file->f_ep_links, fllink) { epi 1405 fs/eventpoll.c child_file = epi->ep->file; epi 1456 fs/eventpoll.c static int ep_create_wakeup_source(struct epitem *epi) epi 1461 fs/eventpoll.c if (!epi->ep->ws) { epi 1462 fs/eventpoll.c epi->ep->ws = wakeup_source_register(NULL, "eventpoll"); epi 1463 fs/eventpoll.c if (!epi->ep->ws) epi 1467 fs/eventpoll.c name = epi->ffd.file->f_path.dentry->d_name.name; epi 1472 fs/eventpoll.c rcu_assign_pointer(epi->ws, ws); epi 1478 fs/eventpoll.c static noinline void ep_destroy_wakeup_source(struct epitem *epi) epi 1480 fs/eventpoll.c struct wakeup_source *ws = ep_wakeup_source(epi); epi 1482 fs/eventpoll.c RCU_INIT_POINTER(epi->ws, NULL); epi 1502 fs/eventpoll.c struct epitem *epi; epi 1510 fs/eventpoll.c if (!(epi = kmem_cache_alloc(epi_cache, GFP_KERNEL))) epi 1514 fs/eventpoll.c INIT_LIST_HEAD(&epi->rdllink); epi 1515 fs/eventpoll.c INIT_LIST_HEAD(&epi->fllink); epi 1516 fs/eventpoll.c INIT_LIST_HEAD(&epi->pwqlist); epi 1517 fs/eventpoll.c epi->ep = ep; epi 1518 fs/eventpoll.c ep_set_ffd(&epi->ffd, tfile, fd); epi 1519 fs/eventpoll.c epi->event = *event; epi 1520 fs/eventpoll.c epi->nwait = 0; epi 1521 fs/eventpoll.c epi->next = EP_UNACTIVE_PTR; epi 1522 fs/eventpoll.c if (epi->event.events & EPOLLWAKEUP) { epi 1523 fs/eventpoll.c error = ep_create_wakeup_source(epi); epi 1527 fs/eventpoll.c RCU_INIT_POINTER(epi->ws, NULL); epi 1531 fs/eventpoll.c epq.epi = epi; epi 1541 fs/eventpoll.c revents = ep_item_poll(epi, &epq.pt, 1); epi 1549 fs/eventpoll.c if (epi->nwait < 0) epi 1554 fs/eventpoll.c list_add_tail_rcu(&epi->fllink, &tfile->f_ep_links); epi 1561 fs/eventpoll.c ep_rbtree_insert(ep, epi); epi 1572 fs/eventpoll.c ep_set_busy_poll_napi_id(epi); epi 1575 fs/eventpoll.c if (revents && !ep_is_linked(epi)) { epi 1576 fs/eventpoll.c list_add_tail(&epi->rdllink, &ep->rdllist); epi 1577 fs/eventpoll.c ep_pm_stay_awake(epi); epi 1598 fs/eventpoll.c list_del_rcu(&epi->fllink); epi 1601 fs/eventpoll.c rb_erase_cached(&epi->rbn, &ep->rbr); epi 1604 fs/eventpoll.c ep_unregister_pollwait(ep, epi); epi 1613 fs/eventpoll.c if (ep_is_linked(epi)) epi 1614 fs/eventpoll.c list_del_init(&epi->rdllink); epi 1617 fs/eventpoll.c wakeup_source_unregister(ep_wakeup_source(epi)); epi 1620 fs/eventpoll.c kmem_cache_free(epi_cache, epi); epi 1629 fs/eventpoll.c static int ep_modify(struct eventpoll *ep, struct epitem *epi, epi 1644 fs/eventpoll.c epi->event.events = event->events; /* need barrier below */ epi 1645 fs/eventpoll.c epi->event.data = event->data; /* protected by mtx */ epi 1646 fs/eventpoll.c if (epi->event.events & EPOLLWAKEUP) { epi 1647 fs/eventpoll.c if (!ep_has_wakeup_source(epi)) epi 1648 fs/eventpoll.c ep_create_wakeup_source(epi); epi 1649 fs/eventpoll.c } else if (ep_has_wakeup_source(epi)) { epi 1650 fs/eventpoll.c ep_destroy_wakeup_source(epi); epi 1679 fs/eventpoll.c if (ep_item_poll(epi, &pt, 1)) { epi 1681 fs/eventpoll.c if (!ep_is_linked(epi)) { epi 1682 fs/eventpoll.c list_add_tail(&epi->rdllink, &ep->rdllist); epi 1683 fs/eventpoll.c ep_pm_stay_awake(epi); epi 1706 fs/eventpoll.c struct epitem *epi, *tmp; epi 1721 fs/eventpoll.c list_for_each_entry_safe(epi, tmp, head, rdllink) { epi 1734 fs/eventpoll.c ws = ep_wakeup_source(epi); epi 1741 fs/eventpoll.c list_del_init(&epi->rdllink); epi 1749 fs/eventpoll.c revents = ep_item_poll(epi, &pt, 1); epi 1754 fs/eventpoll.c __put_user(epi->event.data, &uevent->data)) { epi 1755 fs/eventpoll.c list_add(&epi->rdllink, head); epi 1756 fs/eventpoll.c ep_pm_stay_awake(epi); epi 1763 fs/eventpoll.c if (epi->event.events & EPOLLONESHOT) epi 1764 fs/eventpoll.c epi->event.events &= EP_PRIVATE_BITS; epi 1765 fs/eventpoll.c else if (!(epi->event.events & EPOLLET)) { epi 1777 fs/eventpoll.c list_add_tail(&epi->rdllink, &ep->rdllist); epi 1778 fs/eventpoll.c ep_pm_stay_awake(epi); epi 1969 fs/eventpoll.c struct epitem *epi; epi 1975 fs/eventpoll.c epi = rb_entry(rbp, struct epitem, rbn); epi 1976 fs/eventpoll.c if (unlikely(is_file_epoll(epi->ffd.file))) { epi 1977 fs/eventpoll.c ep_tovisit = epi->ffd.file->private_data; epi 1981 fs/eventpoll.c ep_loop_check_proc, epi->ffd.file, epi 1994 fs/eventpoll.c if (list_empty(&epi->ffd.file->f_tfile_llink)) epi 1995 fs/eventpoll.c list_add(&epi->ffd.file->f_tfile_llink, epi 2115 fs/eventpoll.c struct epitem *epi; epi 2215 fs/eventpoll.c epi = ep_find(ep, tf.file, fd); epi 2220 fs/eventpoll.c if (!epi) { epi 2229 fs/eventpoll.c if (epi) epi 2230 fs/eventpoll.c error = ep_remove(ep, epi); epi 2235 fs/eventpoll.c if (epi) { epi 2236 fs/eventpoll.c if (!(epi->event.events & EPOLLEXCLUSIVE)) { epi 2238 fs/eventpoll.c error = ep_modify(ep, epi, &epds);