Re: [PATCH 17/23] iommu/vt-d: Prepare for multiple DMA domain types

From: kernel test robot
Date: Thu Jul 22 2021 - 14:45:23 EST

Hi Robin,

I love your patch! Yet something to improve:

[auto build test ERROR on iommu/next]
[also build test ERROR on rockchip/for-next linus/master v5.14-rc2 next-20210722]
[cannot apply to sunxi/sunxi/for-next]
[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]

base: next
config: x86_64-randconfig-a015-20210722 (attached as .config)
compiler: clang version 13.0.0 ( 9625ca5b602616b2f5584e8a49ba93c52c141e40)
reproduce (this is a W=1 build):
wget -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git remote add linux-review
git fetch --no-tags linux-review Robin-Murphy/iommu-Refactor-DMA-domain-strictness/20210722-022514
git checkout c05e0e1856b394eff1167c00f7bbd6ac7cc9dea6
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=x86_64 SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

>> drivers/iommu/intel/iommu.c:604:38: error: use of undeclared identifier '__IOMMU_DOMAIN_DMA'
if (WARN_ON(!(domain->domain.type & __IOMMU_DOMAIN_DMA)))
1 error generated.

vim +/__IOMMU_DOMAIN_DMA +604 drivers/iommu/intel/iommu.c

598 /* This functionin only returns single iommu in a domain */
599 struct intel_iommu *domain_get_iommu(struct dmar_domain *domain)
600 {
601 int iommu_id;
603 /* si_domain and vm domain should not get here. */
> 604 if (WARN_ON(!(domain->domain.type & __IOMMU_DOMAIN_DMA)))
605 return NULL;
607 for_each_domain_iommu(iommu_id, domain)
608 break;
610 if (iommu_id < 0 || iommu_id >= g_num_of_iommus)
611 return NULL;
613 return g_iommus[iommu_id];
614 }

0-DAY CI Kernel Test Service, Intel Corporation

Attachment: .config.gz
Description: application/gzip