iommu/ipmmu-vmsa: Fix IOMMU lookup when multiple IOMMUs are registered
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Sat, 24 Jan 2015 21:13:50 +0000 (23:13 +0200)
committerJoerg Roedel <jroedel@suse.de>
Fri, 30 Jan 2015 12:46:07 +0000 (13:46 +0100)
commitbb590c9011a7c4e195af486438ead666023f96bd
tree54fc2b2c881ca820303d14227b053cfd19c87e5a
parentf20ed39f53145e45edd27ff9fba5a60429c40bac
iommu/ipmmu-vmsa: Fix IOMMU lookup when multiple IOMMUs are registered

When adding a new device the driver loops over all registered IOMMUs and
calls the ipmmu_find_utlbs() function to parse the DT iommus attribute.
The function returns an error when the IOMMU referenced in DT doesn't
match the current IOMMU. The caller incorrectly breaks from the loop
immediately when the error is reported, resulting in only the first
IOMMU being considered.

Fix this, and while at it move code that isn't specific to an IOMMU
instance out of the loop.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/ipmmu-vmsa.c
This page took 0.034007 seconds and 5 git commands to generate.