[pci:pci/host-vmd 7/7] drivers/iommu/intel-iommu.c:906:7: error: implicit declaration of function 'is_vmd'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git pci/host-vmd
head:   155f39b4552f5ea5f6d0a4c7d942445369c32b08
commit: 155f39b4552f5ea5f6d0a4c7d942445369c32b08 [7/7] iommu/vt-d: Prevent VMD child devices from being remapping targets
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 6.2.0
reproduce:
        wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 155f39b4552f5ea5f6d0a4c7d942445369c32b08
        # save the attached .config to linux build tree
        make.cross ARCH=ia64 

All errors (new ones prefixed by >>):

   drivers/iommu/intel-iommu.c: In function 'device_to_iommu':
>> drivers/iommu/intel-iommu.c:906:7: error: implicit declaration of function 'is_vmd' [-Werror=implicit-function-declaration]
      if (is_vmd(pdev->bus))
          ^~~~~~
   cc1: some warnings being treated as errors

vim +/is_vmd +906 drivers/iommu/intel-iommu.c

   887	
   888	static struct intel_iommu *device_to_iommu(struct device *dev, u8 *bus, u8 *devfn)
   889	{
   890		struct dmar_drhd_unit *drhd = NULL;
   891		struct intel_iommu *iommu;
   892		struct device *tmp;
   893		struct pci_dev *ptmp, *pdev = NULL;
   894		u16 segment = 0;
   895		int i;
   896	
   897		if (iommu_dummy(dev))
   898			return NULL;
   899	
   900		if (dev_is_pci(dev)) {
   901			struct pci_dev *pf_pdev;
   902	
   903			pdev = to_pci_dev(dev);
   904	
   905			/* VMD child devices currently cannot be handled individually */
 > 906			if (is_vmd(pdev->bus))
   907				return NULL;
   908	
   909			/* VFs aren't listed in scope tables; we need to look up
   910			 * the PF instead to find the IOMMU. */
   911			pf_pdev = pci_physfn(pdev);
   912			dev = &pf_pdev->dev;
   913			segment = pci_domain_nr(pdev->bus);
   914		} else if (has_acpi_companion(dev))
   915			dev = &ACPI_COMPANION(dev)->dev;
   916	
   917		rcu_read_lock();
   918		for_each_active_iommu(iommu, drhd) {
   919			if (pdev && segment != drhd->segment)
   920				continue;
   921	
   922			for_each_active_dev_scope(drhd->devices,
   923						  drhd->devices_cnt, i, tmp) {
   924				if (tmp == dev) {
   925					/* For a VF use its original BDF# not that of the PF
   926					 * which we used for the IOMMU lookup. Strictly speaking
   927					 * we could do this for all PCI devices; we only need to
   928					 * get the BDF# from the scope table for ACPI matches. */
   929					if (pdev && pdev->is_virtfn)
   930						goto got_pdev;
   931	
   932					*bus = drhd->devices[i].bus;
   933					*devfn = drhd->devices[i].devfn;
   934					goto out;
   935				}
   936	
   937				if (!pdev || !dev_is_pci(tmp))
   938					continue;
   939	
   940				ptmp = to_pci_dev(tmp);
   941				if (ptmp->subordinate &&
   942				    ptmp->subordinate->number <= pdev->bus->number &&
   943				    ptmp->subordinate->busn_res.end >= pdev->bus->number)
   944					goto got_pdev;
   945			}
   946	
   947			if (pdev && drhd->include_all) {
   948			got_pdev:
   949				*bus = pdev->bus->number;
   950				*devfn = pdev->devfn;
   951				goto out;
   952			}
   953		}
   954		iommu = NULL;
   955	 out:
   956		rcu_read_unlock();
   957	
   958		return iommu;
   959	}
   960	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux