linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Regression observed since "iommu: Propagate error in add_iommu_group" with arm-smmu
@ 2015-06-29 12:46 Eric Auger
  2015-06-29 13:16 ` Joerg Roedel
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Auger @ 2015-06-29 12:46 UTC (permalink / raw)
  To: jroedel, Will Deacon, Baptiste Reynal, Alex Williamson,
	linux-kernel@vger.kernel.org

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 <jroedel@suse.de>
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.

    Signed-off-by: Joerg Roedel <jroedel@suse.de>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Regression observed since "iommu: Propagate error in add_iommu_group" with arm-smmu
  2015-06-29 12:46 Regression observed since "iommu: Propagate error in add_iommu_group" with arm-smmu Eric Auger
@ 2015-06-29 13:16 ` Joerg Roedel
  2015-06-29 13:32   ` Eric Auger
  0 siblings, 1 reply; 4+ messages in thread
From: Joerg Roedel @ 2015-06-29 13:16 UTC (permalink / raw)
  To: Eric Auger
  Cc: Will Deacon, Baptiste Reynal, Alex Williamson,
	linux-kernel@vger.kernel.org

Hi Eric

On Mon, Jun 29, 2015 at 02:46:46PM +0200, Eric Auger wrote:
> 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?

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Regression observed since "iommu: Propagate error in add_iommu_group" with arm-smmu
  2015-06-29 13:16 ` Joerg Roedel
@ 2015-06-29 13:32   ` Eric Auger
  2015-06-29 13:43     ` Joerg Roedel
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Auger @ 2015-06-29 13:32 UTC (permalink / raw)
  To: Joerg Roedel
  Cc: Will Deacon, Baptiste Reynal, Alex Williamson,
	linux-kernel@vger.kernel.org

Hi Joerg,
On 06/29/2015 03:16 PM, Joerg Roedel wrote:
> Hi Eric
> 
> On Mon, Jun 29, 2015 at 02:46:46PM +0200, Eric Auger wrote:
>> 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?
> 
> 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.

Great. yes it works fine with my setup!
Tested-by: Eric Auger <eric.auger@linaro.org>

Thanks

Eric
> 
> 
> 	Joerg
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Regression observed since "iommu: Propagate error in add_iommu_group" with arm-smmu
  2015-06-29 13:32   ` Eric Auger
@ 2015-06-29 13:43     ` Joerg Roedel
  0 siblings, 0 replies; 4+ messages in thread
From: Joerg Roedel @ 2015-06-29 13:43 UTC (permalink / raw)
  To: Eric Auger
  Cc: Will Deacon, Baptiste Reynal, Alex Williamson,
	linux-kernel@vger.kernel.org

On Mon, Jun 29, 2015 at 03:32:48PM +0200, Eric Auger wrote:
> Great. yes it works fine with my setup!
> Tested-by: Eric Auger <eric.auger@linaro.org>

Thanks for testing! I'll just queued the patch.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-06-29 13:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-29 12:46 Regression observed since "iommu: Propagate error in add_iommu_group" with arm-smmu Eric Auger
2015-06-29 13:16 ` Joerg Roedel
2015-06-29 13:32   ` Eric Auger
2015-06-29 13:43     ` Joerg Roedel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).