@@ -7,6 +7,7 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+#include <linux/acpi_iort.h>
#include <linux/amba/bus.h>
#include <linux/delay.h>
#include <linux/dma-iommu.h>
@@ -989,6 +990,8 @@ static int viommu_set_fwnode(struct viommu_dev *viommu)
set_primary_fwnode(dev, fwnode);
}
+ /* Tell IORT about a PCI device's fwnode */
+ iort_iommu_update_fwnode(dev, dev->fwnode);
iommu_device_set_fwnode(&viommu->iommu, dev->fwnode);
return 0;
}
@@ -1000,6 +1003,8 @@ static void viommu_clear_fwnode(struct viommu_dev *viommu)
if (!dev->fwnode)
return;
+ iort_iommu_update_fwnode(dev, NULL);
+
if (is_software_node(dev->fwnode)) {
struct fwnode_handle *fwnode = dev->fwnode;
When the virtio-iommu uses the PCI transport and the topology is described with IORT, register the PCI fwnode with IORT. Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org> --- drivers/iommu/virtio-iommu.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.24.0