[PATCH 04/13] iommu/arm-smmu: Clean up bus_set_iommu()

Robin Murphy robin.murphy at arm.com
Wed Apr 20 09:05:03 PDT 2022


On 2022-04-19 15:40, Will Deacon wrote:
> On Thu, Apr 14, 2022 at 01:42:33PM +0100, Robin Murphy wrote:
>> Stop calling bus_set_iommu() since it's now unnecessary. With device
>> probes now replayed for every IOMMU instance registration, the whole
>> sorry ordering workaround for legacy DT bindings goes too, hooray!
> 
> Ha, I hope you tested this!

Oh alright then, since it's you... :)

I've hacked up a Juno DT with the old bindings, and (after needing a 
while to remember that they're fundamentally incompatible with 
disable_bypass), can confirm that with my whole dev branch including 
this series applied, it boots and creates IOMMU groups as expected. I 
then made the mistake of trying without the branch to check whether the 
squawks from iommu_setup_dma_ops() were new or not, and... well... plain 
rc3 doesn't even boot on the same setup - it's somehow blowing up in the 
failure cleanup path of iommu_bus_init(), apparently calling 
iommu_release_device() on something where dev->iommu->iommu_dev is NULL, 
for reasons that are far from clear and I'm not sure I can really be 
bothered to debug further... :/

Cheers,
Robin.

>> Signed-off-by: Robin Murphy <robin.murphy at arm.com>
>> ---
>>   drivers/iommu/arm/arm-smmu/arm-smmu.c | 84 +--------------------------
>>   1 file changed, 2 insertions(+), 82 deletions(-)
> 
> Assuming it works,
> 
> Acked-by: Will Deacon <will at kernel.org>
> 
> Will



More information about the linux-arm-kernel mailing list