Regression observed since "iommu: Propagate error in add_iommu_group" with arm-smmu
Hi Joerg, Will
I observe a regression since commit 19762d7095e6392b6ec56c363a6f29b2119488c2 (iommu: Propagate error in add_iommu_group) with arm-smmu: I am not able to bind the vfio-platform driver to one Calxeda Midway xgmac anymore. This latter is not assigned any group.
Looks like the cause is, in iommu_bus_init, when doing bus_for_each_dev(bus, NULL, &cb, add_iommu_group), add_iommu_group fails for some devices which are not upstream to smmu and enumerated before the xgmac. As a consequence bus_for_each_dev returns without looking at the xgmac.
arm_smmu_add_platform_device currently returns -ENODEV when no smmu/no master port for the device. Shouldn't we return 0 now?
Thank you in advance
Best Regards
Eric
19762d7095e6392b6ec56c363a6f29b2119488c2 is the first bad commit commit 19762d7095e6392b6ec56c363a6f29b2119488c2
Author: Joerg Roedel <[email protected]> Date: Thu May 28 18:41:26 2015 +0200
iommu: Propagate error in add_iommu_group
Make sure any errors reported from the IOMMU drivers get progapated back to the IOMMU core.
Hi Eric
Quoted 8 lines · Eric Auger
Hi Joerg, Will
I observe a regression since commit
19762d7095e6392b6ec56c363a6f29b2119488c2(iommu: Propagate error inadd_iommu_group) with arm-smmu: I am not able to bind the vfio-platform driver to one Calxeda Midway xgmac anymore. This latter is not assigned any group.
Quoted 8 lines
Looks like the cause is, in
iommu_bus_init, when doingbus_for_each_dev(bus, NULL, &cb, add_iommu_group),add_iommu_groupfails for some devices which are not upstream to smmu and enumerated before the xgmac. As a consequencebus_for_each_devreturns without looking at the xgmac.
arm_smmu_add_platform_devicecurrently returns-ENODEVwhen no smmu/no master port for the device. Shouldn't we return 0 now?
I posted a patch today which fixes this by ignoring -ENODEV as a return value in add_iommu_group. See here:
http://lists.linuxfoundation.org/pipermail/iommu/2015-June/013508.html
I'll send this fix upstream asap (means: tomorrow). It would be great if you can test it too in your setup.
Joerg
Eric Auger
Tested-byHi Joerg,
Quoted 20 lines · Joerg Roedel
Hi Eric
Quoted 8 lines · Eric Auger
Hi Joerg, Will
I observe a regression since commit
19762d7095e6392b6ec56c363a6f29b2119488c2(iommu: Propagate error inadd_iommu_group) with arm-smmu: I am not able to bind the vfio-platform driver to one Calxeda Midway xgmac anymore. This latter is not assigned any group.Quoted 8 lines
Looks like the cause is, in
iommu_bus_init, when doingbus_for_each_dev(bus, NULL, &cb, add_iommu_group),add_iommu_groupfails for some devices which are not upstream to smmu and enumerated before the xgmac. As a consequencebus_for_each_devreturns without looking at the xgmac.
arm_smmu_add_platform_devicecurrently returns-ENODEVwhen no smmu/no master port for the device. Shouldn't we return 0 now?
Quoted 7 lines
I posted a patch today which fixes this by ignoring
-ENODEVas a return value inadd_iommu_group. See here:http://lists.linuxfoundation.org/pipermail/iommu/2015-June/013508.htmlI'll send this fix upstream asap (means: tomorrow). It would be great if you can test it too in your setup.
Great. yes it works fine with my setup!
Thanks
Eric
Quoted 4 lines
Joerg
Quoted 2 lines · Eric Auger
Great. yes it works fine with my setup!
Tested-by Eric Auger <[email protected]>
Thanks for testing! I'll just queued the patch.