Skip to contentSkip to conversation

iommu/vt-d: Remove device comparison in context_setup_pass_through_cb

PATCH New Jerry Snitselaar 1 participant 1 message Feb 24, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iommu/vt-d: Remove device comparison in context_setup_pass_through_cb

Remove the device comparison check in context_setup_pass_through_cb. pci_for_each_dma_alias already makes a decision on whether the callback function should be called for a device. With the check in place it will fail to create context entries for aliases as it walks up to the root bus.

Fixes 2031c469f816 ("iommu/vt-d: Add support for static identity domain")
Cc Joerg Roedel <[email protected]>
Cc Lu Baolu <[email protected]>
---
 drivers/iommu/intel/iommu.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/iommu/intel/iommu.c +0 -3
index cc46098f875b..4d8d4593c9c8 100644
@@ -4378,9 +4378,6 @@ static int context_setup_pass_through_cb(struct pci_dev *pdev, u16 alias, void *
 {
 	struct device *dev = data;
 
-	if (dev != &pdev->dev)
-		return 0;
-
 	return context_setup_pass_through(dev, PCI_BUS_NUM(alias), alias & 0xff);
 }
 
Signature · 1 line
2.44.0