mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
9c799c224d
Many of the mdev drivers use a simple counter for keeping track of the available instances. Move this code to the core code and store the counter in the mdev_parent. Implement it using correct locking, fixing mdpy. Drivers just provide the value in the mdev_driver at registration time and the core code takes care of maintaining it and exposing the value in sysfs. [hch: count instances per-parent instead of per-type, use an atomic_t to avoid taking mdev_list_lock in the show method] Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Reviewed-by: Kirti Wankhede <kwankhede@nvidia.com> Reviewed-by: Eric Farman <farman@linux.ibm.com> Link: https://lore.kernel.org/r/20220923092652.100656-15-hch@lst.de Signed-off-by: Alex Williamson <alex.williamson@redhat.com> |
||
---|---|---|
.. | ||
fsl-mc | ||
mdev | ||
pci | ||
platform | ||
container.c | ||
iova_bitmap.c | ||
Kconfig | ||
Makefile | ||
vfio_iommu_spapr_tce.c | ||
vfio_iommu_type1.c | ||
vfio_main.c | ||
vfio_spapr_eeh.c | ||
vfio.h | ||
virqfd.c |