Re: [PATCH 05/11] iommu: Add iommu_init/deinit_driver() paired functions

2023-04-26 Thread Jason Gunthorpe
On Wed, Apr 26, 2023 at 09:41:38AM +, Tian, Kevin wrote: > > From: Jason Gunthorpe > > Sent: Thursday, April 20, 2023 12:12 AM > > > > +static int iommu_init_driver(struct device *dev, const struct iommu_ops > > *ops) > > would iommu_init_device() better fit the purpose? Yeah.. that does se

RE: [PATCH 05/11] iommu: Add iommu_init/deinit_driver() paired functions

2023-04-26 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Thursday, April 20, 2023 12:12 AM > > +static int iommu_init_driver(struct device *dev, const struct iommu_ops > *ops) would iommu_init_device() better fit the purpose? otherwise, Reviewed-by: Kevin Tian

[PATCH 05/11] iommu: Add iommu_init/deinit_driver() paired functions

2023-04-19 Thread Jason Gunthorpe
Move the driver init and destruction code into two logically paired functions. There is a subtle ordering dependency in how the group's domains are freed, the current code does the kobject_put() on the group which will hopefully trigger the free of the domains before the module_put() that protects