Skip to content

Commit 3645a34

Browse files
LuBaoluwilldeacon
authored andcommitted
iommu/vt-d: Fix compile error with CONFIG_PCI_ATS not set
Fix the compile error below (CONFIG_PCI_ATS not set): drivers/iommu/intel/dmar.c: In function ‘vf_inherit_msi_domain’: drivers/iommu/intel/dmar.c:338:59: error: ‘struct pci_dev’ has no member named ‘physfn’; did you mean ‘is_physfn’? 338 | dev_set_msi_domain(&pdev->dev, dev_get_msi_domain(&pdev->physfn->dev)); | ^~~~~~ | is_physfn Fixes: ff82872 ("iommu/vt-d: Cure VF irqdomain hickup") Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Cc: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/linux-iommu/CAMuHMdXA7wfJovmfSH2nbAhN0cPyCiFHodTvg4a8Hm9rx5Dj-w@mail.gmail.com/ Link: https://lore.kernel.org/r/20201119055119.2862701-1-baolu.lu@linux.intel.com Signed-off-by: Will Deacon <will@kernel.org>
1 parent 388255c commit 3645a34

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/iommu/intel/dmar.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,9 @@ static void dmar_pci_bus_del_dev(struct dmar_pci_notify_info *info)
335335

336336
static inline void vf_inherit_msi_domain(struct pci_dev *pdev)
337337
{
338-
dev_set_msi_domain(&pdev->dev, dev_get_msi_domain(&pdev->physfn->dev));
338+
struct pci_dev *physfn = pci_physfn(pdev);
339+
340+
dev_set_msi_domain(&pdev->dev, dev_get_msi_domain(&physfn->dev));
339341
}
340342

341343
static int dmar_pci_bus_notifier(struct notifier_block *nb,

0 commit comments

Comments
 (0)