Lines Matching defs:ev_file

35 	struct devx_async_cmd_event_file *ev_file;
43 struct list_head list; /* headed in ev_file->event_list */
60 struct list_head file_list; /* headed in ev_file->
67 struct list_head event_list; /* headed in ev_file->event_list or in
76 struct devx_async_event_file *ev_file;
1595 struct devx_async_cmd_event_file *ev_file;
1601 ev_file = container_of(uobj, struct devx_async_cmd_event_file,
1603 devx_init_event_queue(&ev_file->ev_queue);
1604 mlx5_cmd_init_async_ctx(mdev->mdev, &ev_file->async_ctx);
1613 struct devx_async_event_file *ev_file;
1627 ev_file = container_of(uobj, struct devx_async_event_file,
1629 spin_lock_init(&ev_file->lock);
1630 INIT_LIST_HEAD(&ev_file->event_list);
1631 init_waitqueue_head(&ev_file->poll_wait);
1633 ev_file->omit_data = 1;
1634 INIT_LIST_HEAD(&ev_file->subscribed_events_list);
1635 ev_file->dev = dev;
1644 struct devx_async_cmd_event_file *ev_file = async_data->ev_file;
1645 struct devx_async_event_queue *ev_queue = &ev_file->ev_queue;
1677 struct devx_async_cmd_event_file *ev_file;
1703 ev_file = container_of(fd_uobj, struct devx_async_cmd_event_file,
1706 if (atomic_add_return(cmd_out_len, &ev_file->ev_queue.bytes_in_use) >
1708 atomic_sub(cmd_out_len, &ev_file->ev_queue.bytes_in_use);
1726 async_data->ev_file = ev_file;
1729 err = mlx5_cmd_exec_cb(&ev_file->async_ctx, cmd_in,
1744 atomic_sub(cmd_out_len, &ev_file->ev_queue.bytes_in_use);
1904 struct devx_async_event_file *ev_file;
1933 ev_file = container_of(fd_uobj, struct devx_async_event_file,
2002 uverbs_uobject_get(&ev_file->uobj);
2015 event_sub->ev_file = ev_file;
2032 spin_lock_irq(&ev_file->lock);
2034 &ev_file->subscribed_events_list);
2035 spin_unlock_irq(&ev_file->lock);
2069 uverbs_uobject_put(&event_sub->ev_file->uobj);
2284 struct devx_async_event_file *ev_file;
2288 ev_file = event_sub->ev_file;
2290 if (ev_file->omit_data) {
2291 spin_lock_irqsave(&ev_file->lock, flags);
2293 ev_file->is_destroyed) {
2294 spin_unlock_irqrestore(&ev_file->lock, flags);
2298 list_add_tail(&event_sub->event_list, &ev_file->event_list);
2299 spin_unlock_irqrestore(&ev_file->lock, flags);
2300 wake_up_interruptible(&ev_file->poll_wait);
2307 spin_lock_irqsave(&ev_file->lock, flags);
2308 ev_file->is_overflow_err = 1;
2309 spin_unlock_irqrestore(&ev_file->lock, flags);
2316 spin_lock_irqsave(&ev_file->lock, flags);
2317 if (!ev_file->is_destroyed)
2318 list_add_tail(&event_data->list, &ev_file->event_list);
2321 spin_unlock_irqrestore(&ev_file->lock, flags);
2322 wake_up_interruptible(&ev_file->poll_wait);
2515 struct devx_async_event_file *ev_file = filp->private_data;
2523 omit_data = ev_file->omit_data;
2525 spin_lock_irq(&ev_file->lock);
2527 if (ev_file->is_overflow_err) {
2528 ev_file->is_overflow_err = 0;
2529 spin_unlock_irq(&ev_file->lock);
2534 while (list_empty(&ev_file->event_list)) {
2535 spin_unlock_irq(&ev_file->lock);
2540 if (wait_event_interruptible(ev_file->poll_wait,
2541 (!list_empty(&ev_file->event_list) ||
2542 ev_file->is_destroyed))) {
2546 spin_lock_irq(&ev_file->lock);
2547 if (ev_file->is_destroyed) {
2548 spin_unlock_irq(&ev_file->lock);
2554 event_sub = list_first_entry(&ev_file->event_list,
2560 event = list_first_entry(&ev_file->event_list,
2568 spin_unlock_irq(&ev_file->lock);
2577 spin_unlock_irq(&ev_file->lock);
2593 struct devx_async_event_file *ev_file = filp->private_data;
2596 poll_wait(filp, &ev_file->poll_wait, wait);
2598 spin_lock_irq(&ev_file->lock);
2599 if (ev_file->is_destroyed)
2601 else if (!list_empty(&ev_file->event_list))
2603 spin_unlock_irq(&ev_file->lock);
2615 uverbs_uobject_put(&event_sub->ev_file->uobj);
2656 struct devx_async_event_file *ev_file =
2660 struct mlx5_ib_dev *dev = ev_file->dev;
2662 spin_lock_irq(&ev_file->lock);
2663 ev_file->is_destroyed = 1;
2666 if (ev_file->omit_data) {
2669 list_for_each_entry_safe(event_sub, tmp, &ev_file->event_list,
2676 list_for_each_entry_safe(entry, tmp, &ev_file->event_list,
2683 spin_unlock_irq(&ev_file->lock);
2684 wake_up_interruptible(&ev_file->poll_wait);
2689 &ev_file->subscribed_events_list, file_list) {