summaryrefslogtreecommitdiffstats
path: root/drivers/vfio/fsl-mc/vfio_fsl_mc_private.h
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@nvidia.com>2021-08-05 22:19:02 -0300
committerAlex Williamson <alex.williamson@redhat.com>2021-08-11 09:50:11 -0600
commitda119f387e94642da959a22ae9c22e09abe34926 (patch)
treece3d941ac612a29a9904e9afa4400a25e46c007b /drivers/vfio/fsl-mc/vfio_fsl_mc_private.h
parent17a1e4fa3f7f07f541c751745b5aa6f2fcab9a48 (diff)
downloadlinux-stable-da119f387e94642da959a22ae9c22e09abe34926.tar.gz
linux-stable-da119f387e94642da959a22ae9c22e09abe34926.tar.bz2
linux-stable-da119f387e94642da959a22ae9c22e09abe34926.zip
vfio/fsl: Move to the device set infrastructure
FSL uses the internal reflck to implement the open_device() functionality, conversion to the core code is straightforward. The decision on which set to be part of is trivially based on the is_fsl_mc_bus_dprc() and we use a 'struct device *' pointer as the set_id. The dev_set lock is protecting the interrupts setup. The FSL MC devices are using MSIs and only the DPRC device is allocating the MSIs from the MSI domain. The other devices just take interrupts from a pool. The lock is protecting the access to this pool. Signed-off-by: Yishai Hadas <yishaih@nvidia.com> Tested-by: Diana Craciun OSS <diana.craciun@oss.nxp.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/6-v4-9ea22c5e6afb+1adf-vfio_reflck_jgg@nvidia.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/vfio/fsl-mc/vfio_fsl_mc_private.h')
-rw-r--r--drivers/vfio/fsl-mc/vfio_fsl_mc_private.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc_private.h b/drivers/vfio/fsl-mc/vfio_fsl_mc_private.h
index 89700e00e77d..4ad63ececb91 100644
--- a/drivers/vfio/fsl-mc/vfio_fsl_mc_private.h
+++ b/drivers/vfio/fsl-mc/vfio_fsl_mc_private.h
@@ -22,11 +22,6 @@ struct vfio_fsl_mc_irq {
char *name;
};
-struct vfio_fsl_mc_reflck {
- struct kref kref;
- struct mutex lock;
-};
-
struct vfio_fsl_mc_region {
u32 flags;
u32 type;
@@ -39,9 +34,7 @@ struct vfio_fsl_mc_device {
struct vfio_device vdev;
struct fsl_mc_device *mc_dev;
struct notifier_block nb;
- int refcnt;
struct vfio_fsl_mc_region *regions;
- struct vfio_fsl_mc_reflck *reflck;
struct mutex igate;
struct vfio_fsl_mc_irq *mc_irqs;
};