Skip to content

Commit c0d05cd

Browse files
rmurphy-armjoergroedel
authored andcommitted
iommu/of: Remove PCI host bridge node check
of_pci_iommu_init() tries to be clever and stop its alias walk at the device represented by master_np, in case of weird PCI topologies where the bridge to the IOMMU and the rest of the system is not at the root. It turns out this is a bit short-sighted, since there are plenty of other callers of pci_for_each_dma_alias() which would also need the same behaviour in that situation, and the only platform so far with such a topology (Cavium ThunderX2) already solves it more generally via a PCI quirk. As this check is effectively redundant, and returning a boolean value as an int is a bit broken anyway, let's just get rid of it. Reported-by: Jean-Philippe Brucker <[email protected]> Fixes: d87beb7 ("iommu/of: Handle PCI aliases properly") Signed-off-by: Robin Murphy <[email protected]> Tested-by: Jean-Philippe Brucker <[email protected]> Signed-off-by: Joerg Roedel <[email protected]>
1 parent 986a5f7 commit c0d05cd

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/iommu/of_iommu.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,7 @@ static int of_pci_iommu_init(struct pci_dev *pdev, u16 alias, void *data)
157157

158158
err = of_iommu_xlate(info->dev, &iommu_spec);
159159
of_node_put(iommu_spec.np);
160-
if (err)
161-
return err;
162-
163-
return info->np == pdev->bus->dev.of_node;
160+
return err;
164161
}
165162

166163
const struct iommu_ops *of_iommu_configure(struct device *dev,

0 commit comments

Comments
 (0)