Re: [PATCH 04/10] iommu: Mark dev_iommu_get() with lockdep

2023-11-28 Thread Baolu Lu
On 2023/11/29 8:48, Jason Gunthorpe wrote: Allocation of dev->iommu must be done under the iommu_probe_device_lock. Mark this with lockdep to discourage future mistakes. Reviewed-by: Jerry Snitselaar Tested-by: Hector Martin Signed-off-by: Jason Gunthorpe --- drivers/iommu/iommu.c | 2 ++ 1 f

Re: [PATCH 07/10] acpi: Do not return struct iommu_ops from acpi_iommu_configure_id()

2023-11-28 Thread Baolu Lu
On 2023/11/29 8:48, 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'. Acked-by: Rafael J. Wysocki Reviewed-by: Jerry Snitselaar Tested-by: Hector Martin Signed-off-by: Jason Gunthorpe --- dr

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

2023-11-28 Thread Baolu Lu
On 2023/11/29 8:47, 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'. Reviewed-by: Jerry Snitselaar Acked-by: Rob Herring Tested-by: Hector Martin Signed-off-by: Jason Gunthorpe --- drivers/

Re: [PATCH RFC 17/17] iommu: Mark dev_iommu_priv_set() with a lockdep

2023-11-08 Thread Baolu Lu
On 2023/11/4 0:45, Jason Gunthorpe wrote: A perfect driver would only call dev_iommu_priv_set() from its probe callback. We've made it functionally correct to call it from the of_xlate by adding a lock around that call. lockdep assert that iommu_probe_device_lock is held to discourage misuse. E

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

2023-11-08 Thread Baolu Lu
On 2023/11/4 0:44, 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 and remove the iommu paramet