diff options
author | Dragos Tatulea <dtatulea@nvidia.com> | 2023-10-18 20:14:50 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2023-11-01 16:19:56 +0300 |
commit | 186e25387ed6f1403a1b464e31f5381ba4424681 (patch) | |
tree | bccb16f4b63e028898f94461c8f6ceb4b586e5bc /drivers/vdpa/mlx5/core/mlx5_vdpa.h | |
parent | 1b3ce9576f169ce2122ab98b39bf2357d377ee5b (diff) | |
download | linux-186e25387ed6f1403a1b464e31f5381ba4424681.tar.xz |
vdpa/mlx5: Move mr mutex out of mr struct
The mutex is named like it is supposed to protect only the mkey but in
reality it is a global lock for all mr resources.
Shift the mutex to it's rightful location (struct mlx5_vdpa_dev) and
give it a more appropriate name.
Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com>
Acked-by: Eugenio PĂ©rez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20231018171456.1624030-13-dtatulea@nvidia.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Si-Wei Liu <si-wei.liu@oracle.com>
Tested-by: Si-Wei Liu <si-wei.liu@oracle.com>
Tested-by: Lei Yang <leiyang@redhat.com>
Diffstat (limited to 'drivers/vdpa/mlx5/core/mlx5_vdpa.h')
-rw-r--r-- | drivers/vdpa/mlx5/core/mlx5_vdpa.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/vdpa/mlx5/core/mlx5_vdpa.h b/drivers/vdpa/mlx5/core/mlx5_vdpa.h index 01d4ee58ccb1..9c6ac42c21e1 100644 --- a/drivers/vdpa/mlx5/core/mlx5_vdpa.h +++ b/drivers/vdpa/mlx5/core/mlx5_vdpa.h @@ -34,8 +34,6 @@ struct mlx5_vdpa_mr { /* state of dvq mr */ bool initialized; - /* serialize mkey creation and destruction */ - struct mutex mkey_mtx; bool user_mr; }; @@ -94,6 +92,8 @@ struct mlx5_vdpa_dev { u32 generation; struct mlx5_vdpa_mr mr; + /* serialize mr access */ + struct mutex mr_mtx; struct mlx5_control_vq cvq; struct workqueue_struct *wq; unsigned int group2asid[MLX5_VDPA_NUMVQ_GROUPS]; |