Displaying 20 results from an estimated 112 matches for "mutex_destroy".
2019 Sep 03
0
[PATCH v2 14/27] drm/dp_mst: Destroy topology_mgr mutexes
...c173500 100644
--- a/drivers/gpu/drm/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/drm_dp_mst_topology.c
@@ -4339,6 +4339,11 @@ void drm_dp_mst_topology_mgr_destroy(struct drm_dp_mst_topology_mgr *mgr)
mgr->aux = NULL;
drm_atomic_private_obj_fini(&mgr->base);
mgr->funcs = NULL;
+
+ mutex_destroy(&mgr->delayed_destroy_lock);
+ mutex_destroy(&mgr->payload_lock);
+ mutex_destroy(&mgr->qlock);
+ mutex_destroy(&mgr->lock);
}
EXPORT_SYMBOL(drm_dp_mst_topology_mgr_destroy);
--
2.21.0
2019 Oct 22
0
[PATCH v5 01/14] drm/dp_mst: Destroy MSTBs asynchronously
...mgr->delayed_destroy_work);
mutex_lock(&mgr->payload_lock);
kfree(mgr->payloads);
mgr->payloads = NULL;
@@ -4267,7 +4321,7 @@ void drm_dp_mst_topology_mgr_destroy(struct drm_dp_mst_topology_mgr *mgr)
drm_atomic_private_obj_fini(&mgr->base);
mgr->funcs = NULL;
- mutex_destroy(&mgr->destroy_connector_lock);
+ mutex_destroy(&mgr->delayed_destroy_lock);
mutex_destroy(&mgr->payload_lock);
mutex_destroy(&mgr->qlock);
mutex_destroy(&mgr->lock);
diff --git a/include/drm/drm_dp_mst_helper.h b/include/drm/drm_dp_mst_helper.h
index 4a25e05...
2019 Oct 22
0
[PATCH v5 05/14] drm/dp_mst: Add probe_lock
...q_lock);
+ mutex_init(&mgr->probe_lock);
INIT_LIST_HEAD(&mgr->tx_msg_downq);
INIT_LIST_HEAD(&mgr->destroy_port_list);
INIT_LIST_HEAD(&mgr->destroy_branch_device_list);
@@ -4414,6 +4421,7 @@ void drm_dp_mst_topology_mgr_destroy(struct drm_dp_mst_topology_mgr *mgr)
mutex_destroy(&mgr->qlock);
mutex_destroy(&mgr->lock);
mutex_destroy(&mgr->up_req_lock);
+ mutex_destroy(&mgr->probe_lock);
}
EXPORT_SYMBOL(drm_dp_mst_topology_mgr_destroy);
diff --git a/include/drm/drm_dp_mst_helper.h b/include/drm/drm_dp_mst_helper.h
index 7d80c38ee00e..bccb...
2019 Sep 03
0
[PATCH v2 19/27] drm/dp_mst: Handle UP requests asynchronously
...elayed_destroy_work, drm_dp_delayed_destroy_work);
+ INIT_WORK(&mgr->up_req_work, drm_dp_mst_up_req_work);
init_waitqueue_head(&mgr->tx_waitq);
mgr->dev = dev;
mgr->aux = aux;
@@ -4382,6 +4447,7 @@ void drm_dp_mst_topology_mgr_destroy(struct drm_dp_mst_topology_mgr *mgr)
mutex_destroy(&mgr->payload_lock);
mutex_destroy(&mgr->qlock);
mutex_destroy(&mgr->lock);
+ mutex_destroy(&mgr->up_req_lock);
}
EXPORT_SYMBOL(drm_dp_mst_topology_mgr_destroy);
diff --git a/include/drm/drm_dp_mst_helper.h b/include/drm/drm_dp_mst_helper.h
index 8ba2a01324bb..7d...
2019 Oct 22
0
[PATCH v5 04/14] drm/dp_mst: Handle UP requests asynchronously
...elayed_destroy_work, drm_dp_delayed_destroy_work);
+ INIT_WORK(&mgr->up_req_work, drm_dp_mst_up_req_work);
init_waitqueue_head(&mgr->tx_waitq);
mgr->dev = dev;
mgr->aux = aux;
@@ -4348,6 +4413,7 @@ void drm_dp_mst_topology_mgr_destroy(struct drm_dp_mst_topology_mgr *mgr)
mutex_destroy(&mgr->payload_lock);
mutex_destroy(&mgr->qlock);
mutex_destroy(&mgr->lock);
+ mutex_destroy(&mgr->up_req_lock);
}
EXPORT_SYMBOL(drm_dp_mst_topology_mgr_destroy);
diff --git a/include/drm/drm_dp_mst_helper.h b/include/drm/drm_dp_mst_helper.h
index 8ba2a01324bb..7d...
2019 Sep 03
0
[PATCH v2 27/27] drm/dp_mst: Add topology ref history tracking for debugging
...amp;mgr->topology_ref_history_lock);
+#endif
INIT_LIST_HEAD(&mgr->tx_msg_downq);
INIT_LIST_HEAD(&mgr->destroy_port_list);
INIT_LIST_HEAD(&mgr->destroy_branch_device_list);
@@ -4613,6 +4835,9 @@ void drm_dp_mst_topology_mgr_destroy(struct drm_dp_mst_topology_mgr *mgr)
mutex_destroy(&mgr->qlock);
mutex_destroy(&mgr->lock);
mutex_destroy(&mgr->up_req_lock);
+#if IS_ENABLED(CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS)
+ mutex_destroy(&mgr->topology_ref_history_lock);
+#endif
}
EXPORT_SYMBOL(drm_dp_mst_topology_mgr_destroy);
diff --git a/include/drm/...
2019 Oct 22
0
[PATCH v5 14/14] drm/dp_mst: Add topology ref history tracking for debugging
...amp;mgr->topology_ref_history_lock);
+#endif
INIT_LIST_HEAD(&mgr->tx_msg_downq);
INIT_LIST_HEAD(&mgr->destroy_port_list);
INIT_LIST_HEAD(&mgr->destroy_branch_device_list);
@@ -4643,6 +4861,9 @@ void drm_dp_mst_topology_mgr_destroy(struct drm_dp_mst_topology_mgr *mgr)
mutex_destroy(&mgr->lock);
mutex_destroy(&mgr->up_req_lock);
mutex_destroy(&mgr->probe_lock);
+#if IS_ENABLED(CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS)
+ mutex_destroy(&mgr->topology_ref_history_lock);
+#endif
}
EXPORT_SYMBOL(drm_dp_mst_topology_mgr_destroy);
diff --git a/include...
2009 Feb 26
1
[PATCH 0/7] OCFS2 locking fixes and lockdep annotations
Hi,
the first four patches in this series fix locking problems in OCFS2 quota code (three of
them can lead to potential deadlocks). The fifth patch reorders ip_alloc_sem for directories
to be acquired before localalloc locks. Mark would you please merge these?
The last two patches implement lockdep annotations for OCFS2 cluster locks. We annotate all
the cluster locks except for special ones
2020 Sep 28
0
[PATCH V1 vhost-next] vdpa/mlx5: Make vdpa core driver a distinct module
...rt_domain, in);
> }
> +EXPORT_SYMBOL(mlx5_vdpa_dealloc_transport_domain);
>
> int mlx5_vdpa_create_mkey(struct mlx5_vdpa_dev *mvdev, struct mlx5_core_mkey *mkey, u32 *in,
> int inlen)
> @@ -266,6 +274,7 @@ int mlx5_vdpa_alloc_resources(struct mlx5_vdpa_dev *mvdev)
> mutex_destroy(&mvdev->mr.mkey_mtx);
> return err;
> }
> +EXPORT_SYMBOL(mlx5_vdpa_alloc_resources);
>
> void mlx5_vdpa_free_resources(struct mlx5_vdpa_dev *mvdev)
> {
> @@ -282,3 +291,4 @@ void mlx5_vdpa_free_resources(struct mlx5_vdpa_dev *mvdev)
> mutex_destroy(&mvdev...
2020 Apr 30
3
[PATCH v4] virtio-blk: handle block_device_operations callbacks after hot unplug
...k *disk, char *id_str)
return err;
}
+static void virtblk_get(struct virtio_blk *vblk)
+{
+ refcount_inc(&vblk->refs);
+}
+
+static void virtblk_put(struct virtio_blk *vblk)
+{
+ if (refcount_dec_and_test(&vblk->refs)) {
+ ida_simple_remove(&vd_index_ida, vblk->index);
+ mutex_destroy(&vblk->vdev_mutex);
+ kfree(vblk);
+ }
+}
+
+static int virtblk_open(struct block_device *bd, fmode_t mode)
+{
+ struct virtio_blk *vblk = bd->bd_disk->private_data;
+ int ret = 0;
+
+ mutex_lock(&vblk->vdev_mutex);
+
+ if (vblk->vdev)
+ virtblk_get(vblk);
+ else
+ ret = -...
2020 Apr 30
3
[PATCH v4] virtio-blk: handle block_device_operations callbacks after hot unplug
...k *disk, char *id_str)
return err;
}
+static void virtblk_get(struct virtio_blk *vblk)
+{
+ refcount_inc(&vblk->refs);
+}
+
+static void virtblk_put(struct virtio_blk *vblk)
+{
+ if (refcount_dec_and_test(&vblk->refs)) {
+ ida_simple_remove(&vd_index_ida, vblk->index);
+ mutex_destroy(&vblk->vdev_mutex);
+ kfree(vblk);
+ }
+}
+
+static int virtblk_open(struct block_device *bd, fmode_t mode)
+{
+ struct virtio_blk *vblk = bd->bd_disk->private_data;
+ int ret = 0;
+
+ mutex_lock(&vblk->vdev_mutex);
+
+ if (vblk->vdev)
+ virtblk_get(vblk);
+ else
+ ret = -...
2020 Sep 29
0
[PATCH V1 vhost-next] vdpa/mlx5: Make vdpa core driver a distinct module
...dpa_dealloc_transport_domain);
> > >
> > > int mlx5_vdpa_create_mkey(struct mlx5_vdpa_dev *mvdev, struct mlx5_core_mkey *mkey, u32 *in,
> > > int inlen)
> > > @@ -266,6 +274,7 @@ int mlx5_vdpa_alloc_resources(struct mlx5_vdpa_dev *mvdev)
> > > mutex_destroy(&mvdev->mr.mkey_mtx);
> > > return err;
> > > }
> > > +EXPORT_SYMBOL(mlx5_vdpa_alloc_resources);
> > >
> > > void mlx5_vdpa_free_resources(struct mlx5_vdpa_dev *mvdev)
> > > {
> > > @@ -282,3 +291,4 @@ void mlx5_vdpa_free_...
2024 Feb 22
1
[PATCH] drm/nouveau: use dedicated wq for fence uevents work
...dtor(&drm->parent);
@@ -725,6 +733,7 @@ nouveau_drm_device_fini(struct drm_device *dev)
nouveau_cli_fini(&drm->client);
nouveau_cli_fini(&drm->master);
+ destroy_workqueue(drm->fence_wq);
destroy_workqueue(drm->sched_wq);
nvif_parent_dtor(&drm->parent);
mutex_destroy(&drm->clients_lock);
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h
index 8a6d94c8b163..b43619a213a4 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drv.h
+++ b/drivers/gpu/drm/nouveau/nouveau_drv.h
@@ -261,6 +261,9 @@ struct nouveau_drm {
/* Workqu...
2020 Sep 29
0
[PATCH V1 vhost-next] vdpa/mlx5: Make vdpa core driver a distinct module
...>
> > > > > int mlx5_vdpa_create_mkey(struct mlx5_vdpa_dev *mvdev, struct mlx5_core_mkey *mkey, u32 *in,
> > > > > int inlen)
> > > > > @@ -266,6 +274,7 @@ int mlx5_vdpa_alloc_resources(struct mlx5_vdpa_dev *mvdev)
> > > > > mutex_destroy(&mvdev->mr.mkey_mtx);
> > > > > return err;
> > > > > }
> > > > > +EXPORT_SYMBOL(mlx5_vdpa_alloc_resources);
> > > > >
> > > > > void mlx5_vdpa_free_resources(struct mlx5_vdpa_dev *mvdev)
> > > > >...
2019 Oct 22
17
[PATCH v5 00/14] DP MST Refactors + debugging tools + suspend/resume reprobing
This is the final portion of the large series for adding MST
suspend/resume reprobing that I've been working on for quite a while
now. In addition, I:
* Refactored and cleaned up any code I ended up digging through in the
process of understanding how some parts of these helpers worked.
* Added some debugging tools along the way that I ended up needing to
figure out some issues in my own
2024 Feb 23
1
[PATCH] drm/nouveau: use dedicated wq for fence uevents work
...> > nouveau_cli_fini(&drm->client);
> > nouveau_cli_fini(&drm->master);
> > + destroy_workqueue(drm->fence_wq);
> > destroy_workqueue(drm->sched_wq);
> > nvif_parent_dtor(&drm->parent);
> > mutex_destroy(&drm->clients_lock);
> > diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h
> > index 8a6d94c8b163..b43619a213a4 100644
> > --- a/drivers/gpu/drm/nouveau/nouveau_drv.h
> > +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h
> > @@...
2020 Apr 28
2
[PATCH v2] virtio-blk: handle block_device_operations callbacks after hot unplug
...k *disk, char *id_str)
return err;
}
+static void virtblk_get(struct virtio_blk *vblk)
+{
+ refcount_inc(&vblk->refs);
+}
+
+static void virtblk_put(struct virtio_blk *vblk)
+{
+ if (refcount_dec_and_test(&vblk->refs)) {
+ ida_simple_remove(&vd_index_ida, vblk->index);
+ mutex_destroy(&vblk->remove_mutex);
+ kfree(vblk);
+ }
+}
+
+static int virtblk_open(struct block_device *bd, fmode_t mode)
+{
+ struct virtio_blk *vblk = bd->bd_disk->private_data;
+ int ret = -ENXIO;
+
+ mutex_lock(&vblk->remove_mutex);
+
+ if (vblk->vdev) {
+ virtblk_get(vblk);
+ ret...
2020 Apr 28
2
[PATCH v2] virtio-blk: handle block_device_operations callbacks after hot unplug
...k *disk, char *id_str)
return err;
}
+static void virtblk_get(struct virtio_blk *vblk)
+{
+ refcount_inc(&vblk->refs);
+}
+
+static void virtblk_put(struct virtio_blk *vblk)
+{
+ if (refcount_dec_and_test(&vblk->refs)) {
+ ida_simple_remove(&vd_index_ida, vblk->index);
+ mutex_destroy(&vblk->remove_mutex);
+ kfree(vblk);
+ }
+}
+
+static int virtblk_open(struct block_device *bd, fmode_t mode)
+{
+ struct virtio_blk *vblk = bd->bd_disk->private_data;
+ int ret = -ENXIO;
+
+ mutex_lock(&vblk->remove_mutex);
+
+ if (vblk->vdev) {
+ virtblk_get(vblk);
+ ret...
2020 Sep 29
0
[PATCH V1 vhost-next] vdpa/mlx5: Make vdpa core driver a distinct module
...t; int mlx5_vdpa_create_mkey(struct mlx5_vdpa_dev *mvdev, struct mlx5_core_mkey *mkey, u32 *in,
> > > > > > > int inlen)
> > > > > > > @@ -266,6 +274,7 @@ int mlx5_vdpa_alloc_resources(struct mlx5_vdpa_dev *mvdev)
> > > > > > > mutex_destroy(&mvdev->mr.mkey_mtx);
> > > > > > > return err;
> > > > > > > }
> > > > > > > +EXPORT_SYMBOL(mlx5_vdpa_alloc_resources);
> > > > > > >
> > > > > > > void mlx5_vdpa_free_resources(st...
2020 Apr 28
1
[PATCH v2] virtio-blk: handle block_device_operations callbacks after hot unplug
...)
> > +{
> > + refcount_inc(&vblk->refs);
> > +}
> > +
> > +static void virtblk_put(struct virtio_blk *vblk)
> > +{
> > + if (refcount_dec_and_test(&vblk->refs)) {
> > + ida_simple_remove(&vd_index_ida, vblk->index);
> > + mutex_destroy(&vblk->remove_mutex);
> > + kfree(vblk);
> > + }
> > +}
> > +
> > +static int virtblk_open(struct block_device *bd, fmode_t mode)
> > +{
> > + struct virtio_blk *vblk = bd->bd_disk->private_data;
> > + int ret = -ENXIO;
>
>
>...