Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c0d05cde authored by Robin Murphy's avatar Robin Murphy Committed by Joerg Roedel
Browse files

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: default avatarJean-Philippe Brucker <jean-philippe.brucker@arm.com>
Fixes: d87beb74 ("iommu/of: Handle PCI aliases properly")
Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
Tested-by: default avatarJean-Philippe Brucker <jean-philippe.brucker@arm.com>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 986a5f70
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -157,10 +157,7 @@ static int of_pci_iommu_init(struct pci_dev *pdev, u16 alias, void *data)

	err = of_iommu_xlate(info->dev, &iommu_spec);
	of_node_put(iommu_spec.np);
	if (err)
	return err;

	return info->np == pdev->bus->dev.of_node;
}

const struct iommu_ops *of_iommu_configure(struct device *dev,