search for: release_q

Displaying 7 results from an estimated 7 matches for "release_q".

Did you mean: release_p
2020 Feb 18
2
[PATCH] vhost: introduce vDPA based backend
...ere. This and the stuff in vhost_vdpa_open() looks non-functional. > +static void vhost_vdpa_remove(struct device *dev) > +{ > + DEFINE_WAIT_FUNC(wait, woken_wake_function); > + struct vhost_vdpa *v = dev_get_drvdata(dev); > + int opened; > + > + add_wait_queue(&vhost_vdpa.release_q, &wait); > + > + do { > + opened = atomic_cmpxchg(&v->opened, 0, 1); > + if (!opened) > + break; > + wait_woken(&wait, TASK_UNINTERRUPTIBLE, HZ * 10); > + } while (1); > + > + remove_wait_queue(&vhost_vdpa.release_q, &wait); *barf* use the nor...
2020 Feb 18
2
[PATCH] vhost: introduce vDPA based backend
...ere. This and the stuff in vhost_vdpa_open() looks non-functional. > +static void vhost_vdpa_remove(struct device *dev) > +{ > + DEFINE_WAIT_FUNC(wait, woken_wake_function); > + struct vhost_vdpa *v = dev_get_drvdata(dev); > + int opened; > + > + add_wait_queue(&vhost_vdpa.release_q, &wait); > + > + do { > + opened = atomic_cmpxchg(&v->opened, 0, 1); > + if (!opened) > + break; > + wait_woken(&wait, TASK_UNINTERRUPTIBLE, HZ * 10); > + } while (1); > + > + remove_wait_queue(&vhost_vdpa.release_q, &wait); *barf* use the nor...
2020 Feb 19
0
[PATCH] vhost: introduce vDPA based backend
...e see more details below. > > > +static void vhost_vdpa_remove(struct device *dev) > > +{ > > + DEFINE_WAIT_FUNC(wait, woken_wake_function); > > + struct vhost_vdpa *v = dev_get_drvdata(dev); > > + int opened; > > + > > + add_wait_queue(&vhost_vdpa.release_q, &wait); > > + > > + do { > > + opened = atomic_cmpxchg(&v->opened, 0, 1); > > + if (!opened) > > + break; > > + wait_woken(&wait, TASK_UNINTERRUPTIBLE, HZ * 10); > > + } while (1); > > + > > + remove_wait_queue(&vhost_vd...
2020 Feb 19
1
[PATCH] vhost: introduce vDPA based backend
...52:38AM +0800, Tiwei Bie wrote: > > > +static int __init vhost_vdpa_init(void) > > > +{ > > > + int r; > > > + > > > + idr_init(&vhost_vdpa.idr); > > > + mutex_init(&vhost_vdpa.mutex); > > > + init_waitqueue_head(&vhost_vdpa.release_q); > > > + > > > + /* /dev/vhost-vdpa/$vdpa_device_index */ > > > + vhost_vdpa.class = class_create(THIS_MODULE, "vhost-vdpa"); > > > + if (IS_ERR(vhost_vdpa.class)) { > > > + r = PTR_ERR(vhost_vdpa.class); > > > + goto err_class; &gt...
2020 Feb 04
10
[PATCH] vhost: introduce vDPA based backend
...ened; > + int nvqs; > + int virtio_id; > + int minor; > +}; > + > +static struct { > + /* The lock is to protect this structure. */ > + struct mutex mutex; > + struct class *class; > + struct idr idr; > + struct cdev cdev; > + dev_t devt; > + wait_queue_head_t release_q; > +} vhost_vdpa; > + > +static const u64 vhost_vdpa_features[] = { > + [VIRTIO_ID_NET] = VHOST_VDPA_NET_FEATURES, > +}; > + > +static int vhost_vdpa_alloc_minor(struct vhost_vdpa *v) > +{ > + return idr_alloc(&vhost_vdpa.idr, v, 0, MINORMASK + 1, > + GFP_KERNEL...
2020 Feb 04
10
[PATCH] vhost: introduce vDPA based backend
...ened; > + int nvqs; > + int virtio_id; > + int minor; > +}; > + > +static struct { > + /* The lock is to protect this structure. */ > + struct mutex mutex; > + struct class *class; > + struct idr idr; > + struct cdev cdev; > + dev_t devt; > + wait_queue_head_t release_q; > +} vhost_vdpa; > + > +static const u64 vhost_vdpa_features[] = { > + [VIRTIO_ID_NET] = VHOST_VDPA_NET_FEATURES, > +}; > + > +static int vhost_vdpa_alloc_minor(struct vhost_vdpa *v) > +{ > + return idr_alloc(&vhost_vdpa.idr, v, 0, MINORMASK + 1, > + GFP_KERNEL...
2020 Feb 05
0
[PATCH] vhost: introduce vDPA based backend
...+ int minor; > > +}; > > + > > +static struct { > > + /* The lock is to protect this structure. */ > > + struct mutex mutex; > > + struct class *class; > > + struct idr idr; > > + struct cdev cdev; > > + dev_t devt; > > + wait_queue_head_t release_q; > > +} vhost_vdpa; > > + > > +static const u64 vhost_vdpa_features[] = { > > + [VIRTIO_ID_NET] = VHOST_VDPA_NET_FEATURES, > > +}; > > + > > +static int vhost_vdpa_alloc_minor(struct vhost_vdpa *v) > > +{ > > + return idr_alloc(&vhost_vdpa.i...