aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2017-02-08 15:13:26 -0500
committerAlex Williamson <alex.williamson@redhat.com>2017-02-09 14:13:53 -0500
commit0ca582fd0463106e277e1f723b4554b4d0e5f700 (patch)
treed1120b16dab0518f5d55fe553eb7f96ae18bc40c
parentf790eb57e6ec8d77489755cc25a51c4409e2f590 (diff)
vfio: Replace module request with softdep
Rather than doing a module request from within the init function, add a soft dependency on the available IOMMU backend drivers. This makes the dependency visible to userspace when picking modules for the ram disk. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
-rw-r--r--drivers/vfio/vfio.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c
index 9901c4671e2f..57052b68f15a 100644
--- a/drivers/vfio/vfio.c
+++ b/drivers/vfio/vfio.c
@@ -2250,14 +2250,6 @@ static int __init vfio_init(void)
2250 2250
2251 pr_info(DRIVER_DESC " version: " DRIVER_VERSION "\n"); 2251 pr_info(DRIVER_DESC " version: " DRIVER_VERSION "\n");
2252 2252
2253 /*
2254 * Attempt to load known iommu-drivers. This gives us a working
2255 * environment without the user needing to explicitly load iommu
2256 * drivers.
2257 */
2258 request_module_nowait("vfio_iommu_type1");
2259 request_module_nowait("vfio_iommu_spapr_tce");
2260
2261#ifdef CONFIG_VFIO_NOIOMMU 2253#ifdef CONFIG_VFIO_NOIOMMU
2262 vfio_register_iommu_driver(&vfio_noiommu_ops); 2254 vfio_register_iommu_driver(&vfio_noiommu_ops);
2263#endif 2255#endif
@@ -2297,3 +2289,4 @@ MODULE_AUTHOR(DRIVER_AUTHOR);
2297MODULE_DESCRIPTION(DRIVER_DESC); 2289MODULE_DESCRIPTION(DRIVER_DESC);
2298MODULE_ALIAS_MISCDEV(VFIO_MINOR); 2290MODULE_ALIAS_MISCDEV(VFIO_MINOR);
2299MODULE_ALIAS("devname:vfio/vfio"); 2291MODULE_ALIAS("devname:vfio/vfio");
2292MODULE_SOFTDEP("post: vfio_iommu_type1 vfio_iommu_spapr_tce");