Hi Jacob,

I love your patch! Yet something to improve:

[auto build test ERROR on iommu/next]
[also build test ERROR on v4.17 next-20180606]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:    
https://github.com/0day-ci/linux/commits/Jacob-Pan/iommu-vt-d-pfsid-fix/20180607-134305
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: ia64-defconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 8.1.0
reproduce:
        wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=ia64 

All errors (new ones prefixed by >>):

   In file included from drivers//iommu/intel-iommu.c:31:
   drivers//iommu/intel-iommu.c: In function 'iommu_enable_dev_iotlb':
>> drivers//iommu/intel-iommu.c:1488:33: error: 'struct pci_dev' has no member 
>> named 'physfn'; did you mean 'is_physfn'?
      info->pfsid = PCI_DEVID(pdev->physfn->bus->number, pdev->physfn->devfn);
                                    ^~~~~~
   include/linux/pci.h:51:40: note: in definition of macro 'PCI_DEVID'
    #define PCI_DEVID(bus, devfn) ((((u16)(bus)) << 8) | (devfn))
                                           ^~~
   drivers//iommu/intel-iommu.c:1488:60: error: 'struct pci_dev' has no member 
named 'physfn'; did you mean 'is_physfn'?
      info->pfsid = PCI_DEVID(pdev->physfn->bus->number, pdev->physfn->devfn);
                                                               ^~~~~~
   include/linux/pci.h:51:55: note: in definition of macro 'PCI_DEVID'
    #define PCI_DEVID(bus, devfn) ((((u16)(bus)) << 8) | (devfn))
                                                          ^~~~~

vim +1488 drivers//iommu/intel-iommu.c

  1467  
  1468  static void iommu_enable_dev_iotlb(struct device_domain_info *info)
  1469  {
  1470          struct pci_dev *pdev;
  1471  
  1472          assert_spin_locked(&device_domain_lock);
  1473  
  1474          if (!info || !dev_is_pci(info->dev))
  1475                  return;
  1476  
  1477          pdev = to_pci_dev(info->dev);
  1478          /* For IOMMU that supports device IOTLB throttling (DIT), we 
assign
  1479           * PFSID to the invalidation desc of a VF such that IOMMU HW 
can gauge
  1480           * queue depth at PF level. If DIT is not set, PFSID will be 
treated as
  1481           * reserved, which should be set to 0.
  1482           */
  1483          if (!ecap_dit(info->iommu->ecap))
  1484                  info->pfsid = 0;
  1485          else if (pdev && pdev->is_virtfn) {
  1486                  if (ecap_dit(info->iommu->ecap))
  1487                          dev_warn(&pdev->dev, "SRIOV VF device IOTLB 
enabled without flow control\n");
> 1488                  info->pfsid = PCI_DEVID(pdev->physfn->bus->number, 
> pdev->physfn->devfn);
  1489          } else
  1490                  info->pfsid = PCI_DEVID(info->bus, info->devfn);
  1491  

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

Attachment: .config.gz
Description: application/gzip

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to