Re: [PATCH v2 06/17] iommu: Add iommu_fwspec_alloc/dealloc()

2023-11-23 Thread Hector Martin
On 2023/11/22 1:00, Jason Gunthorpe wrote: > On Tue, Nov 21, 2023 at 03:47:48PM +0900, Hector Martin wrote: >>> Which is sensitive only to !NULL fwspec, and if EPROBE_DEFER is >>> returned fwspec will be freed and dev->iommu->fwspec will be NULL >>> here. >>> >>> In the NULL case it does a 'bus

Re: [PATCH v2 06/17] iommu: Add iommu_fwspec_alloc/dealloc()

2023-11-21 Thread Jason Gunthorpe
On Tue, Nov 21, 2023 at 03:47:48PM +0900, Hector Martin wrote: > > Which is sensitive only to !NULL fwspec, and if EPROBE_DEFER is > > returned fwspec will be freed and dev->iommu->fwspec will be NULL > > here. > > > > In the NULL case it does a 'bus probe' with a NULL fwspec and all the > >

Re: [PATCH v2 06/17] iommu: Add iommu_fwspec_alloc/dealloc()

2023-11-20 Thread Hector Martin
On 2023/11/19 23:13, Jason Gunthorpe wrote: > On Sun, Nov 19, 2023 at 06:19:43PM +0900, Hector Martin wrote: +static int iommu_fwspec_assign_iommu(struct iommu_fwspec *fwspec, + struct device *dev, + struct fwnode_handle

Re: [PATCH v2 06/17] iommu: Add iommu_fwspec_alloc/dealloc()

2023-11-19 Thread Jason Gunthorpe
On Sun, Nov 19, 2023 at 06:19:43PM +0900, Hector Martin wrote: > >> +static int iommu_fwspec_assign_iommu(struct iommu_fwspec *fwspec, > >> + struct device *dev, > >> + struct fwnode_handle *iommu_fwnode) > >> +{ > >> + const struct

Re: [PATCH v2 06/17] iommu: Add iommu_fwspec_alloc/dealloc()

2023-11-19 Thread Hector Martin
On 2023/11/19 17:10, Hector Martin wrote: > On 2023/11/15 23:05, Jason Gunthorpe wrote: >> Allow fwspec to exist independently from the dev->iommu by providing >> functions to allow allocating and freeing the raw struct iommu_fwspec. >> >> Reflow the existing paths to call the new alloc/dealloc

Re: [PATCH v2 06/17] iommu: Add iommu_fwspec_alloc/dealloc()

2023-11-19 Thread Hector Martin
On 2023/11/15 23:05, Jason Gunthorpe wrote: > Allow fwspec to exist independently from the dev->iommu by providing > functions to allow allocating and freeing the raw struct iommu_fwspec. > > Reflow the existing paths to call the new alloc/dealloc functions. > > Reviewed-by: Jerry Snitselaar >

[PATCH v2 06/17] iommu: Add iommu_fwspec_alloc/dealloc()

2023-11-15 Thread Jason Gunthorpe
Allow fwspec to exist independently from the dev->iommu by providing functions to allow allocating and freeing the raw struct iommu_fwspec. Reflow the existing paths to call the new alloc/dealloc functions. Reviewed-by: Jerry Snitselaar Signed-off-by: Jason Gunthorpe --- drivers/iommu/iommu.c