Re: [PATCH 07/18] iommu/arm-smmu: Remove arch/arm workaround

2020-08-21 Thread Will Deacon
On Thu, Aug 20, 2020 at 04:08:26PM +0100, Robin Murphy wrote:
> Now that arch/arm is wired up for default domains and iommu-dma, remove
> the add_device workaround.
> 
> Signed-off-by: Robin Murphy 
> ---
>  drivers/iommu/arm/arm-smmu/arm-smmu.c | 10 --
>  1 file changed, 10 deletions(-)
> 
> diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c 
> b/drivers/iommu/arm/arm-smmu/arm-smmu.c
> index 09c42af9f31e..4e52d8cb67dd 100644
> --- a/drivers/iommu/arm/arm-smmu/arm-smmu.c
> +++ b/drivers/iommu/arm/arm-smmu/arm-smmu.c
> @@ -1164,17 +1164,7 @@ static int arm_smmu_attach_dev(struct iommu_domain 
> *domain, struct device *dev)
>   return -ENXIO;
>   }
>  
> - /*
> -  * FIXME: The arch/arm DMA API code tries to attach devices to its own
> -  * domains between of_xlate() and probe_device() - we have no way to 
> cope
> -  * with that, so until ARM gets converted to rely on groups and default
> -  * domains, just say no (but more politely than by dereferencing NULL).
> -  * This should be at least a WARN_ON once that's sorted.
> -  */
>   cfg = dev_iommu_priv_get(dev);
> - if (!cfg)
> - return -ENODEV;
> -
>   smmu = cfg->smmu;
>  
>   ret = arm_smmu_rpm_get(smmu);

Acked-by: Will Deacon 

Will
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


[PATCH 07/18] iommu/arm-smmu: Remove arch/arm workaround

2020-08-20 Thread Robin Murphy
Now that arch/arm is wired up for default domains and iommu-dma, remove
the add_device workaround.

Signed-off-by: Robin Murphy 
---
 drivers/iommu/arm/arm-smmu/arm-smmu.c | 10 --
 1 file changed, 10 deletions(-)

diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c 
b/drivers/iommu/arm/arm-smmu/arm-smmu.c
index 09c42af9f31e..4e52d8cb67dd 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu.c
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu.c
@@ -1164,17 +1164,7 @@ static int arm_smmu_attach_dev(struct iommu_domain 
*domain, struct device *dev)
return -ENXIO;
}
 
-   /*
-* FIXME: The arch/arm DMA API code tries to attach devices to its own
-* domains between of_xlate() and probe_device() - we have no way to 
cope
-* with that, so until ARM gets converted to rely on groups and default
-* domains, just say no (but more politely than by dereferencing NULL).
-* This should be at least a WARN_ON once that's sorted.
-*/
cfg = dev_iommu_priv_get(dev);
-   if (!cfg)
-   return -ENODEV;
-
smmu = cfg->smmu;
 
ret = arm_smmu_rpm_get(smmu);
-- 
2.28.0.dirty

___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu