Lines Matching refs:event_sub

104 	struct list_head event_sub; /* holds devx_event_subscription entries */  member
1366 list_for_each_entry_safe(sub_entry, tmp, &obj->event_sub, obj_list) in devx_obj_cleanup()
1467 INIT_LIST_HEAD(&obj->event_sub); in UVERBS_HANDLER()
1929 struct devx_event_subscription *event_sub, *tmp_sub; in UVERBS_HANDLER() local
2017 event_sub = kzalloc(sizeof(*event_sub), GFP_KERNEL); in UVERBS_HANDLER()
2018 if (!event_sub) in UVERBS_HANDLER()
2021 list_add_tail(&event_sub->event_list, &sub_list); in UVERBS_HANDLER()
2023 event_sub->eventfd = in UVERBS_HANDLER()
2026 if (IS_ERR(event_sub->eventfd)) { in UVERBS_HANDLER()
2027 err = PTR_ERR(event_sub->eventfd); in UVERBS_HANDLER()
2028 event_sub->eventfd = NULL; in UVERBS_HANDLER()
2033 event_sub->cookie = cookie; in UVERBS_HANDLER()
2034 event_sub->ev_file = ev_file; in UVERBS_HANDLER()
2035 event_sub->filp = fd_uobj->object; in UVERBS_HANDLER()
2037 event_sub->xa_key_level1 = key_level1; in UVERBS_HANDLER()
2038 event_sub->xa_key_level2 = obj_id; in UVERBS_HANDLER()
2039 INIT_LIST_HEAD(&event_sub->obj_list); in UVERBS_HANDLER()
2046 list_for_each_entry_safe(event_sub, tmp_sub, &sub_list, event_list) { in UVERBS_HANDLER()
2050 list_del_init(&event_sub->event_list); in UVERBS_HANDLER()
2053 list_add_tail_rcu(&event_sub->file_list, in UVERBS_HANDLER()
2058 event_sub->xa_key_level1); in UVERBS_HANDLER()
2062 list_add_tail_rcu(&event_sub->xa_list, in UVERBS_HANDLER()
2069 list_add_tail_rcu(&event_sub->xa_list, in UVERBS_HANDLER()
2071 list_add_tail_rcu(&event_sub->obj_list, in UVERBS_HANDLER()
2072 &obj->event_sub); in UVERBS_HANDLER()
2079 list_for_each_entry_safe(event_sub, tmp_sub, &sub_list, event_list) { in UVERBS_HANDLER()
2080 list_del(&event_sub->event_list); in UVERBS_HANDLER()
2083 event_sub->xa_key_level1, in UVERBS_HANDLER()
2087 if (event_sub->eventfd) in UVERBS_HANDLER()
2088 eventfd_ctx_put(event_sub->eventfd); in UVERBS_HANDLER()
2090 kfree(event_sub); in UVERBS_HANDLER()
2303 static int deliver_event(struct devx_event_subscription *event_sub, in deliver_event() argument
2310 ev_file = event_sub->ev_file; in deliver_event()
2314 if (!list_empty(&event_sub->event_list)) { in deliver_event()
2319 list_add_tail(&event_sub->event_list, &ev_file->event_list); in deliver_event()
2334 event_data->hdr.cookie = event_sub->cookie; in deliver_event()
2547 struct devx_event_subscription *event_sub; in devx_async_event_read() local
2589 event_sub = list_first_entry(&ev_file->event_list, in devx_async_event_read()
2592 eventsz = sizeof(event_sub->cookie); in devx_async_event_read()
2593 event_data = &event_sub->cookie; in devx_async_event_read()
2608 list_del_init(&event_sub->event_list); in devx_async_event_read()
2646 struct devx_event_subscription *event_sub, *event_sub_tmp; in devx_async_event_close() local
2652 list_for_each_entry_safe(event_sub, event_sub_tmp, in devx_async_event_close()
2654 devx_cleanup_subscription(dev, event_sub); in devx_async_event_close()
2655 if (event_sub->eventfd) in devx_async_event_close()
2656 eventfd_ctx_put(event_sub->eventfd); in devx_async_event_close()
2658 list_del_rcu(&event_sub->file_list); in devx_async_event_close()
2660 kfree_rcu(event_sub, rcu); in devx_async_event_close()