Re: [PATCH RFC 01/17] iommu: Remove struct iommu_ops *iommu from arch_setup_dma_ops()

2023-11-05 Thread Christoph Hellwig
On Fri, Nov 03, 2023 at 01:44:46PM -0300, Jason Gunthorpe wrote: > This is not being used to pass ops, it is just a way to tell if an > iommu driver was probed. These days this can be detected directly via > device_iommu_mapped(). Call device_iommu_mapped() in the two places that > need to check it

Re: [PATCH RFC 04/17] acpi: Do not return struct iommu_ops from acpi_iommu_configure_id()

2023-11-05 Thread Jerry Snitselaar
On Sun, Nov 05, 2023 at 09:24:09AM -0400, Jason Gunthorpe wrote: > On Fri, Nov 03, 2023 at 05:48:01PM -0700, Jerry Snitselaar wrote: > > > @@ -1632,10 +1633,15 @@ int acpi_dma_configure_id(struct device *dev, > > > enum dev_dma_attr attr, > > > > > > acpi_arch_dma_setup(dev); > > > > > > - i

Re: [PATCH RFC 02/17] of: Do not return struct iommu_ops from of_iommu_configure()

2023-11-05 Thread Jason Gunthorpe
On Fri, Nov 03, 2023 at 02:42:01PM -0700, Jerry Snitselaar wrote: > On Fri, Nov 03, 2023 at 01:44:47PM -0300, Jason Gunthorpe wrote: > > Nothing needs this pointer. Return a normal error code with the usual > > IOMMU semantic that ENODEV means 'there is no IOMMU driver'. > > > > Signed-off-by: Jas

Re: [PATCH RFC 03/17] of: Use -ENODEV consistently in of_iommu_configure()

2023-11-05 Thread Jason Gunthorpe
On Fri, Nov 03, 2023 at 03:03:53PM -0700, Jerry Snitselaar wrote: > With this the following can be simplified in of_iommu_configure_dev_id: > > diff --git a/drivers/iommu/of_iommu.c b/drivers/iommu/of_iommu.c > index 4f77495a2543..b9b995712029 100644 > --- a/drivers/iommu/of_iommu.c > +++ b/driver

Re: [PATCH RFC 04/17] acpi: Do not return struct iommu_ops from acpi_iommu_configure_id()

2023-11-05 Thread Jason Gunthorpe
On Fri, Nov 03, 2023 at 05:48:01PM -0700, Jerry Snitselaar wrote: > > @@ -1632,10 +1633,15 @@ int acpi_dma_configure_id(struct device *dev, enum > > dev_dma_attr attr, > > > > acpi_arch_dma_setup(dev); > > > > - iommu = acpi_iommu_configure_id(dev, input_id); > > - if (PTR_ERR(iommu) =