linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bjorn.helgaas@gmail.com>
To: kbuild test robot <fengguang.wu@intel.com>
Cc: Jon Derrick <jonathan.derrick@intel.com>,
	kbuild-all@01.org, linux-pci@vger.kernel.org,
	Bjorn Helgaas <bhelgaas@google.com>
Subject: Re: [pci:pci/host-vmd 7/7] drivers/iommu/intel-iommu.c:906:7: error: implicit declaration of function 'is_vmd'
Date: Wed, 30 Aug 2017 15:00:15 -0500	[thread overview]
Message-ID: <CABhMZUU+_fQzS0Hchi_aWW1c3faCTr5KbfbS-2ec5ojSJvNPXA@mail.gmail.com> (raw)
In-Reply-To: <201708310315.JpbFFzYe%fengguang.wu@intel.com>

[-- Attachment #1: Type: text/plain, Size: 4784 bytes --]

On Wed, Aug 30, 2017 at 2:53 PM, kbuild test robot <fengguang.wu@intel.com>
wrote:
>
> 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

Oops, is_vmd() isn't defined for ia64.  I dropped this last patch for now.

> 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 #2: Type: text/html, Size: 6688 bytes --]

      reply	other threads:[~2017-08-30 20:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-30 19:53 [pci:pci/host-vmd 7/7] drivers/iommu/intel-iommu.c:906:7: error: implicit declaration of function 'is_vmd' kbuild test robot
2017-08-30 20:00 ` Bjorn Helgaas [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABhMZUU+_fQzS0Hchi_aWW1c3faCTr5KbfbS-2ec5ojSJvNPXA@mail.gmail.com \
    --to=bjorn.helgaas@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=bjorn@helgaas.com \
    --cc=fengguang.wu@intel.com \
    --cc=jonathan.derrick@intel.com \
    --cc=kbuild-all@01.org \
    --cc=linux-pci@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).