iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: FelixCuioc <FelixCui-oc@zhaoxin.com>,
	Joerg Roedel <joro@8bytes.org>,
	iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
	David Woodhouse <dwmw2@infradead.org>,
	Lu Baolu <baolu.lu@linux.intel.com>
Cc: CobeChen@zhaoxin.com, kbuild-all@lists.01.org, RaymondPang@zhaoxin.com
Subject: Re: [PATCH] iommu/vt-d:Add support for ACPI device in RMRR
Date: Fri, 31 Jul 2020 17:06:48 +0800	[thread overview]
Message-ID: <202007311732.6NqhBCSz%lkp@intel.com> (raw)
In-Reply-To: <20200728100626.2478-1-FelixCui-oc@zhaoxin.com>

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

Hi FelixCuioc,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on iommu/next]
[also build test ERROR on linux/master linus/master v5.8-rc7 next-20200730]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/FelixCuioc/iommu-vt-d-Add-support-for-ACPI-device-in-RMRR/20200728-182409
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: x86_64-randconfig-a014-20200731 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   ld: drivers/iommu/intel/dmar.o: in function `dmar_acpi_bus_add_dev':
>> drivers/iommu/intel/dmar.c:745: undefined reference to `dmar_rmrr_add_acpi_dev'

vim +745 drivers/iommu/intel/dmar.c

   670	
   671	struct dmar_drhd_unit *
   672	dmar_find_matched_drhd_unit(struct pci_dev *dev)
   673	{
   674		struct dmar_drhd_unit *dmaru;
   675		struct acpi_dmar_hardware_unit *drhd;
   676	
   677		dev = pci_physfn(dev);
   678	
   679		rcu_read_lock();
   680		for_each_drhd_unit(dmaru) {
   681			drhd = container_of(dmaru->hdr,
   682					    struct acpi_dmar_hardware_unit,
   683					    header);
   684	
   685			if (dmaru->include_all &&
   686			    drhd->segment == pci_domain_nr(dev->bus))
   687				goto out;
   688	
   689			if (dmar_pci_device_match(dmaru->devices,
   690						  dmaru->devices_cnt, dev))
   691				goto out;
   692		}
   693		dmaru = NULL;
   694	out:
   695		rcu_read_unlock();
   696	
   697		return dmaru;
   698	}
   699	int dmar_acpi_insert_dev_scope(u8 device_number,
   700					struct acpi_device *adev,
   701					void *start, void *end,
   702					struct dmar_dev_scope *devices,
   703					int devices_cnt)
   704	{
   705		struct acpi_dmar_device_scope *scope;
   706		struct device *tmp;
   707		int i;
   708		struct acpi_dmar_pci_path *path;
   709	
   710		for (; start < end; start += scope->length) {
   711			scope = start;
   712			if (scope->entry_type != ACPI_DMAR_SCOPE_TYPE_NAMESPACE)
   713				continue;
   714			if (scope->enumeration_id != device_number)
   715				continue;
   716			path = (void *)(scope + 1);
   717			for_each_dev_scope(devices, devices_cnt, i, tmp)
   718				if (tmp == NULL) {
   719					devices[i].bus = scope->bus;
   720					devices[i].devfn = PCI_DEVFN(path->device, path->function);
   721					rcu_assign_pointer(devices[i].dev,
   722							   get_device(&adev->dev));
   723					return 1;
   724				}
   725			WARN_ON(i >= devices_cnt);
   726		}
   727		return 0;
   728	}
   729	static int dmar_acpi_bus_add_dev(u8 device_number, struct acpi_device *adev)
   730	{
   731		struct dmar_drhd_unit *dmaru;
   732		struct acpi_dmar_hardware_unit *drhd;
   733		int ret = 0;
   734	
   735		for_each_drhd_unit(dmaru) {
   736			drhd = container_of(dmaru->hdr,
   737					    struct acpi_dmar_hardware_unit,
   738					    header);
   739			ret = dmar_acpi_insert_dev_scope(device_number, adev, (void *)(drhd+1),
   740							((void *)drhd)+drhd->header.length,
   741							dmaru->devices, dmaru->devices_cnt);
   742			if (ret)
   743				break;
   744		}
 > 745		ret = dmar_rmrr_add_acpi_dev(device_number, adev);
   746	
   747		return ret;
   748	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36919 bytes --]

[-- Attachment #3: Type: text/plain, Size: 156 bytes --]

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

  reply	other threads:[~2020-07-31  9:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-28 10:06 [PATCH] iommu/vt-d:Add support for ACPI device in RMRR FelixCuioc
2020-07-31  9:06 ` kernel test robot [this message]
2020-08-02 10:07 FelixCuioc
2020-08-03  2:31 ` Lu Baolu

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=202007311732.6NqhBCSz%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=CobeChen@zhaoxin.com \
    --cc=FelixCui-oc@zhaoxin.com \
    --cc=RaymondPang@zhaoxin.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=dwmw2@infradead.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@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).