Re: [PATCH] iommu: Check for deferred attach in iommu_group_do_dma_attach()

2020-06-04 Thread kernel test robot
Hi Joerg,

I love your patch! Yet something to improve:

[auto build test ERROR on iommu/next]
[also build test ERROR on next-20200604]
[cannot apply to v5.7]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:
https://github.com/0day-ci/linux/commits/Joerg-Roedel/iommu-Check-for-deferred-attach-in-iommu_group_do_dma_attach/20200604-172315
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: arm-randconfig-s032-20200604 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-244-g0ee050a8-dirty
# save the attached .config to linux build tree
make W=1 C=1 ARCH=arm CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>, old ones prefixed by <<):

drivers/iommu/iommu.c:386:5: warning: no previous prototype for 
'iommu_insert_resv_region' [-Wmissing-prototypes]
386 | int iommu_insert_resv_region(struct iommu_resv_region *new,
| ^~~~
drivers/iommu/iommu.c: In function 'iommu_group_do_dma_attach':
>> drivers/iommu/iommu.c:1685:32: error: 'group' undeclared (first use in this 
>> function); did you mean 'cgroup'?
1685 |  if (!iommu_is_attach_deferred(group->domain, dev))
|^
|cgroup
drivers/iommu/iommu.c:1685:32: note: each undeclared identifier is reported 
only once for each function it appears in
drivers/iommu/iommu.c:1682:23: warning: unused variable 'domain' 
[-Wunused-variable]
1682 |  struct iommu_domain *domain = data;
|   ^~
drivers/iommu/iommu.c: At top level:
drivers/iommu/iommu.c:2171:5: warning: no previous prototype for '__iommu_map' 
[-Wmissing-prototypes]
2171 | int __iommu_map(struct iommu_domain *domain, unsigned long iova,
| ^~~
drivers/iommu/iommu.c:2322:8: warning: no previous prototype for 
'__iommu_map_sg' [-Wmissing-prototypes]
2322 | size_t __iommu_map_sg(struct iommu_domain *domain, unsigned long iova,
|^~

vim +1685 drivers/iommu/iommu.c

  1679  
  1680  static int iommu_group_do_dma_attach(struct device *dev, void *data)
  1681  {
  1682  struct iommu_domain *domain = data;
  1683  int ret = 0;
  1684  
> 1685  if (!iommu_is_attach_deferred(group->domain, dev))
  1686  ret = __iommu_attach_device(group->domain, dev);
  1687  
  1688  return ret;
  1689  }
  1690  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH 1/3] dma-direct: provide the ability to reserve per-numa CMA

2020-06-05 Thread kernel test robot
Hi Barry,

I love your patch! Perhaps something to improve:

[auto build test WARNING on arm64/for-next/core]
[also build test WARNING on linus/master v5.7]
[cannot apply to next-20200605]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:
https://github.com/0day-ci/linux/commits/Barry-Song/support-per-numa-CMA-for-ARM-server/20200603-104821
base:   https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git 
for-next/core
config: i386-randconfig-r016-20200605 (attached as .config)
compiler: gcc-4.9 (Ubuntu 4.9.3-13ubuntu2) 4.9.3
reproduce (this is a W=1 build):
# save the attached .config to linux build tree
make W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>, old ones prefixed by <<):

In file included from include/linux/printk.h:326:0,
from include/linux/kernel.h:15,
from include/asm-generic/bug.h:19,
from arch/x86/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/mm.h:9,
from include/linux/memblock.h:13,
from kernel/dma/contiguous.c:21:
kernel/dma/contiguous.c: In function 'dma_pernuma_cma_reserve':
>> include/linux/dynamic_debug.h:82:16: warning: format '%llu' expects argument 
>> of type 'long long unsigned int', but argument 4 has type 'unsigned int' 
>> [-Wformat=]
static struct _ddebug  __aligned(8)  ^
include/linux/dynamic_debug.h:123:2: note: in expansion of macro 
'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(id, fmt);   ^
include/linux/dynamic_debug.h:143:2: note: in expansion of macro 
'__dynamic_func_call'
__dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
^
include/linux/dynamic_debug.h:153:2: note: in expansion of macro 
'_dynamic_func_call'
_dynamic_func_call(fmt, __dynamic_pr_debug,   ^
include/linux/printk.h:330:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
^
kernel/dma/contiguous.c:128:3: note: in expansion of macro 'pr_debug'
pr_debug("%s: reserved %llu MiB on node %dn", __func__,
^

vim +82 include/linux/dynamic_debug.h

923abb9d797ba0 Gal Pressman 2019-05-01  75  
923abb9d797ba0 Gal Pressman 2019-05-01  76  extern __printf(3, 4)
923abb9d797ba0 Gal Pressman 2019-05-01  77  void __dynamic_ibdev_dbg(struct 
_ddebug *descriptor,
923abb9d797ba0 Gal Pressman 2019-05-01  78   const 
struct ib_device *ibdev,
923abb9d797ba0 Gal Pressman 2019-05-01  79   const 
char *fmt, ...);
923abb9d797ba0 Gal Pressman 2019-05-01  80  
2bdde670beedf7 Rasmus Villemoes 2019-03-07  81  #define 
DEFINE_DYNAMIC_DEBUG_METADATA(name, fmt)\
c0d2af63786394 Joe Perches  2012-10-18 @82  static struct _ddebug  
__aligned(8) \
07613b0b5ef857 Jason Baron  2011-10-04  83  
__attribute__((section("__verbose"))) name = {  \
07613b0b5ef857 Jason Baron  2011-10-04  84  .modname = 
KBUILD_MODNAME,  \
07613b0b5ef857 Jason Baron  2011-10-04  85  .function = 
__func__,   \
07613b0b5ef857 Jason Baron  2011-10-04  86  .filename = 
__FILE__,   \
07613b0b5ef857 Jason Baron  2011-10-04  87  .format = 
(fmt),\
07613b0b5ef857 Jason Baron  2011-10-04  88  .lineno = 
__LINE__, \
07613b0b5ef857 Jason Baron  2011-10-04  89  .flags = 
_DPRINTK_FLAGS_DEFAULT,\
2bdde670beedf7 Rasmus Villemoes 2019-03-07  90  
_DPRINTK_KEY_INIT   \
07613b0b5ef857 Jason Baron  2011-10-04  91  }
07613b0b5ef857 Jason Baron  2011-10-04  92  

:: The code at line 82 was first introduced by commit
:: c0d2af637863940b1a4fb208224ca7acb905c39f dynamic_debug: Remove 
unnecessary __used

:: TO: Joe Perches 
:: CC: Greg Kroah-Hartman 

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH] iommu/arm-smmu: Don't bypass pinned stream mappings

2020-06-09 Thread kernel test robot
Hi Jordan,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on iommu/next]
[also build test ERROR on v5.7 next-20200609]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:
https://github.com/0day-ci/linux/commits/Jordan-Crouse/iommu-arm-smmu-Don-t-bypass-pinned-stream-mappings/20200610-020733
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 
bc2b70982be8f5250cd0082a7190f8b417bd4dfe)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>, old ones prefixed by <<):

>> drivers/iommu/arm-smmu.c:1143:45: error: no member named 'pinned' in 'struct 
>> arm_smmu_s2cr'
if (type == S2CR_TYPE_BYPASS && s2cr[idx].pinned)
~ ^
1 error generated.

vim +1143 drivers/iommu/arm-smmu.c

  1122  
  1123  static int arm_smmu_domain_add_master(struct arm_smmu_domain 
*smmu_domain,
  1124struct arm_smmu_master_cfg *cfg,
  1125struct iommu_fwspec *fwspec)
  1126  {
  1127  struct arm_smmu_device *smmu = smmu_domain->smmu;
  1128  struct arm_smmu_s2cr *s2cr = smmu->s2crs;
  1129  u8 cbndx = smmu_domain->cfg.cbndx;
  1130  enum arm_smmu_s2cr_type type;
  1131  int i, idx;
  1132  
  1133  if (smmu_domain->stage == ARM_SMMU_DOMAIN_BYPASS)
  1134  type = S2CR_TYPE_BYPASS;
  1135  else
  1136  type = S2CR_TYPE_TRANS;
  1137  
  1138  for_each_cfg_sme(cfg, fwspec, i, idx) {
  1139  if (type == s2cr[idx].type && cbndx == s2cr[idx].cbndx)
  1140  continue;
  1141  
  1142  /* Don't bypasss pinned streams; leave them as they are 
*/
> 1143  if (type == S2CR_TYPE_BYPASS && s2cr[idx].pinned)
  1144  continue;
  1145  
  1146  s2cr[idx].type = type;
  1147  s2cr[idx].privcfg = S2CR_PRIVCFG_DEFAULT;
  1148  s2cr[idx].cbndx = cbndx;
  1149  arm_smmu_write_s2cr(smmu, idx);
  1150  }
  1151  return 0;
  1152  }
  1153  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH] iommu/arm-smmu: Don't bypass pinned stream mappings

2020-06-09 Thread kernel test robot
Hi Jordan,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on iommu/next]
[also build test ERROR on v5.7 next-20200609]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:
https://github.com/0day-ci/linux/commits/Jordan-Crouse/iommu-arm-smmu-Don-t-bypass-pinned-stream-mappings/20200610-020733
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
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
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross 
ARCH=riscv 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>, old ones prefixed by <<):

drivers/iommu/arm-smmu.c: In function 'arm_smmu_domain_add_master':
>> drivers/iommu/arm-smmu.c:1143:44: error: 'struct arm_smmu_s2cr' has no 
>> member named 'pinned'
1143 |   if (type == S2CR_TYPE_BYPASS && s2cr[idx].pinned)
|^

vim +1143 drivers/iommu/arm-smmu.c

  1122  
  1123  static int arm_smmu_domain_add_master(struct arm_smmu_domain 
*smmu_domain,
  1124struct arm_smmu_master_cfg *cfg,
  1125struct iommu_fwspec *fwspec)
  1126  {
  1127  struct arm_smmu_device *smmu = smmu_domain->smmu;
  1128  struct arm_smmu_s2cr *s2cr = smmu->s2crs;
  1129  u8 cbndx = smmu_domain->cfg.cbndx;
  1130  enum arm_smmu_s2cr_type type;
  1131  int i, idx;
  1132  
  1133  if (smmu_domain->stage == ARM_SMMU_DOMAIN_BYPASS)
  1134  type = S2CR_TYPE_BYPASS;
  1135  else
  1136  type = S2CR_TYPE_TRANS;
  1137  
  1138  for_each_cfg_sme(cfg, fwspec, i, idx) {
  1139  if (type == s2cr[idx].type && cbndx == s2cr[idx].cbndx)
  1140  continue;
  1141  
  1142  /* Don't bypasss pinned streams; leave them as they are 
*/
> 1143  if (type == S2CR_TYPE_BYPASS && s2cr[idx].pinned)
  1144  continue;
  1145  
  1146  s2cr[idx].type = type;
  1147  s2cr[idx].privcfg = S2CR_PRIVCFG_DEFAULT;
  1148  s2cr[idx].cbndx = cbndx;
  1149  arm_smmu_write_s2cr(smmu, idx);
  1150  }
  1151  return 0;
  1152  }
  1153  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v2 1/2] iommu/amd: Move AMD IOMMU driver into subdirectory

2020-06-09 Thread kernel test robot
Hi Joerg,

I love your patch! Perhaps something to improve:

[auto build test WARNING on iommu/next]
[also build test WARNING on linus/master next-20200609]
[cannot apply to v5.7]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:
https://github.com/0day-ci/linux/commits/Joerg-Roedel/iommu-Move-Intel-and-AMD-drivers-into-their-own-subdirectory/20200609-210928
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: x86_64-randconfig-r026-20200607 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 
bc2b70982be8f5250cd0082a7190f8b417bd4dfe)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>, old ones prefixed by <<):

>> drivers/iommu/amd/init.c:3073:19: warning: no previous prototype for 
>> function 'get_amd_iommu' [-Wmissing-prototypes]
struct amd_iommu *get_amd_iommu(unsigned int idx)
^
drivers/iommu/amd/init.c:3073:1: note: declare 'static' if the function is not 
intended to be used outside of this translation unit
struct amd_iommu *get_amd_iommu(unsigned int idx)
^
static
>> drivers/iommu/amd/init.c:3092:4: warning: no previous prototype for function 
>> 'amd_iommu_pc_get_max_banks' [-Wmissing-prototypes]
u8 amd_iommu_pc_get_max_banks(unsigned int idx)
^
drivers/iommu/amd/init.c:3092:1: note: declare 'static' if the function is not 
intended to be used outside of this translation unit
u8 amd_iommu_pc_get_max_banks(unsigned int idx)
^
static
>> drivers/iommu/amd/init.c:3103:6: warning: no previous prototype for function 
>> 'amd_iommu_pc_supported' [-Wmissing-prototypes]
bool amd_iommu_pc_supported(void)
^
drivers/iommu/amd/init.c:3103:1: note: declare 'static' if the function is not 
intended to be used outside of this translation unit
bool amd_iommu_pc_supported(void)
^
static
>> drivers/iommu/amd/init.c:3109:4: warning: no previous prototype for function 
>> 'amd_iommu_pc_get_max_counters' [-Wmissing-prototypes]
u8 amd_iommu_pc_get_max_counters(unsigned int idx)
^
drivers/iommu/amd/init.c:3109:1: note: declare 'static' if the function is not 
intended to be used outside of this translation unit
u8 amd_iommu_pc_get_max_counters(unsigned int idx)
^
static
>> drivers/iommu/amd/init.c:3158:5: warning: no previous prototype for function 
>> 'amd_iommu_pc_get_reg' [-Wmissing-prototypes]
int amd_iommu_pc_get_reg(struct amd_iommu *iommu, u8 bank, u8 cntr, u8 fxn, u64 
*value)
^
drivers/iommu/amd/init.c:3158:1: note: declare 'static' if the function is not 
intended to be used outside of this translation unit
int amd_iommu_pc_get_reg(struct amd_iommu *iommu, u8 bank, u8 cntr, u8 fxn, u64 
*value)
^
static
>> drivers/iommu/amd/init.c:3167:5: warning: no previous prototype for function 
>> 'amd_iommu_pc_set_reg' [-Wmissing-prototypes]
int amd_iommu_pc_set_reg(struct amd_iommu *iommu, u8 bank, u8 cntr, u8 fxn, u64 
*value)
^
drivers/iommu/amd/init.c:3167:1: note: declare 'static' if the function is not 
intended to be used outside of this translation unit
int amd_iommu_pc_set_reg(struct amd_iommu *iommu, u8 bank, u8 cntr, u8 fxn, u64 
*value)
^
static
6 warnings generated.

vim +/get_amd_iommu +3073 drivers/iommu/amd/init.c

30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney   2013-06-05  
3072  
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 
@3073  struct amd_iommu *get_amd_iommu(unsigned int idx)
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  
3074  {
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  
3075unsigned int i = 0;
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  
3076struct amd_iommu *iommu;
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  
3077  
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  
3078for_each_iommu(iommu)
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  
3079if (i++ == idx)
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  
3080

Re: [PATCH v8 4/7] iommu/arm-smmu: Add a pointer to the attached device to smmu_domain

2020-06-11 Thread kernel test robot
Hi Jordan,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.7 next-20200611]
[cannot apply to iommu/next robh/for-next arm/for-next keystone/next 
rockchip/for-next arm64/for-next/core shawnguo/for-next soc/for-next]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:
https://github.com/0day-ci/linux/commits/Jordan-Crouse/iommu-arm-smmu-Enable-split-pagetable-support/20200612-094718
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
b961f8dc8976c091180839f4483d67b7c2ca2578
config: arm64-randconfig-s031-20200612 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-250-g42323db3-dirty
# save the attached .config to linux build tree
make W=1 C=1 ARCH=arm64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>, old ones prefixed by <<):

drivers/iommu/arm-smmu.c: In function 'arm_smmu_init_domain_context':
>> drivers/iommu/arm-smmu.c:804:21: error: 'dev' undeclared (first use in this 
>> function); did you mean 'cdev'?
804 |  smmu_domain->dev = dev;
| ^~~
| cdev
drivers/iommu/arm-smmu.c:804:21: note: each undeclared identifier is reported 
only once for each function it appears in

vim +804 drivers/iommu/arm-smmu.c

   669  
   670  static int arm_smmu_init_domain_context(struct iommu_domain *domain,
   671  struct arm_smmu_device *smmu)
   672  {
   673  int irq, start, ret = 0;
   674  unsigned long ias, oas;
   675  struct io_pgtable_ops *pgtbl_ops;
   676  struct io_pgtable_cfg pgtbl_cfg;
   677  enum io_pgtable_fmt fmt;
   678  struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);
   679  struct arm_smmu_cfg *cfg = &smmu_domain->cfg;
   680  
   681  mutex_lock(&smmu_domain->init_mutex);
   682  if (smmu_domain->smmu)
   683  goto out_unlock;
   684  
   685  if (domain->type == IOMMU_DOMAIN_IDENTITY) {
   686  smmu_domain->stage = ARM_SMMU_DOMAIN_BYPASS;
   687  smmu_domain->smmu = smmu;
   688  goto out_unlock;
   689  }
   690  
   691  /*
   692   * Mapping the requested stage onto what we support is 
surprisingly
   693   * complicated, mainly because the spec allows S1+S2 SMMUs 
without
   694   * support for nested translation. That means we end up with the
   695   * following table:
   696   *
   697   * RequestedSupportedActual
   698   * S1   N  S1
   699   * S1 S1+S2S1
   700   * S1   S2 S2
   701   * S1   S1 S1
   702   * NN  N
   703   * N  S1+S2S2
   704   * NS2 S2
   705   * NS1 S1
   706   *
   707   * Note that you can't actually request stage-2 mappings.
   708   */
   709  if (!(smmu->features & ARM_SMMU_FEAT_TRANS_S1))
   710  smmu_domain->stage = ARM_SMMU_DOMAIN_S2;
   711  if (!(smmu->features & ARM_SMMU_FEAT_TRANS_S2))
   712  smmu_domain->stage = ARM_SMMU_DOMAIN_S1;
   713  
   714  /*
   715   * Choosing a suitable context format is even more fiddly. 
Until we
   716   * grow some way for the caller to express a preference, and/or 
move
   717   * the decision into the io-pgtable code where it arguably 
belongs,
   718   * just aim for the closest thing to the rest of the system, 
and hope
   719   * that the hardware isn't esoteric enough that we can't assume 
AArch64
   720   * support to be a superset of AArch32 support...
   721   */
   722  if (smmu->features & ARM_SMMU_FEAT_FMT_AARCH32_L)
   723  cfg->fmt = ARM_SMMU_CTX_FMT_AARCH32_L;
   724  if (IS_ENABLED(CONFIG_IOMMU_IO_PGTABLE_ARMV7S) &&
   725  !IS_ENABLED(CONFIG_64BIT) && !IS_ENABLED(CONFIG_ARM_LPAE) &&
   726  (smmu->features & ARM_SMMU_FEAT_FMT_AARCH32_S) &&
   727  (smmu_domain->stage == ARM_SMMU_DOMAIN_S

Re: [PATCH v8 6/7] drm/msm: Set the global virtual address range from the IOMMU domain

2020-06-11 Thread kernel test robot
Hi Jordan,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on next-20200611]
[cannot apply to iommu/next robh/for-next arm/for-next keystone/next 
rockchip/for-next arm64/for-next/core shawnguo/for-next soc/for-next v5.7]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:
https://github.com/0day-ci/linux/commits/Jordan-Crouse/iommu-arm-smmu-Enable-split-pagetable-support/20200612-094718
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
b961f8dc8976c091180839f4483d67b7c2ca2578
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
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
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>, old ones prefixed by <<):

In file included from include/linux/bitops.h:5,
from include/linux/kernel.h:12,
from include/linux/ascii85.h:11,
from drivers/gpu/drm/msm/adreno/adreno_gpu.c:9:
drivers/gpu/drm/msm/adreno/adreno_gpu.c: In function 
'adreno_iommu_create_address_space':
include/linux/bits.h:37:11: warning: right shift count is negative 
[-Wshift-count-negative]
37 |   (~UL(0) >> (BITS_PER_LONG - 1 - (h
|   ^~
include/linux/bits.h:39:31: note: in expansion of macro '__GENMASK'
39 |  (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
|   ^
>> drivers/gpu/drm/msm/adreno/adreno_gpu.c:206:11: note: in expansion of macro 
>> 'GENMASK'
206 |   start & GENMASK(48, 0), size);
|   ^~~
--
In file included from include/linux/bits.h:6,
from include/linux/bitops.h:5,
from include/linux/kernel.h:12,
from drivers/gpu/drm/msm/msm_drv.h:11,
from drivers/gpu/drm/msm/msm_iommu.c:7:
drivers/gpu/drm/msm/msm_iommu.c: In function 'msm_iommu_map':
>> include/vdso/bits.h:7:26: warning: left shift count >= width of type 
>> [-Wshift-count-overflow]
7 | #define BIT(nr)   (UL(1) << (nr))
|  ^~
>> drivers/gpu/drm/msm/msm_iommu.c:40:13: note: in expansion of macro 'BIT'
40 |  if (iova & BIT(48))
| ^~~
In file included from include/linux/bitops.h:5,
from include/linux/kernel.h:12,
from drivers/gpu/drm/msm/msm_drv.h:11,
from drivers/gpu/drm/msm/msm_iommu.c:7:
>> include/linux/bits.h:36:22: warning: left shift count >= width of type 
>> [-Wshift-count-overflow]
36 |  (((~UL(0)) - (UL(1) << (l)) + 1) &  |  ^~
include/linux/bits.h:39:31: note: in expansion of macro '__GENMASK'
39 |  (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
|   ^
>> drivers/gpu/drm/msm/msm_iommu.c:41:11: note: in expansion of macro 'GENMASK'
41 |   iova |= GENMASK(63, 49);
|   ^~~
include/linux/bits.h:37:11: warning: right shift count is negative 
[-Wshift-count-negative]
37 |   (~UL(0) >> (BITS_PER_LONG - 1 - (h
|   ^~
include/linux/bits.h:39:31: note: in expansion of macro '__GENMASK'
39 |  (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
|   ^
>> drivers/gpu/drm/msm/msm_iommu.c:41:11: note: in expansion of macro 'GENMASK'
41 |   iova |= GENMASK(63, 49);
|   ^~~
In file included from include/linux/bits.h:6,
from include/linux/bitops.h:5,
from include/linux/kernel.h:12,
from drivers/gpu/drm/msm/msm_drv.h:11,
from drivers/gpu/drm/msm/msm_iommu.c:7:
drivers/gpu/drm/msm/msm_iommu.c: In function 'msm_iommu_unmap':
>> include/vdso/bits.h:7:26: warning: left shift count >= width of type 
>> [-Wshift-count-overflow]
7 | #define BIT(nr)   (UL(1) << (nr))
|  ^~
drivers/gpu/drm/msm/msm_iommu.c:53:13: note: in expansion of macro 'BIT'
53 |  if (iova & BIT(48))
| ^~~
In file included from include/linux/bitops.h:5,
from include/linux/kernel.h:12,
from drivers/gpu/drm/msm/msm_drv.h:11,
from drivers/gpu/drm/msm/msm_iommu.c:7:
>> include/linux/bits.h:36:22: warning: left shift count >= width of type 
>> [-Wshift-count-overflow]
36 |  (((~UL(0)) - (UL(1) << (l)) + 1) &  |  ^~
include/linux/bits.h:39:31: note: in expansion of macro '__GENMASK'
39 |  (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
|

Re: [PATCH v8 5/7] iommu/arm-smmu: Add implementation for the adreno GPU SMMU

2020-06-11 Thread kernel test robot
Hi Jordan,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on next-20200611]
[cannot apply to iommu/next robh/for-next arm/for-next keystone/next 
rockchip/for-next arm64/for-next/core shawnguo/for-next soc/for-next v5.7]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:
https://github.com/0day-ci/linux/commits/Jordan-Crouse/iommu-arm-smmu-Enable-split-pagetable-support/20200612-094718
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
b961f8dc8976c091180839f4483d67b7c2ca2578
config: arm64-randconfig-s031-20200612 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-250-g42323db3-dirty
# save the attached .config to linux build tree
make W=1 C=1 ARCH=arm64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All error/warnings (new ones prefixed by >>, old ones prefixed by <<):

drivers/iommu/arm-smmu-qcom.c: In function 'qcom_adreno_smmu_is_gpu_device':
>> drivers/iommu/arm-smmu-qcom.c:17:49: error: 'smmu_domain->dev' is a pointer; 
>> did you mean to use '->'?
17 |  return of_device_is_compatible(smmu_domain->dev.of_node, "qcom,adreno");
| ^
| ->
>> drivers/iommu/arm-smmu-qcom.c:18:1: warning: control reaches end of non-void 
>> function [-Wreturn-type]
18 | }
| ^

vim +17 drivers/iommu/arm-smmu-qcom.c

14  
15  static bool qcom_adreno_smmu_is_gpu_device(struct arm_smmu_domain 
*smmu_domain)
16  {
  > 17  return of_device_is_compatible(smmu_domain->dev.of_node, 
"qcom,adreno");
  > 18  }
19  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v8 5/7] iommu/arm-smmu: Add implementation for the adreno GPU SMMU

2020-06-12 Thread kernel test robot
Hi Jordan,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on next-20200612]
[cannot apply to iommu/next robh/for-next arm/for-next keystone/next 
rockchip/for-next arm64/for-next/core shawnguo/for-next soc/for-next v5.7]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:
https://github.com/0day-ci/linux/commits/Jordan-Crouse/iommu-arm-smmu-Enable-split-pagetable-support/20200612-094718
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
b961f8dc8976c091180839f4483d67b7c2ca2578
config: arm64-randconfig-r026-20200612 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 
3b43f006294971b8049d4807110032169780e5b8)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>, old ones prefixed by <<):

>> drivers/iommu/arm-smmu-qcom.c:17:49: error: member reference type 'struct 
>> device *' is a pointer; did you mean to use '->'?
return of_device_is_compatible(smmu_domain->dev.of_node, "qcom,adreno");
^
->
1 error generated.

vim +17 drivers/iommu/arm-smmu-qcom.c

14  
15  static bool qcom_adreno_smmu_is_gpu_device(struct arm_smmu_domain 
*smmu_domain)
16  {
  > 17  return of_device_is_compatible(smmu_domain->dev.of_node, 
"qcom,adreno");
18  }
19  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v6 04/36] drm: amdgpu: fix common struct sg_table related issues

2020-06-18 Thread kernel test robot
Hi Marek,

I love your patch! Perhaps something to improve:

[auto build test WARNING on next-20200618]
[also build test WARNING on v5.8-rc1]
[cannot apply to linuxtv-media/master staging/staging-testing 
drm-exynos/exynos-drm-next drm-intel/for-linux-next linus/master v5.8-rc1 v5.7 
v5.7-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use  as documented in
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Marek-Szyprowski/DRM-fix-struct-sg_table-nents-vs-orig_nents-misuse/20200619-000417
base:ce2cc8efd7a40cbd17841add878cb691d0ce0bba
config: alpha-allyesconfig (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
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
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross 
ARCH=alpha 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>, old ones prefixed by <<):

In file included from include/linux/dma-mapping.h:11,
from drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:25:
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c: In function 
'amdgpu_vram_mgr_alloc_sgt':
include/linux/scatterlist.h:158:17: error: '*sgt' is a pointer; did you mean to 
use '->'?
158 |  for_each_sg(sgt->sgl, sg, sgt->orig_nents, i)
| ^~
include/linux/scatterlist.h:152:22: note: in definition of macro 'for_each_sg'
152 |  for (__i = 0, sg = (sglist); __i < (nr); __i++, sg = sg_next(sg))
|  ^~
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:480:2: note: in expansion of 
>> macro 'for_each_sgtable_sg'
480 |  for_each_sgtable_sg(*sgt, sg, i)
|  ^~~
include/linux/scatterlist.h:158:31: error: '*sgt' is a pointer; did you mean to 
use '->'?
158 |  for_each_sg(sgt->sgl, sg, sgt->orig_nents, i)
|   ^~
include/linux/scatterlist.h:152:38: note: in definition of macro 'for_each_sg'
152 |  for (__i = 0, sg = (sglist); __i < (nr); __i++, sg = sg_next(sg))
|  ^~
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:480:2: note: in expansion of 
>> macro 'for_each_sgtable_sg'
480 |  for_each_sgtable_sg(*sgt, sg, i)
|  ^~~
include/linux/scatterlist.h:158:17: error: '*sgt' is a pointer; did you mean to 
use '->'?
158 |  for_each_sg(sgt->sgl, sg, sgt->orig_nents, i)
| ^~
include/linux/scatterlist.h:152:22: note: in definition of macro 'for_each_sg'
152 |  for (__i = 0, sg = (sglist); __i < (nr); __i++, sg = sg_next(sg))
|  ^~
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:484:2: note: in expansion of macro 
'for_each_sgtable_sg'
484 |  for_each_sgtable_sg(*sgt, sg, i) {
|  ^~~
include/linux/scatterlist.h:158:31: error: '*sgt' is a pointer; did you mean to 
use '->'?
158 |  for_each_sg(sgt->sgl, sg, sgt->orig_nents, i)
|   ^~
include/linux/scatterlist.h:152:38: note: in definition of macro 'for_each_sg'
152 |  for (__i = 0, sg = (sglist); __i < (nr); __i++, sg = sg_next(sg))
|  ^~
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:484:2: note: in expansion of macro 
'for_each_sgtable_sg'
484 |  for_each_sgtable_sg(*sgt, sg, i) {
|  ^~~
include/linux/scatterlist.h:158:17: error: '*sgt' is a pointer; did you mean to 
use '->'?
158 |  for_each_sg(sgt->sgl, sg, sgt->orig_nents, i)
| ^~
include/linux/scatterlist.h:152:22: note: in definition of macro 'for_each_sg'
152 |  for (__i = 0, sg = (sglist); __i < (nr); __i++, sg = sg_next(sg))
|  ^~
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:504:2: note: in expansion of macro 
'for_each_sgtable_sg'
504 |  for_each_sgtable_sg(*sgt, sg, i) {
|  ^~~
include/linux/scatterlist.h:158:31: error: '*sgt' is a pointer; did you mean to 
use '->'?
158 |  for_each_sg(sgt->sgl, sg, sgt->orig_nents, i)
|   ^~
include/linux/scatterlist.h:152:38: note: in definition of macro 'for_each_sg'
152 |  for (__i = 0, sg = (sglist); __i < (nr); __i++, sg = sg_next(sg))
|  ^~
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:504:2: note: in expansion of macro 
'for_each_sgtable_sg'
504 |  for_each_sgtable_sg(*sgt, sg, i) {
|  ^~~
In file included from drivers/gpu/drm/amd/amd

Re: [PATCH v6 21/36] drm: v3d: fix common struct sg_table related issues

2020-06-18 Thread kernel test robot
Hi Marek,

I love your patch! Perhaps something to improve:

[auto build test WARNING on next-20200618]
[also build test WARNING on v5.8-rc1]
[cannot apply to linuxtv-media/master staging/staging-testing 
drm-exynos/exynos-drm-next drm-intel/for-linux-next linus/master v5.8-rc1 v5.7 
v5.7-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use  as documented in
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Marek-Szyprowski/DRM-fix-struct-sg_table-nents-vs-orig_nents-misuse/20200619-000417
base:ce2cc8efd7a40cbd17841add878cb691d0ce0bba
config: alpha-allyesconfig (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
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
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross 
ARCH=alpha 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>, old ones prefixed by <<):

In file included from include/linux/kernel.h:11,
from include/linux/delay.h:22,
from drivers/gpu/drm/v3d/v3d_drv.h:4,
from drivers/gpu/drm/v3d/v3d_mmu.c:21:
drivers/gpu/drm/v3d/v3d_mmu.c: In function 'v3d_mmu_insert_ptes':
include/linux/compiler.h:339:38: error: call to '__compiletime_assert_254' 
declared with attribute error: BUILD_BUG_ON failed: V3D_MMU_PAGE_SHIFT != 
PAGE_SIZE
339 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
|  ^
include/linux/compiler.h:320:4: note: in definition of macro 
'__compiletime_assert'
320 |prefix ## suffix(); |^~
include/linux/compiler.h:339:2: note: in expansion of macro 
'_compiletime_assert'
339 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
|  ^~~
include/linux/build_bug.h:39:37: note: in expansion of macro 
'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 |  BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
|  ^~~~
>> drivers/gpu/drm/v3d/v3d_mmu.c:100:3: note: in expansion of macro 
>> 'BUILD_BUG_ON'
100 |   BUILD_BUG_ON(V3D_MMU_PAGE_SHIFT != PAGE_SIZE);
|   ^~~~

vim +/BUILD_BUG_ON +100 drivers/gpu/drm/v3d/v3d_mmu.c

86  
87  void v3d_mmu_insert_ptes(struct v3d_bo *bo)
88  {
89  struct drm_gem_shmem_object *shmem_obj = &bo->base;
90  struct v3d_dev *v3d = to_v3d_dev(shmem_obj->base.dev);
91  u32 page = bo->node.start;
92  u32 page_prot = V3D_PTE_WRITEABLE | V3D_PTE_VALID;
93  struct sg_dma_page_iter dma_iter;
94  
95  for_each_sgtable_dma_page(shmem_obj->sgt, &dma_iter, 0) {
96  dma_addr_t dma_addr = 
sg_page_iter_dma_address(&dma_iter);
97  u32 page_address = dma_addr >> V3D_MMU_PAGE_SHIFT;
98  u32 pte = page_prot | page_address;
99  
 > 100  BUILD_BUG_ON(V3D_MMU_PAGE_SHIFT != PAGE_SIZE);
   101  BUG_ON(page_address + 1 >= BIT(24));
   102  v3d->pt[page++] = pte;
   103  }
   104  
   105  WARN_ON_ONCE(page - bo->node.start !=
   106   shmem_obj->base.size >> V3D_MMU_PAGE_SHIFT);
   107  
   108  if (v3d_mmu_flush_all(v3d))
   109  dev_err(v3d->drm.dev, "MMU flush timeout\n");
   110  }
   111  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v6 32/36] rapidio: fix common struct sg_table related issues

2020-06-18 Thread kernel test robot
Hi Marek,

I love your patch! Yet something to improve:

[auto build test ERROR on next-20200618]
[also build test ERROR on v5.8-rc1]
[cannot apply to linuxtv-media/master staging/staging-testing 
drm-exynos/exynos-drm-next drm-intel/for-linux-next linus/master v5.8-rc1 v5.7 
v5.7-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use  as documented in
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Marek-Szyprowski/DRM-fix-struct-sg_table-nents-vs-orig_nents-misuse/20200619-000417
base:ce2cc8efd7a40cbd17841add878cb691d0ce0bba
config: alpha-allyesconfig (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
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
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross 
ARCH=alpha 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

   In file included from include/linux/dma-mapping.h:11,
from drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:25:
   drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c: In function 
'amdgpu_vram_mgr_alloc_sgt':
>> include/linux/scatterlist.h:158:17: error: '*sgt' is a pointer; did you mean 
>> to use '->'?
 158 |  for_each_sg(sgt->sgl, sg, sgt->orig_nents, i)
 | ^~
   include/linux/scatterlist.h:152:22: note: in definition of macro 
'for_each_sg'
 152 |  for (__i = 0, sg = (sglist); __i < (nr); __i++, sg = sg_next(sg))
 |  ^~
   drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:480:2: note: in expansion of 
macro 'for_each_sgtable_sg'
 480 |  for_each_sgtable_sg(*sgt, sg, i)
 |  ^~~
   include/linux/scatterlist.h:158:31: error: '*sgt' is a pointer; did you mean 
to use '->'?
 158 |  for_each_sg(sgt->sgl, sg, sgt->orig_nents, i)
 |   ^~
   include/linux/scatterlist.h:152:38: note: in definition of macro 
'for_each_sg'
 152 |  for (__i = 0, sg = (sglist); __i < (nr); __i++, sg = sg_next(sg))
 |  ^~
   drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:480:2: note: in expansion of 
macro 'for_each_sgtable_sg'
 480 |  for_each_sgtable_sg(*sgt, sg, i)
 |  ^~~
>> include/linux/scatterlist.h:158:17: error: '*sgt' is a pointer; did you mean 
>> to use '->'?
 158 |  for_each_sg(sgt->sgl, sg, sgt->orig_nents, i)
 | ^~
   include/linux/scatterlist.h:152:22: note: in definition of macro 
'for_each_sg'
 152 |  for (__i = 0, sg = (sglist); __i < (nr); __i++, sg = sg_next(sg))
 |  ^~
   drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:484:2: note: in expansion of 
macro 'for_each_sgtable_sg'
 484 |  for_each_sgtable_sg(*sgt, sg, i) {
 |  ^~~
   include/linux/scatterlist.h:158:31: error: '*sgt' is a pointer; did you mean 
to use '->'?
 158 |  for_each_sg(sgt->sgl, sg, sgt->orig_nents, i)
 |   ^~
   include/linux/scatterlist.h:152:38: note: in definition of macro 
'for_each_sg'
 152 |  for (__i = 0, sg = (sglist); __i < (nr); __i++, sg = sg_next(sg))
 |  ^~
   drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:484:2: note: in expansion of 
macro 'for_each_sgtable_sg'
 484 |  for_each_sgtable_sg(*sgt, sg, i) {
 |  ^~~
>> include/linux/scatterlist.h:158:17: error: '*sgt' is a pointer; did you mean 
>> to use '->'?
 158 |  for_each_sg(sgt->sgl, sg, sgt->orig_nents, i)
 | ^~
   include/linux/scatterlist.h:152:22: note: in definition of macro 
'for_each_sg'
 152 |  for (__i = 0, sg = (sglist); __i < (nr); __i++, sg = sg_next(sg))
 |  ^~
   drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:504:2: note: in expansion of 
macro 'for_each_sgtable_sg'
 504 |  for_each_sgtable_sg(*sgt, sg, i) {
 |  ^~~
   include/linux/scatterlist.h:158:31: error: '*sgt' is a pointer; did you mean 
to use '->'?
 158 |  for_each_sg(sgt->sgl, sg, sgt->orig_nents, i)
 |   ^~
   include/linux/scatterlist.h:152:38: note: in definition of macro 
'for_each_sg'
 152 |  for (__i = 0, sg = (sglist); __i < (nr); __i++, s

Re: [PATCH v6 35/36] videobuf2: use sgtable-based scatterlist wrappers

2020-06-18 Thread kernel test robot
Hi Marek,

I love your patch! Yet something to improve:

[auto build test ERROR on next-20200618]
[also build test ERROR on v5.8-rc1]
[cannot apply to linuxtv-media/master staging/staging-testing 
drm-exynos/exynos-drm-next drm-intel/for-linux-next linus/master v5.8-rc1 v5.7 
v5.7-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use  as documented in
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Marek-Szyprowski/DRM-fix-struct-sg_table-nents-vs-orig_nents-misuse/20200619-000417
base:ce2cc8efd7a40cbd17841add878cb691d0ce0bba
config: alpha-allyesconfig (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
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
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross 
ARCH=alpha 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All error/warnings (new ones prefixed by >>):

   drivers/media/common/videobuf2/videobuf2-dma-sg.c: In function 
'vb2_dma_sg_alloc':
>> drivers/media/common/videobuf2/videobuf2-dma-sg.c:173:13: error: invalid 
>> storage class for function 'vb2_dma_sg_put'
 173 | static void vb2_dma_sg_put(void *buf_priv)
 | ^~
>> drivers/media/common/videobuf2/videobuf2-dma-sg.c:173:1: warning: ISO C90 
>> forbids mixed declarations and code [-Wdeclaration-after-statement]
 173 | static void vb2_dma_sg_put(void *buf_priv)
 | ^~
>> drivers/media/common/videobuf2/videobuf2-dma-sg.c:195:13: error: invalid 
>> storage class for function 'vb2_dma_sg_prepare'
 195 | static void vb2_dma_sg_prepare(void *buf_priv)
 | ^~
>> drivers/media/common/videobuf2/videobuf2-dma-sg.c:207:13: error: invalid 
>> storage class for function 'vb2_dma_sg_finish'
 207 | static void vb2_dma_sg_finish(void *buf_priv)
 | ^
>> drivers/media/common/videobuf2/videobuf2-dma-sg.c:219:14: error: invalid 
>> storage class for function 'vb2_dma_sg_get_userptr'
 219 | static void *vb2_dma_sg_get_userptr(struct device *dev, unsigned 
long vaddr,
 |  ^~
   drivers/media/common/videobuf2/videobuf2-dma-sg.c: In function 
'vb2_dma_sg_get_userptr':
>> drivers/media/common/videobuf2/videobuf2-dma-sg.c:278:13: error: invalid 
>> storage class for function 'vb2_dma_sg_put_userptr'
 278 | static void vb2_dma_sg_put_userptr(void *buf_priv)
 | ^~
   drivers/media/common/videobuf2/videobuf2-dma-sg.c:278:1: warning: ISO C90 
forbids mixed declarations and code [-Wdeclaration-after-statement]
 278 | static void vb2_dma_sg_put_userptr(void *buf_priv)
 | ^~
>> drivers/media/common/videobuf2/videobuf2-dma-sg.c:298:14: error: invalid 
>> storage class for function 'vb2_dma_sg_vaddr'
 298 | static void *vb2_dma_sg_vaddr(void *buf_priv)
 |  ^~~~
>> drivers/media/common/videobuf2/videobuf2-dma-sg.c:315:21: error: invalid 
>> storage class for function 'vb2_dma_sg_num_users'
 315 | static unsigned int vb2_dma_sg_num_users(void *buf_priv)
 | ^~~~
>> drivers/media/common/videobuf2/videobuf2-dma-sg.c:322:12: error: invalid 
>> storage class for function 'vb2_dma_sg_mmap'
 322 | static int vb2_dma_sg_mmap(void *buf_priv, struct vm_area_struct 
*vma)
 |^~~
>> drivers/media/common/videobuf2/videobuf2-dma-sg.c:358:12: error: invalid 
>> storage class for function 'vb2_dma_sg_dmabuf_ops_attach'
 358 | static int vb2_dma_sg_dmabuf_ops_attach(struct dma_buf *dbuf,
 |^~~~
>> drivers/media/common/videobuf2/videobuf2-dma-sg.c:396:13: error: invalid 
>> storage class for function 'vb2_dma_sg_dmabuf_ops_detach'
 396 | static void vb2_dma_sg_dmabuf_ops_detach(struct dma_buf *dbuf,
 | ^~~~
   drivers/media/common/videobuf2/videobuf2-dma-sg.c: In function 
'vb2_dma_sg_dmabuf_ops_detach':
>> drivers/media/common/videobuf2/videobuf2-dma-sg.c:409:3: error: too few 
>> arguments to function 'dma_unmap_sgtable'
 409 |   dma_unmap_sgtable(db_attach->dev, sgt, attach->dma_dir);
 |   ^
   In file included from include/linux/dma-buf.h:20,
from include/media/videobuf2-co

Re: [PATCH v6 23/36] drm: vmwgfx: fix common struct sg_table related issues

2020-06-18 Thread kernel test robot
Hi Marek,

I love your patch! Perhaps something to improve:

[auto build test WARNING on next-20200618]
[also build test WARNING on v5.8-rc1]
[cannot apply to linuxtv-media/master staging/staging-testing 
drm-exynos/exynos-drm-next drm-intel/for-linux-next linus/master v5.8-rc1 v5.7 
v5.7-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use  as documented in
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Marek-Szyprowski/DRM-fix-struct-sg_table-nents-vs-orig_nents-misuse/20200619-000417
base:ce2cc8efd7a40cbd17841add878cb691d0ce0bba
config: x86_64-randconfig-s021-20200618 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-rc1-10-gc17b1b06-dirty
# save the attached .config to linux build tree
make W=1 C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 


sparse warnings: (new ones prefixed by >>)

>> drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c:365:38: sparse: sparse: incorrect 
>> type in argument 2 (different base types) @@ expected struct sg_table 
>> *sgt @@ got struct sg_table sgt @@
>> drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c:365:38: sparse: expected 
>> struct sg_table *sgt
>> drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c:365:38: sparse: got struct 
>> sg_table sgt
   drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c:386:43: sparse: sparse: incorrect 
type in argument 2 (different base types) @@ expected struct sg_table *sgt 
@@ got struct sg_table sgt @@
   drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c:386:43: sparse: expected 
struct sg_table *sgt
   drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c:386:43: sparse: got struct 
sg_table sgt

vim +365 drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c

   352  
   353  /**
   354   * vmw_ttm_unmap_from_dma - unmap  device addresses previsouly mapped 
for
   355   * TTM pages
   356   *
   357   * @vmw_tt: Pointer to a struct vmw_ttm_backend
   358   *
   359   * Used to free dma mappings previously mapped by vmw_ttm_map_for_dma.
   360   */
   361  static void vmw_ttm_unmap_from_dma(struct vmw_ttm_tt *vmw_tt)
   362  {
   363  struct device *dev = vmw_tt->dev_priv->dev->dev;
   364  
 > 365  dma_unmap_sgtable(dev, vmw_tt->sgt, DMA_BIDIRECTIONAL, 0);
   366  vmw_tt->sgt.nents = vmw_tt->sgt.orig_nents;
   367  }
   368  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v6 23/36] drm: vmwgfx: fix common struct sg_table related issues

2020-06-18 Thread kernel test robot
Hi Marek,

I love your patch! Yet something to improve:

[auto build test ERROR on next-20200618]
[also build test ERROR on v5.8-rc1]
[cannot apply to linuxtv-media/master staging/staging-testing 
drm-exynos/exynos-drm-next drm-intel/for-linux-next linus/master v5.8-rc1 v5.7 
v5.7-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use  as documented in
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Marek-Szyprowski/DRM-fix-struct-sg_table-nents-vs-orig_nents-misuse/20200619-000417
base:ce2cc8efd7a40cbd17841add878cb691d0ce0bba
config: x86_64-rhel-7.6 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 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 

All error/warnings (new ones prefixed by >>):

   drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c: In function 
'vmw_ttm_unmap_from_dma':
>> drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c:365:31: error: incompatible type 
>> for argument 2 of 'dma_unmap_sgtable'
 365 |  dma_unmap_sgtable(dev, vmw_tt->sgt, DMA_BIDIRECTIONAL, 0);
 | ~~^
 |   |
 |   struct sg_table
   In file included from include/linux/dma-buf.h:20,
from drivers/gpu/drm/vmwgfx/ttm_object.h:40,
from drivers/gpu/drm/vmwgfx/ttm_lock.h:55,
from drivers/gpu/drm/vmwgfx/vmwgfx_drv.h:44,
from drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c:28:
   include/linux/dma-mapping.h:651:75: note: expected 'struct sg_table *' but 
argument is of type 'struct sg_table'
 651 | static inline void dma_unmap_sgtable(struct device *dev, struct 
sg_table *sgt,
 |  
~^~~
   drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c: In function 
'vmw_ttm_map_for_dma':
>> drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c:386:36: error: incompatible type 
>> for argument 2 of 'dma_map_sgtable'
 386 |  return dma_map_sgtable(dev, vmw_tt->sgt, DMA_BIDIRECTIONAL, 0);
 |  ~~^
 ||
 |struct sg_table
   In file included from include/linux/dma-buf.h:20,
from drivers/gpu/drm/vmwgfx/ttm_object.h:40,
from drivers/gpu/drm/vmwgfx/ttm_lock.h:55,
from drivers/gpu/drm/vmwgfx/vmwgfx_drv.h:44,
from drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c:28:
   include/linux/dma-mapping.h:628:72: note: expected 'struct sg_table *' but 
argument is of type 'struct sg_table'
 628 | static inline int dma_map_sgtable(struct device *dev, struct 
sg_table *sgt,
 |   
~^~~
>> drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c:387:1: warning: control reaches 
>> end of non-void function [-Wreturn-type]
 387 | }
 | ^

vim +/dma_unmap_sgtable +365 drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c

   352  
   353  /**
   354   * vmw_ttm_unmap_from_dma - unmap  device addresses previsouly mapped 
for
   355   * TTM pages
   356   *
   357   * @vmw_tt: Pointer to a struct vmw_ttm_backend
   358   *
   359   * Used to free dma mappings previously mapped by vmw_ttm_map_for_dma.
   360   */
   361  static void vmw_ttm_unmap_from_dma(struct vmw_ttm_tt *vmw_tt)
   362  {
   363  struct device *dev = vmw_tt->dev_priv->dev->dev;
   364  
 > 365  dma_unmap_sgtable(dev, vmw_tt->sgt, DMA_BIDIRECTIONAL, 0);
   366  vmw_tt->sgt.nents = vmw_tt->sgt.orig_nents;
   367  }
   368  
   369  /**
   370   * vmw_ttm_map_for_dma - map TTM pages to get device addresses
   371   *
   372   * @vmw_tt: Pointer to a struct vmw_ttm_backend
   373   *
   374   * This function is used to get device addresses from the kernel DMA 
layer.
   375   * However, it's violating the DMA API in that when this operation has 
been
   376   * performed, it's illegal for the CPU to write to the pages without 
first
   377   * unmapping the DMA mappings, or calling dma_sync_sg_for_cpu(). It is
   378   * therefore only legal to call this function if we know that the 
function
   379   * dma_sync_sg_for_cpu() is a NOP, and dma_sync_sg_for_device() is at 
most
   380   * a CPU write buffer flush.
   381   */
   382  static int vmw_ttm_map_for_dma(struct vmw_ttm_tt *vmw_tt)
   383  {
   384  struct device *dev = vmw_tt->dev_priv->dev->dev;
   385  
 > 386  return dma_map_sgtable(de

Re: [PATCH v7 31/36] staging: tegra-vde: fix common struct sg_table related issues

2020-06-20 Thread kernel test robot
Hi Marek,

I love your patch! Yet something to improve:

[auto build test ERROR on next-20200618]
[also build test ERROR on v5.8-rc1]
[cannot apply to linuxtv-media/master staging/staging-testing 
drm-exynos/exynos-drm-next drm-intel/for-linux-next linus/master v5.8-rc1 v5.7 
v5.7-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use  as documented in
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Marek-Szyprowski/DRM-fix-struct-sg_table-nents-vs-orig_nents-misuse/20200619-184302
base:ce2cc8efd7a40cbd17841add878cb691d0ce0bba
config: c6x-allyesconfig (attached as .config)
compiler: c6x-elf-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
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
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=c6x 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

   drivers/staging/media/tegra-vde/iommu.c: In function 'tegra_vde_iommu_map':
>> drivers/staging/media/tegra-vde/iommu.c:39:9: error: implicit declaration of 
>> function 'iommu_map_sgtable'; did you mean 'dma_map_sgtable'? 
>> [-Werror=implicit-function-declaration]
  39 |  size = iommu_map_sgtable(vde->domain, addr, sgt,
 | ^
 | dma_map_sgtable
   cc1: some warnings being treated as errors

vim +39 drivers/staging/media/tegra-vde/iommu.c

18  
19  int tegra_vde_iommu_map(struct tegra_vde *vde,
20  struct sg_table *sgt,
21  struct iova **iovap,
22  size_t size)
23  {
24  struct iova *iova;
25  unsigned long shift;
26  unsigned long end;
27  dma_addr_t addr;
28  
29  end = vde->domain->geometry.aperture_end;
30  size = iova_align(&vde->iova, size);
31  shift = iova_shift(&vde->iova);
32  
33  iova = alloc_iova(&vde->iova, size >> shift, end >> shift, 
true);
34  if (!iova)
35  return -ENOMEM;
36  
37  addr = iova_dma_addr(&vde->iova, iova);
38  
  > 39  size = iommu_map_sgtable(vde->domain, addr, sgt,
40   IOMMU_READ | IOMMU_WRITE);
41  if (!size) {
42  __free_iova(&vde->iova, iova);
43  return -ENXIO;
44  }
45  
46  *iovap = iova;
47  
48  return 0;
49  }
50  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v7 33/36] rapidio: fix common struct sg_table related issues

2020-06-20 Thread kernel test robot
Hi Marek,

I love your patch! Perhaps something to improve:

[auto build test WARNING on next-20200618]
[also build test WARNING on v5.8-rc1]
[cannot apply to linuxtv-media/master staging/staging-testing 
drm-exynos/exynos-drm-next drm-intel/for-linux-next linus/master v5.8-rc1 v5.7 
v5.7-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use  as documented in
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Marek-Szyprowski/DRM-fix-struct-sg_table-nents-vs-orig_nents-misuse/20200619-184302
base:ce2cc8efd7a40cbd17841add878cb691d0ce0bba
config: x86_64-randconfig-r005-20200621 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 
ef455a55bcf2cfea04a99c361b182ad18b7f03f1)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>, old ones prefixed by <<):

>> drivers/rapidio/devices/rio_mport_cdev.c:939:40: warning: variable 'nents' 
>> is uninitialized when used here [-Wuninitialized]
ret = do_dma_request(req, xfer, sync, nents);
^
drivers/rapidio/devices/rio_mport_cdev.c:816:11: note: initialize the variable 
'nents' to silence this warning
int nents;
^
= 0
1 warning generated.

vim +/nents +939 drivers/rapidio/devices/rio_mport_cdev.c

e8de370188d098 Alexandre Bounine  2016-03-22  793  
e8de370188d098 Alexandre Bounine  2016-03-22  794  /*
e8de370188d098 Alexandre Bounine  2016-03-22  795   * rio_dma_transfer() - 
Perform RapidIO DMA data transfer to/from
e8de370188d098 Alexandre Bounine  2016-03-22  796   *  the 
remote RapidIO device
e8de370188d098 Alexandre Bounine  2016-03-22  797   * @filp: file pointer 
associated with the call
e8de370188d098 Alexandre Bounine  2016-03-22  798   * @transfer_mode: DMA 
transfer mode
e8de370188d098 Alexandre Bounine  2016-03-22  799   * @sync: synchronization 
mode
e8de370188d098 Alexandre Bounine  2016-03-22  800   * @dir: DMA transfer 
direction (DMA_MEM_TO_DEV = write OR
e8de370188d098 Alexandre Bounine  2016-03-22  801   *   
DMA_DEV_TO_MEM = read)
e8de370188d098 Alexandre Bounine  2016-03-22  802   * @xfer: data transfer 
descriptor structure
e8de370188d098 Alexandre Bounine  2016-03-22  803   */
e8de370188d098 Alexandre Bounine  2016-03-22  804  static int
4e1016dac1ccce Alexandre Bounine  2016-05-05  805  rio_dma_transfer(struct file 
*filp, u32 transfer_mode,
e8de370188d098 Alexandre Bounine  2016-03-22  806enum 
rio_transfer_sync sync, enum dma_data_direction dir,
e8de370188d098 Alexandre Bounine  2016-03-22  807struct 
rio_transfer_io *xfer)
e8de370188d098 Alexandre Bounine  2016-03-22  808  {
e8de370188d098 Alexandre Bounine  2016-03-22  809   struct mport_cdev_priv 
*priv = filp->private_data;
e8de370188d098 Alexandre Bounine  2016-03-22  810   unsigned long nr_pages 
= 0;
e8de370188d098 Alexandre Bounine  2016-03-22  811   struct page **page_list 
= NULL;
e8de370188d098 Alexandre Bounine  2016-03-22  812   struct mport_dma_req 
*req;
e8de370188d098 Alexandre Bounine  2016-03-22  813   struct mport_dev *md = 
priv->md;
e8de370188d098 Alexandre Bounine  2016-03-22  814   struct dma_chan *chan;
67446283d89467 John Hubbard   2020-06-04  815   int ret;
e8de370188d098 Alexandre Bounine  2016-03-22  816   int nents;
e8de370188d098 Alexandre Bounine  2016-03-22  817  
e8de370188d098 Alexandre Bounine  2016-03-22  818   if (xfer->length == 0)
e8de370188d098 Alexandre Bounine  2016-03-22  819   return -EINVAL;
e8de370188d098 Alexandre Bounine  2016-03-22  820   req = 
kzalloc(sizeof(*req), GFP_KERNEL);
e8de370188d098 Alexandre Bounine  2016-03-22  821   if (!req)
e8de370188d098 Alexandre Bounine  2016-03-22  822   return -ENOMEM;
e8de370188d098 Alexandre Bounine  2016-03-22  823  
e8de370188d098 Alexandre Bounine  2016-03-22  824   ret = 
get_dma_channel(priv);
e8de370188d098 Alexandre Bounine  2016-03-22  825   if (ret) {
e8de370188d098 Alexandre Bounine  2016-03-22  826   kfree(req);
e8de370188d098 Alexandre Bounine  2016-03-22  827   return ret;
e8de370188d098 Alexandre Bounine  2016-03-22  828   }
c5157b76869ba9 Ioan Nicu  2018-04-20  829   chan = priv->dmach;
c5157b76869ba9 Ioan Nicu  2018-04-20  830  
c5157b76869ba9 Ioan Nicu  2018-04-20  831   

Re: [PATCH v7 26/36] drm: host1x: fix common struct sg_table related issues

2020-06-21 Thread kernel test robot
Hi Marek,

I love your patch! Yet something to improve:

[auto build test ERROR on next-20200618]
[also build test ERROR on v5.8-rc1]
[cannot apply to linuxtv-media/master staging/staging-testing 
drm-exynos/exynos-drm-next drm-intel/for-linux-next linus/master v5.8-rc1 v5.7 
v5.7-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use  as documented in
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Marek-Szyprowski/DRM-fix-struct-sg_table-nents-vs-orig_nents-misuse/20200619-184302
base:ce2cc8efd7a40cbd17841add878cb691d0ce0bba
config: arm64-randconfig-r036-20200621 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 
ef455a55bcf2cfea04a99c361b182ad18b7f03f1)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

>> drivers/gpu/host1x/job.c:230:10: error: implicit declaration of function 
>> 'iommu_map_sgtable' [-Werror,-Wimplicit-function-declaration]
   err = iommu_map_sgtable(host->domain,
 ^
   drivers/gpu/host1x/job.c:230:10: note: did you mean 'dma_map_sgtable'?
   include/linux/dma-mapping.h:628:19: note: 'dma_map_sgtable' declared here
   static inline int dma_map_sgtable(struct device *dev, struct sg_table *sgt,
 ^
   1 error generated.

vim +/iommu_map_sgtable +230 drivers/gpu/host1x/job.c

   100  
   101  static unsigned int pin_job(struct host1x *host, struct host1x_job *job)
   102  {
   103  struct host1x_client *client = job->client;
   104  struct device *dev = client->dev;
   105  struct iommu_domain *domain;
   106  unsigned int i;
   107  int err;
   108  
   109  domain = iommu_get_domain_for_dev(dev);
   110  job->num_unpins = 0;
   111  
   112  for (i = 0; i < job->num_relocs; i++) {
   113  struct host1x_reloc *reloc = &job->relocs[i];
   114  dma_addr_t phys_addr, *phys;
   115  struct sg_table *sgt;
   116  
   117  reloc->target.bo = host1x_bo_get(reloc->target.bo);
   118  if (!reloc->target.bo) {
   119  err = -EINVAL;
   120  goto unpin;
   121  }
   122  
   123  /*
   124   * If the client device is not attached to an IOMMU, the
   125   * physical address of the buffer object can be used.
   126   *
   127   * Similarly, when an IOMMU domain is shared between all
   128   * host1x clients, the IOVA is already available, so no
   129   * need to map the buffer object again.
   130   *
   131   * XXX Note that this isn't always safe to do because it
   132   * relies on an assumption that no cache maintenance is
   133   * needed on the buffer objects.
   134   */
   135  if (!domain || client->group)
   136  phys = &phys_addr;
   137  else
   138  phys = NULL;
   139  
   140  sgt = host1x_bo_pin(dev, reloc->target.bo, phys);
   141  if (IS_ERR(sgt)) {
   142  err = PTR_ERR(sgt);
   143  goto unpin;
   144  }
   145  
   146  if (sgt) {
   147  unsigned long mask = HOST1X_RELOC_READ |
   148   HOST1X_RELOC_WRITE;
   149  enum dma_data_direction dir;
   150  
   151  switch (reloc->flags & mask) {
   152  case HOST1X_RELOC_READ:
   153  dir = DMA_TO_DEVICE;
   154  break;
   155  
   156  case HOST1X_RELOC_WRITE:
   157  dir = DMA_FROM_DEVICE;
   158  break;
   159  
   160  case HOST1X_RELOC_READ | HOST1X_RELOC_WRITE:
   161  dir = DMA_BIDIRECTIONAL;
   162  break;
   163 

Re: [PATCH 4/4] iommu/arm-smmu-v3: Remove cmpxchg() in arm_smmu_cmdq_issue_cmdlist()

2020-06-22 Thread kernel test robot
Hi John,

I love your patch! Perhaps something to improve:

[auto build test WARNING on iommu/next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use  as documented in
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/John-Garry/iommu-arm-smmu-v3-Improve-cmdq-lock-efficiency/20200623-013438
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: arm64-randconfig-c024-20200622 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>, old ones prefixed by <<):

In file included from include/linux/bits.h:23,
from include/linux/ioport.h:15,
from include/linux/acpi.h:12,
from drivers/iommu/arm-smmu-v3.c:12:
drivers/iommu/arm-smmu-v3.c: In function 'arm_smmu_cmdq_issue_cmdlist':
include/linux/bits.h:26:28: warning: comparison of unsigned expression < 0 is 
always false [-Wtype-limits]
26 |   __builtin_constant_p((l) > (h)), (l) > (h), 0)))
|^
include/linux/build_bug.h:16:62: note: in definition of macro 
'BUILD_BUG_ON_ZERO'
16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
|  ^
include/linux/bits.h:39:3: note: in expansion of macro 'GENMASK_INPUT_CHECK'
39 |  (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
|   ^~~
>> drivers/iommu/arm-smmu-v3.c:1404:18: note: in expansion of macro 'GENMASK'
1404 |  u32 prod_mask = GENMASK(cmdq->q.llq.max_n_shift, 0);
|  ^~~
include/linux/bits.h:26:40: warning: comparison of unsigned expression < 0 is 
always false [-Wtype-limits]
26 |   __builtin_constant_p((l) > (h)), (l) > (h), 0)))
|^
include/linux/build_bug.h:16:62: note: in definition of macro 
'BUILD_BUG_ON_ZERO'
16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
|  ^
include/linux/bits.h:39:3: note: in expansion of macro 'GENMASK_INPUT_CHECK'
39 |  (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
|   ^~~
>> drivers/iommu/arm-smmu-v3.c:1404:18: note: in expansion of macro 'GENMASK'
1404 |  u32 prod_mask = GENMASK(cmdq->q.llq.max_n_shift, 0);
|  ^~~

vim +/GENMASK +1404 drivers/iommu/arm-smmu-v3.c

  1369  
  1370  /*
  1371   * This is the actual insertion function, and provides the following
  1372   * ordering guarantees to callers:
  1373   *
  1374   * - There is a dma_wmb() before publishing any commands to the queue.
  1375   *   This can be relied upon to order prior writes to data structures
  1376   *   in memory (such as a CD or an STE) before the command.
  1377   *
  1378   * - On completion of a CMD_SYNC, there is a control dependency.
  1379   *   This can be relied upon to order subsequent writes to memory (e.g.
  1380   *   freeing an IOVA) after completion of the CMD_SYNC.
  1381   *
  1382   * - Command insertion is totally ordered, so if two CPUs each race to
  1383   *   insert their own list of commands then all of the commands from one
  1384   *   CPU will appear before any of the commands from the other CPU.
  1385   *
  1386   * - A CMD_SYNC is always inserted, which ensures we limit the prod 
pointer
  1387   *   for when the cmdq is full, such that we don't wrap more than twice.
  1388   *   It also makes it easy for the owner to know by how many to 
increment the
  1389   *   cmdq lock.
  1390   */
  1391  static int arm_smmu_cmdq_issue_cmdlist(struct arm_smmu_device *smmu,
  1392 u64 *cmds, int n)
  1393  {
  1394  u64 cmd_sync[CMDQ_ENT_DWORDS];
  1395  const int sync = 1;
  1396  u32 prod;
  1397  unsigned long flags;
  1398  bool owner;
  1399  struct arm_smmu_cmdq *cmdq = &smmu->cmdq;
  1400  struct arm_smmu_ll_queue llq = {
  1401  .max_n_shift = cmdq->q.llq.max_n_shift,
  1402  }, head = llq, space = llq;
  1403  u32 owner_val = 1 << cmdq->q.llq.owner_count_shift;
> 1404  u32 prod_mask = GENMASK(cmdq->q.llq.max_n_shift, 0);
  1405  u32 owner_mask = GENMASK(30, cmdq->q.llq.owner_count_shift);
  1406  int ret = 0;
  1407  
  1408  /* 1. Allocate some space in the queue */
  1409  local_irq_save(flags);
  1410  
  1411  prod = atomic_fetch_add(n + sync + owner_val,
  1412  &cmdq->q.llq.atomic.prod);
  1413  
  1414  owner = !(prod & owner_mask);
  1415  llq.prod = prod_mask & prod;
  1416  head.prod = queue_inc_prod_n(&ll

Re: [PATCH 5/7] iommu/vt-d: Fix devTLB flush for vSVA

2020-06-23 Thread kernel test robot
Hi Jacob,

Thank you for the patch! Perhaps something to improve:

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

url:
https://github.com/0day-ci/linux/commits/Jacob-Pan/iommu-vt-d-Misc-tweaks-and-fixes-for-vSVA/20200623-233905
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
# save the attached .config to linux build tree
make W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>):

   drivers/iommu/intel/iommu.c: In function 'intel_iommu_sva_invalidate':
>> drivers/iommu/intel/iommu.c:5420:7: warning: variable 'addr' set but not 
>> used [-Wunused-but-set-variable]
5420 |   u64 addr = 0;
 |   ^~~~

vim +/addr +5420 drivers/iommu/intel/iommu.c

  5370  
  5371  #ifdef CONFIG_INTEL_IOMMU_SVM
  5372  static int
  5373  intel_iommu_sva_invalidate(struct iommu_domain *domain, struct device 
*dev,
  5374 struct iommu_cache_invalidate_info *inv_info)
  5375  {
  5376  struct dmar_domain *dmar_domain = to_dmar_domain(domain);
  5377  struct device_domain_info *info;
  5378  struct intel_iommu *iommu;
  5379  unsigned long flags;
  5380  int cache_type;
  5381  u8 bus, devfn;
  5382  u16 did, sid;
  5383  int ret = 0;
  5384  u64 size = 0;
  5385  
  5386  if (!inv_info || !dmar_domain ||
  5387  inv_info->version != IOMMU_CACHE_INVALIDATE_INFO_VERSION_1)
  5388  return -EINVAL;
  5389  
  5390  if (!dev || !dev_is_pci(dev))
  5391  return -ENODEV;
  5392  
  5393  iommu = device_to_iommu(dev, &bus, &devfn);
  5394  if (!iommu)
  5395  return -ENODEV;
  5396  
  5397  if (!(dmar_domain->flags & DOMAIN_FLAG_NESTING_MODE))
  5398  return -EINVAL;
  5399  
  5400  spin_lock_irqsave(&device_domain_lock, flags);
  5401  spin_lock(&iommu->lock);
  5402  info = get_domain_info(dev);
  5403  if (!info) {
  5404  ret = -EINVAL;
  5405  goto out_unlock;
  5406  }
  5407  did = dmar_domain->iommu_did[iommu->seq_id];
  5408  sid = PCI_DEVID(bus, devfn);
  5409  
  5410  /* Size is only valid in address selective invalidation */
  5411  if (inv_info->granularity == IOMMU_INV_GRANU_ADDR)
  5412  size = to_vtd_size(inv_info->addr_info.granule_size,
  5413 inv_info->addr_info.nb_granules);
  5414  
  5415  for_each_set_bit(cache_type,
  5416   (unsigned long *)&inv_info->cache,
  5417   IOMMU_CACHE_INV_TYPE_NR) {
  5418  int granu = 0;
  5419  u64 pasid = 0;
> 5420  u64 addr = 0;
  5421  
  5422  granu = to_vtd_granularity(cache_type, 
inv_info->granularity);
  5423  if (granu == -EINVAL) {
  5424  pr_err_ratelimited("Invalid cache type and 
granu combination %d/%d\n",
  5425 cache_type, 
inv_info->granularity);
  5426  break;
  5427  }
  5428  
  5429  /*
  5430   * PASID is stored in different locations based on the
  5431   * granularity.
  5432   */
  5433  if (inv_info->granularity == IOMMU_INV_GRANU_PASID &&
  5434  (inv_info->pasid_info.flags & 
IOMMU_INV_PASID_FLAGS_PASID))
  5435  pasid = inv_info->pasid_info.pasid;
  5436  else if (inv_info->granularity == IOMMU_INV_GRANU_ADDR 
&&
  5437   (inv_info->addr_info.flags & 
IOMMU_INV_ADDR_FLAGS_PASID))
  5438  pasid = inv_info->addr_info.pasid;
  5439  
  5440  switch (BIT(cache_type)) {
  5441  case IOMMU_CACHE_INV_TYPE_IOTLB:
  5442  if (inv_info->granularity == 
IOMMU_INV_GRANU_ADDR &&
  5443  size &&
  5444  (inv_info->addr_info.addr & 
((BIT(VTD_PAGE_SHIFT + size)) - 1))) {
  5445  pr_err_ratelimited("Address out of 
range, 0

Re: [PATCH v2 1/2] dma-direct: provide the ability to reserve per-numa CMA

2020-06-28 Thread kernel test robot
Hi Barry,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.8-rc2 next-20200625]
[cannot apply to arm64/for-next/core hch-configfs/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  as documented in
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Barry-Song/make-dma_alloc_coherent-NUMA-aware-by-per-NUMA-CMA/20200625-154656
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
8be3a53e18e0e1a98f288f6c7f5e9da3adbe9c49
config: x86_64-randconfig-s022-20200624 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-dirty
# save the attached .config to linux build tree
make W=1 C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 


sparse warnings: (new ones prefixed by >>)

>> kernel/dma/contiguous.c:283:50: sparse: sparse: invalid access below 
>> 'dma_contiguous_pernuma_area' (-8 8)

# 
https://github.com/0day-ci/linux/commit/d6930169a3364418b985c2d19c31ecf1c4c3d4a9
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout d6930169a3364418b985c2d19c31ecf1c4c3d4a9
vim +/dma_contiguous_pernuma_area +283 kernel/dma/contiguous.c

de9e14eebf33a6 drivers/base/dma-contiguous.c Marek Szyprowski  2014-10-13  253  
b1d2dc009dece4 kernel/dma/contiguous.c   Nicolin Chen  2019-05-23  254  
/**
b1d2dc009dece4 kernel/dma/contiguous.c   Nicolin Chen  2019-05-23  255  
 * dma_alloc_contiguous() - allocate contiguous pages
b1d2dc009dece4 kernel/dma/contiguous.c   Nicolin Chen  2019-05-23  256  
 * @dev:   Pointer to device for which the allocation is performed.
b1d2dc009dece4 kernel/dma/contiguous.c   Nicolin Chen  2019-05-23  257  
 * @size:  Requested allocation size.
b1d2dc009dece4 kernel/dma/contiguous.c   Nicolin Chen  2019-05-23  258  
 * @gfp:   Allocation flags.
b1d2dc009dece4 kernel/dma/contiguous.c   Nicolin Chen  2019-05-23  259  
 *
b1d2dc009dece4 kernel/dma/contiguous.c   Nicolin Chen  2019-05-23  260  
 * This function allocates contiguous memory buffer for specified device. It
d6930169a33644 kernel/dma/contiguous.c   Barry Song2020-06-25  261  
 * tries to use device specific contiguous memory area if available, or it
d6930169a33644 kernel/dma/contiguous.c   Barry Song2020-06-25  262  
 * tries to use per-numa cma, if the allocation fails, it will fallback to
d6930169a33644 kernel/dma/contiguous.c   Barry Song2020-06-25  263  
 * try default global one.
bd2e75633c8012 kernel/dma/contiguous.c   Nicolin Chen  2019-05-23  264  
 *
d6930169a33644 kernel/dma/contiguous.c   Barry Song2020-06-25  265  
 * Note that it bypass one-page size of allocations from the per-numa and
d6930169a33644 kernel/dma/contiguous.c   Barry Song2020-06-25  266  
 * global area as the addresses within one page are always contiguous, so
d6930169a33644 kernel/dma/contiguous.c   Barry Song2020-06-25  267  
 * there is no need to waste CMA pages for that kind; it also helps reduce
d6930169a33644 kernel/dma/contiguous.c   Barry Song2020-06-25  268  
 * fragmentations.
b1d2dc009dece4 kernel/dma/contiguous.c   Nicolin Chen  2019-05-23  269  
 */
b1d2dc009dece4 kernel/dma/contiguous.c   Nicolin Chen  2019-05-23  270  
struct page *dma_alloc_contiguous(struct device *dev, size_t size, gfp_t gfp)
b1d2dc009dece4 kernel/dma/contiguous.c   Nicolin Chen  2019-05-23  271  
{
90ae409f9eb3bc kernel/dma/contiguous.c   Christoph Hellwig 2019-08-20  272  
size_t count = size >> PAGE_SHIFT;
b1d2dc009dece4 kernel/dma/contiguous.c   Nicolin Chen  2019-05-23  273  
struct page *page = NULL;
bd2e75633c8012 kernel/dma/contiguous.c   Nicolin Chen  2019-05-23  274  
struct cma *cma = NULL;
d6930169a33644 kernel/dma/contiguous.c   Barry Song2020-06-25  275  
int nid = dev ? dev_to_node(dev) : NUMA_NO_NODE;
d6930169a33644 kernel/dma/contiguous.c   Barry Song2020-06-25  276  
bool alloc_from_pernuma = false;
bd2e75633c8012 kernel/dma/contiguous.c   Nicolin Chen  2019-05-23  277  
bd2e75633c8012 kernel/dma/contiguous.c   Nicolin Chen  2019-05-23  278  
if (dev && dev->cma_area)
bd2e75633c8012 kernel/dma/contiguous.c   Nicolin Chen  2019-05-23  279  
cma = dev->cma_area;
d6930169a33644 kernel/dma/contiguous.c   Barry Song2020-06-25  280  
else if ((nid != NUMA_NO_NODE) && dma_contiguous_pernuma_area[nid]
d6930169a336

Re: [PATCH v3 4/4] PCI/ACS: Enable PCI_ACS_TB for untrusted/external-facing devices

2020-07-07 Thread kernel test robot
Hi Rajat,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on pci/next]
[also build test WARNING on iommu/next pm/linux-next v5.8-rc4 next-20200707]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use  as documented in
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Rajat-Jain/PCI-Move-pci_enable_acs-and-its-dependencies-up-in-pci-c/20200707-125604
base:   https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: arm-randconfig-r012-20200707 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 
02946de3802d3bc65bc9f2eb9b8d4969b5a7add8)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>):

>> drivers/pci/pci.c:883:3: warning: add explicit braces to avoid dangling else 
>> [-Wdangling-else]
   else
   ^
   1 warning generated.
--
>> drivers/pci/quirks.c:4987:3: warning: add explicit braces to avoid dangling 
>> else [-Wdangling-else]
   else
   ^
   1 warning generated.

vim +883 drivers/pci/pci.c

   849  
   850  /**
   851   * pci_std_enable_acs - enable ACS on devices using standard ACS 
capabilities
   852   * @dev: the PCI device
   853   */
   854  static void pci_std_enable_acs(struct pci_dev *dev)
   855  {
   856  int pos;
   857  u16 cap;
   858  u16 ctrl;
   859  
   860  pos = dev->acs_cap;
   861  if (!pos)
   862  return;
   863  
   864  pci_read_config_word(dev, pos + PCI_ACS_CAP, &cap);
   865  pci_read_config_word(dev, pos + PCI_ACS_CTRL, &ctrl);
   866  
   867  /* Source Validation */
   868  ctrl |= (cap & PCI_ACS_SV);
   869  
   870  /* P2P Request Redirect */
   871  ctrl |= (cap & PCI_ACS_RR);
   872  
   873  /* P2P Completion Redirect */
   874  ctrl |= (cap & PCI_ACS_CR);
   875  
   876  /* Upstream Forwarding */
   877  ctrl |= (cap & PCI_ACS_UF);
   878  
   879  /* Enable Translation Blocking for external devices */
   880  if (dev->external_facing || dev->untrusted)
   881  if (cap & PCI_ACS_TB)
   882  ctrl |= PCI_ACS_TB;
 > 883  else
   884  pci_warn(dev, "ACS: No Trans Blocking on ext 
dev\n");
   885  
   886  pci_write_config_word(dev, pos + PCI_ACS_CTRL, ctrl);
   887  }
   888  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v4 4/7] iommu/vt-d: Handle non-page aligned address

2020-07-07 Thread kernel test robot
Hi Jacob,

Thank you for the patch! Perhaps something to improve:

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

url:
https://github.com/0day-ci/linux/commits/Jacob-Pan/iommu-vt-d-Misc-tweaks-and-fixes-for-vSVA/20200707-081026
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: x86_64-randconfig-m031-20200707 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>):

   In file included from include/linux/string.h:6,
from include/linux/uuid.h:12,
from include/linux/mod_devicetable.h:13,
from include/linux/pci.h:27,
from drivers/iommu/intel/dmar.c:19:
   drivers/iommu/intel/dmar.c: In function 'qi_flush_dev_iotlb_pasid':
   include/linux/bits.h:26:28: warning: comparison of unsigned expression < 0 
is always false [-Wtype-limits]
  26 |   __builtin_constant_p((l) > (h)), (l) > (h), 0)))
 |^
   include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
  58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : 
__trace_if_value(cond))
 |^~~~
>> drivers/iommu/intel/dmar.c:1459:2: note: in expansion of macro 'if'
1459 |  if (addr & GENMASK_ULL(size_order + VTD_PAGE_SHIFT, 0))
 |  ^~
   include/linux/bits.h:25:3: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
  25 |  (BUILD_BUG_ON_ZERO(__builtin_choose_expr( \
 |   ^
   include/linux/bits.h:45:3: note: in expansion of macro 'GENMASK_INPUT_CHECK'
  45 |  (GENMASK_INPUT_CHECK(h, l) + __GENMASK_ULL(h, l))
 |   ^~~
   drivers/iommu/intel/dmar.c:1459:13: note: in expansion of macro 'GENMASK_ULL'
1459 |  if (addr & GENMASK_ULL(size_order + VTD_PAGE_SHIFT, 0))
 | ^~~
   include/linux/bits.h:26:40: warning: comparison of unsigned expression < 0 
is always false [-Wtype-limits]
  26 |   __builtin_constant_p((l) > (h)), (l) > (h), 0)))
 |^
   include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
  58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : 
__trace_if_value(cond))
 |^~~~
>> drivers/iommu/intel/dmar.c:1459:2: note: in expansion of macro 'if'
1459 |  if (addr & GENMASK_ULL(size_order + VTD_PAGE_SHIFT, 0))
 |  ^~
   include/linux/bits.h:25:3: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
  25 |  (BUILD_BUG_ON_ZERO(__builtin_choose_expr( \
 |   ^
   include/linux/bits.h:45:3: note: in expansion of macro 'GENMASK_INPUT_CHECK'
  45 |  (GENMASK_INPUT_CHECK(h, l) + __GENMASK_ULL(h, l))
 |   ^~~
   drivers/iommu/intel/dmar.c:1459:13: note: in expansion of macro 'GENMASK_ULL'
1459 |  if (addr & GENMASK_ULL(size_order + VTD_PAGE_SHIFT, 0))
 | ^~~
   include/linux/bits.h:26:28: warning: comparison of unsigned expression < 0 
is always false [-Wtype-limits]
  26 |   __builtin_constant_p((l) > (h)), (l) > (h), 0)))
 |^
   include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
  58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : 
__trace_if_value(cond))
 | ^~~~
>> drivers/iommu/intel/dmar.c:1459:2: note: in expansion of macro 'if'
1459 |  if (addr & GENMASK_ULL(size_order + VTD_PAGE_SHIFT, 0))
 |  ^~
   include/linux/bits.h:25:3: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
  25 |  (BUILD_BUG_ON_ZERO(__builtin_choose_expr( \
 |   ^
   include/linux/bits.h:45:3: note: in expansion of macro 'GENMASK_INPUT_CHECK'
  45 |  (GENMASK_INPUT_CHECK(h, l) + __GENMASK_ULL(h, l))
 |   ^~~
   drivers/iommu/intel/dmar.c:1459:13: note: in expansion of macro 'GENMASK_ULL'
1459 |  if (addr & GENMASK_ULL(size_order + VTD_PAGE_SHIFT, 0))
 | ^~~
   include/linux/bits.h:26:40: warning: comparison of unsigned expression < 0 
is always false [-Wtype-limits]
  26 |   __builtin_constant_p((l) > (h)), (l) > 

[RFC PATCH] iommu/arm-smmu: arm_smmu_setup_identity() can be static

2020-07-13 Thread kernel test robot


Signed-off-by: kernel test robot 
---
 arm-smmu.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index 2e27cf9815ab6..fb85e716ae9ac 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -1924,7 +1924,7 @@ static int arm_smmu_device_cfg_probe(struct 
arm_smmu_device *smmu)
return 0;
 }
 
-int arm_smmu_setup_identity(struct arm_smmu_device *smmu)
+static int arm_smmu_setup_identity(struct arm_smmu_device *smmu)
 {
int i;
 
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: [PATCH 1/5] iommu/arm-smmu: Make all valid stream mappings BYPASS

2020-07-13 Thread kernel test robot
Hi Bjorn,

I love your patch! Perhaps something to improve:

[auto build test WARNING on iommu/next]
[also build test WARNING on arm-perf/for-next/perf v5.8-rc5 next-20200713]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use  as documented in
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Bjorn-Andersson/iommu-arm-smmu-Support-maintaining-bootloader-mappings/20200709-130417
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: x86_64-randconfig-s021-20200713 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-37-gc9676a3b-dirty
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 


sparse warnings: (new ones prefixed by >>)

>> drivers/iommu/arm-smmu.c:1927:5: sparse: sparse: symbol 
>> 'arm_smmu_setup_identity' was not declared. Should it be static?

Please review and possibly fold the followup patch.

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

[iommu:core 18/19] drivers/iommu/exynos-iommu.c:724:20: error: conflicting types for 'update_pte'

2020-07-13 Thread kernel test robot
Hi Robin,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git core
head:   97215a7df4351fdd9141418568be872fb1032d6e
commit: b4ceb4a5359ed1c9ba4a20acf3a70d4bbead3248 [18/19] iommu: Tidy up Kconfig 
for SoC IOMMUs
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout b4ceb4a5359ed1c9ba4a20acf3a70d4bbead3248
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross 
ARCH=xtensa 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

   In file included from include/linux/err.h:5,
from include/linux/clk.h:12,
from drivers/iommu/exynos-iommu.c:11:
   include/linux/scatterlist.h: In function 'sg_set_buf':
   arch/xtensa/include/asm/page.h:193:9: warning: comparison of unsigned 
expression >= 0 is always true [-Wtype-limits]
 193 |  ((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr)
 | ^~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
  78 | # define unlikely(x) __builtin_expect(!!(x), 0)
 |  ^
   include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
 143 |  BUG_ON(!virt_addr_valid(buf));
 |  ^~
   arch/xtensa/include/asm/page.h:201:32: note: in expansion of macro 
'pfn_valid'
 201 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
 |^
   include/linux/scatterlist.h:143:10: note: in expansion of macro 
'virt_addr_valid'
 143 |  BUG_ON(!virt_addr_valid(buf));
 |  ^~~
   In file included from ./arch/xtensa/include/generated/asm/bug.h:1,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from arch/xtensa/include/asm/current.h:18,
from include/linux/mutex.h:14,
from include/linux/notifier.h:14,
from include/linux/clk.h:14,
from drivers/iommu/exynos-iommu.c:11:
   include/linux/dma-mapping.h: In function 'dma_map_resource':
   arch/xtensa/include/asm/page.h:193:9: warning: comparison of unsigned 
expression >= 0 is always true [-Wtype-limits]
 193 |  ((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr)
 | ^~
   include/asm-generic/bug.h:144:27: note: in definition of macro 'WARN_ON_ONCE'
 144 |  int __ret_warn_once = !!(condition);   \
 |   ^
   include/linux/dma-mapping.h:352:19: note: in expansion of macro 'pfn_valid'
 352 |  if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr
 |   ^
   drivers/iommu/exynos-iommu.c: At top level:
>> drivers/iommu/exynos-iommu.c:724:20: error: conflicting types for 
>> 'update_pte'
 724 | static inline void update_pte(sysmmu_pte_t *ent, sysmmu_pte_t val)
 |^~
   In file included from include/linux/pgtable.h:6,
from include/linux/mm.h:32,
from include/linux/scatterlist.h:8,
from include/linux/dma-mapping.h:11,
from drivers/iommu/exynos-iommu.c:12:
   arch/xtensa/include/asm/pgtable.h:306:20: note: previous definition of 
'update_pte' was here
 306 | static inline void update_pte(pte_t *ptep, pte_t pteval)
 |^~

vim +/update_pte +724 drivers/iommu/exynos-iommu.c

2a96536e77b43c KyongHo Cho  2012-05-12  723  
5e3435eb7e1d8c Marek Szyprowski 2016-02-18 @724  static inline void 
update_pte(sysmmu_pte_t *ent, sysmmu_pte_t val)
2a96536e77b43c KyongHo Cho  2012-05-12  725  {
5e3435eb7e1d8c Marek Szyprowski 2016-02-18  726 
dma_sync_single_for_cpu(dma_dev, virt_to_phys(ent), sizeof(*ent),
5e3435eb7e1d8c Marek Szyprowski 2016-02-18  727 
DMA_TO_DEVICE);
6ae5343c26f9cb Ben Dooks2016-06-08  728 *ent = cpu_to_le32(val);
5e3435eb7e1d8c Marek Szyprowski 2016-02-18  729 
dma_sync_single_for_device(dma_dev, virt_to_phys(ent), sizeof(*ent),
5e3435eb7e1d8c Marek Szyprowski 2016-02-18  730 
   DMA_TO_DEVICE);
2a96536e77b43c KyongHo Cho  2012-05-12  731  }
2a96536e77b43c KyongHo Cho  2012-05-12  732  

:: The code at line 724 was first introduced by commit
:: 5e3435eb7e1d8c9431254f5e0053

Re: [PATCH 1/5] iommu/arm-smmu: Make all valid stream mappings BYPASS

2020-07-15 Thread kernel test robot
Hi Bjorn,

I love your patch! Perhaps something to improve:

[auto build test WARNING on iommu/next]
[also build test WARNING on arm-perf/for-next/perf v5.8-rc5 next-20200715]
[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/Bjorn-Andersson/iommu-arm-smmu-Support-maintaining-bootloader-mappings/20200709-130417
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: arm64-randconfig-r022-20200715 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 
02946de3802d3bc65bc9f2eb9b8d4969b5a7add8)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>):

>> drivers/iommu/arm-smmu.c:1927:5: warning: no previous prototype for function 
>> 'arm_smmu_setup_identity' [-Wmissing-prototypes]
   int arm_smmu_setup_identity(struct arm_smmu_device *smmu)
   ^
   drivers/iommu/arm-smmu.c:1927:1: note: declare 'static' if the function is 
not intended to be used outside of this translation unit
   int arm_smmu_setup_identity(struct arm_smmu_device *smmu)
   ^
   static 
   1 warning generated.

vim +/arm_smmu_setup_identity +1927 drivers/iommu/arm-smmu.c

  1926  
> 1927  int arm_smmu_setup_identity(struct arm_smmu_device *smmu)
  1928  {
  1929  int i;
  1930  
  1931  for (i = 0; i < smmu->num_mapping_groups; i++) {
  1932  if (smmu->smrs[i].valid) {
  1933  smmu->s2crs[i].type = S2CR_TYPE_BYPASS;
  1934  smmu->s2crs[i].privcfg = S2CR_PRIVCFG_DEFAULT;
  1935  smmu->s2crs[i].cbndx = 0xff;
  1936  smmu->s2crs[i].count++;
  1937  }
  1938  }
  1939  
  1940  return 0;
  1941  }
  1942  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH] PCI/ATS: PASID and PRI are only enumerated in PF devices.

2020-07-20 Thread kernel test robot
Hi Ashok,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on pci/next]
[also build test ERROR on iommu/next linux/master linus/master v5.8-rc6 
next-20200720]
[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/Ashok-Raj/PCI-ATS-PASID-and-PRI-are-only-enumerated-in-PF-devices/20200721-004510
base:   https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: x86_64-kexec (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 

All errors (new ones prefixed by >>):

   drivers/iommu/intel/iommu.c: In function 'dmar_insert_one_dev_info':
>> drivers/iommu/intel/iommu.c:2557:8: error: implicit declaration of function 
>> 'pci_pri_supported'; did you mean 'pci_ats_supported'? 
>> [-Werror=implicit-function-declaration]
2557 |pci_pri_supported(pdev))
 |^
 |pci_ats_supported
   cc1: some warnings being treated as errors

vim +2557 drivers/iommu/intel/iommu.c

  2504  
  2505  static struct dmar_domain *dmar_insert_one_dev_info(struct intel_iommu 
*iommu,
  2506  int bus, int devfn,
  2507  struct device *dev,
  2508  struct dmar_domain 
*domain)
  2509  {
  2510  struct dmar_domain *found = NULL;
  2511  struct device_domain_info *info;
  2512  unsigned long flags;
  2513  int ret;
  2514  
  2515  info = alloc_devinfo_mem();
  2516  if (!info)
  2517  return NULL;
  2518  
  2519  if (!dev_is_real_dma_subdevice(dev)) {
  2520  info->bus = bus;
  2521  info->devfn = devfn;
  2522  info->segment = iommu->segment;
  2523  } else {
  2524  struct pci_dev *pdev = to_pci_dev(dev);
  2525  
  2526  info->bus = pdev->bus->number;
  2527  info->devfn = pdev->devfn;
  2528  info->segment = pci_domain_nr(pdev->bus);
  2529  }
  2530  
  2531  info->ats_supported = info->pasid_supported = 
info->pri_supported = 0;
  2532  info->ats_enabled = info->pasid_enabled = info->pri_enabled = 0;
  2533  info->ats_qdep = 0;
  2534  info->dev = dev;
  2535  info->domain = domain;
  2536  info->iommu = iommu;
  2537  info->pasid_table = NULL;
  2538  info->auxd_enabled = 0;
  2539  INIT_LIST_HEAD(&info->auxiliary_domains);
  2540  
  2541  if (dev && dev_is_pci(dev)) {
  2542  struct pci_dev *pdev = to_pci_dev(info->dev);
  2543  
  2544  if (ecap_dev_iotlb_support(iommu->ecap) &&
  2545  pci_ats_supported(pdev) &&
  2546  dmar_find_matched_atsr_unit(pdev))
  2547  info->ats_supported = 1;
  2548  
  2549  if (sm_supported(iommu)) {
  2550  if (pasid_supported(iommu)) {
  2551  int features = pci_pasid_features(pdev);
  2552  if (features >= 0)
  2553  info->pasid_supported = 
features | 1;
  2554  }
  2555  
  2556  if (info->ats_supported && 
ecap_prs(iommu->ecap) &&
> 2557  pci_pri_supported(pdev))
  2558  info->pri_supported = 1;
  2559  }
  2560  }
  2561  
  2562  spin_lock_irqsave(&device_domain_lock, flags);
  2563  if (dev)
  2564  found = find_domain(dev);
  2565  
  2566  if (!found) {
  2567  struct device_domain_info *info2;
  2568  info2 = dmar_search_domain_by_dev_info(info->segment, 
info->bus,
  2569 info->devfn);
  2570  if (info2) {
  2571  found  = info2->domain;
  2572  info2->dev = dev;
  2573  }
  2574  }
  2575  
  2576  if (found) {
  2577  spin_unlock_irqrestore(&device_domain_lock, flags);
  2578  free_devinfo_mem(info);
  2579 

Re: [PATCH] PCI/ATS: PASID and PRI are only enumerated in PF devices.

2020-07-20 Thread kernel test robot
Hi Ashok,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on pci/next]
[also build test ERROR on iommu/next linux/master linus/master v5.8-rc6 
next-20200720]
[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/Ashok-Raj/PCI-ATS-PASID-and-PRI-are-only-enumerated-in-PF-devices/20200721-004510
base:   https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: arm64-defconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
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
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross 
ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All error/warnings (new ones prefixed by >>):

>> drivers/pci/ats.c:471:6: warning: no previous prototype for 
>> 'pci_pri_supported' [-Wmissing-prototypes]
 471 | bool pci_pri_supported(struct pci_dev *pdev)
 |  ^
   drivers/pci/ats.c: In function 'pci_pri_supported':
>> drivers/pci/ats.c:474:30: error: 'struct pci_dev' has no member named 
>> 'pri_cap'; did you mean 'pcie_cap'?
 474 |  return !!(pci_physfn(pdev)->pri_cap);
 |  ^~~
 |  pcie_cap
>> drivers/pci/ats.c:475:1: warning: control reaches end of non-void function 
>> [-Wreturn-type]
 475 | }
 | ^

vim +474 drivers/pci/ats.c

   463  
   464  /**
   465   * pci_pri_supported - Check if PRI is supported.
   466   * @pdev: PCI device structure
   467   *
   468   * Returns false when no PRI capability is present.
   469   * Returns true if PRI feature is supported and enabled
   470   */
 > 471  bool pci_pri_supported(struct pci_dev *pdev)
   472  {
   473  /* VFs share the PF PRI configuration */
 > 474  return !!(pci_physfn(pdev)->pri_cap);
 > 475  }
   476  EXPORT_SYMBOL_GPL(pci_pri_supported);
   477  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH] iommu/vt-d:Add support for ACPI device in RMRR

2020-07-31 Thread kernel test robot
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 

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,
   690dmaru->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-...@lists.01.org


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v3 2/2] dma-pool: Only allocate from CMA when in same memory zone

2020-08-06 Thread kernel test robot
Hi Nicolas,

I love your patch! Perhaps something to improve:

[auto build test WARNING on iommu/next]
[also build test WARNING on linus/master v5.8]
[cannot apply to next-20200806]
[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/Nicolas-Saenz-Julienne/dma-pool-fixes/20200807-025101
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: x86_64-randconfig-s031-20200806 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-117-g8c7aee71-dirty
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>, old ones prefixed by <<):

>> WARNING: modpost: vmlinux.o(.text+0x2840fa): Section mismatch in reference 
>> from the function atomic_pool_expand() to the function 
>> .meminit.text:memblock_start_of_DRAM()
The function atomic_pool_expand() references
the function __meminit memblock_start_of_DRAM().
This is often because atomic_pool_expand lacks a __meminit
annotation or the annotation of memblock_start_of_DRAM is wrong.

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH 1/2] Add new flush_iotlb_range and handle freelists when using iommu_unmap_fast

2020-08-17 Thread kernel test robot
Hi Tom,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on tegra/for-next]
[also build test ERROR on vfio/next v5.9-rc1 next-20200817]
[cannot apply to iommu/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
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Tom-Murphy/Add-new-flush_iotlb_range-and-handle-freelists-when-using-iommu_unmap_fast/20200818-052129
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git for-next
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
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
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

>> drivers/iommu/mtk_iommu_v1.c:526:12: error: initialization of 'size_t 
>> (*)(struct iommu_domain *, long unsigned int,  size_t,  struct 
>> iommu_iotlb_gather *, struct page **)' {aka 'unsigned int (*)(struct 
>> iommu_domain *, long unsigned int,  unsigned int,  struct iommu_iotlb_gather 
>> *, struct page **)'} from incompatible pointer type 'size_t (*)(struct 
>> iommu_domain *, long unsigned int,  size_t,  struct iommu_iotlb_gather *)' 
>> {aka 'unsigned int (*)(struct iommu_domain *, long unsigned int,  unsigned 
>> int,  struct iommu_iotlb_gather *)'} [-Werror=incompatible-pointer-types]
 526 |  .unmap  = mtk_iommu_unmap,
 |^~~
   drivers/iommu/mtk_iommu_v1.c:526:12: note: (near initialization for 
'mtk_iommu_ops.unmap')
   cc1: some warnings being treated as errors

# 
https://github.com/0day-ci/linux/commit/d64ecd192f5239ba9fbf8124e7b3069cb4145c47
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Tom-Murphy/Add-new-flush_iotlb_range-and-handle-freelists-when-using-iommu_unmap_fast/20200818-052129
git checkout d64ecd192f5239ba9fbf8124e7b3069cb4145c47
vim +526 drivers/iommu/mtk_iommu_v1.c

b17336c55d8928 Honghui Zhang 2016-06-08  519  
b65f501627fffc Arvind Yadav  2018-10-18  520  static const struct iommu_ops 
mtk_iommu_ops = {
b17336c55d8928 Honghui Zhang 2016-06-08  521.domain_alloc   = 
mtk_iommu_domain_alloc,
b17336c55d8928 Honghui Zhang 2016-06-08  522.domain_free= 
mtk_iommu_domain_free,
b17336c55d8928 Honghui Zhang 2016-06-08  523.attach_dev = 
mtk_iommu_attach_device,
b17336c55d8928 Honghui Zhang 2016-06-08  524.detach_dev = 
mtk_iommu_detach_device,
b17336c55d8928 Honghui Zhang 2016-06-08  525.map= mtk_iommu_map,
b17336c55d8928 Honghui Zhang 2016-06-08 @526.unmap  = 
mtk_iommu_unmap,
b17336c55d8928 Honghui Zhang 2016-06-08  527.iova_to_phys   = 
mtk_iommu_iova_to_phys,
57dbf81f50c82a Joerg Roedel  2020-04-29  528.probe_device   = 
mtk_iommu_probe_device,
57dbf81f50c82a Joerg Roedel  2020-04-29  529.probe_finalize = 
mtk_iommu_probe_finalize,
57dbf81f50c82a Joerg Roedel  2020-04-29  530.release_device = 
mtk_iommu_release_device,
8bbe13f52cb796 Yong Wu   2020-05-15  531.def_domain_type = 
mtk_iommu_def_domain_type,
57dbf81f50c82a Joerg Roedel  2020-04-29  532.device_group   = 
generic_device_group,
b17336c55d8928 Honghui Zhang 2016-06-08  533.pgsize_bitmap  = ~0UL << 
MT2701_IOMMU_PAGE_SHIFT,
b17336c55d8928 Honghui Zhang 2016-06-08  534  };
b17336c55d8928 Honghui Zhang 2016-06-08  535  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v2 5/9] iommu/ioasid: Introduce ioasid_set private ID

2020-08-22 Thread kernel test robot
Hi Jacob,

I love your patch! Yet something to improve:

[auto build test ERROR on iommu/next]
[also build test ERROR on linux/master linus/master v5.9-rc1 next-20200821]
[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/Jacob-Pan/IOASID-extensions-for-guest-SVA/20200822-123111
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: ia64-randconfig-r003-20200822 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
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
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross 
ARCH=ia64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

   In file included from include/linux/iommu.h:16,
from include/linux/of_iommu.h:6,
from drivers/of/device.c:7:
>> include/linux/ioasid.h:141:6: error: expected ';' before 'inline'
 141 | staic inline int ioasid_attach_spid(ioasid_t ioasid, ioasid_t spid)
 |  ^
 |  ;
--
   In file included from include/linux/iommu.h:16,
from drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:34:
>> include/linux/ioasid.h:141:6: error: expected ';' before 'inline'
 141 | staic inline int ioasid_attach_spid(ioasid_t ioasid, ioasid_t spid)
 |  ^
 |  ;
   drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1094:5: warning: no previous 
prototype for 'amdgpu_ttm_gart_bind' [-Wmissing-prototypes]
1094 | int amdgpu_ttm_gart_bind(struct amdgpu_device *adev,
 | ^~~~
   In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:55:
   drivers/gpu/drm/amd/amdgpu/amdgpu.h:190:18: warning: 'sched_policy' defined 
but not used [-Wunused-const-variable=]
 190 | static const int sched_policy = KFD_SCHED_POLICY_HWS;
 |  ^~~~
   In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:33,
from 
drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
from 
drivers/gpu/drm/amd/amdgpu/../include/dm_pp_interface.h:26,
from drivers/gpu/drm/amd/amdgpu/amdgpu.h:65,
from drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:55:
   drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:76:32: warning: 
'dc_fixpt_ln2_div_2' defined but not used [-Wunused-const-variable=]
  76 | static const struct fixed31_32 dc_fixpt_ln2_div_2 = { 1488522236LL };
 |^~
   drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:75:32: warning: 
'dc_fixpt_ln2' defined but not used [-Wunused-const-variable=]
  75 | static const struct fixed31_32 dc_fixpt_ln2 = { 2977044471LL };
 |^~~~
   drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:74:32: warning: 
'dc_fixpt_e' defined but not used [-Wunused-const-variable=]
  74 | static const struct fixed31_32 dc_fixpt_e = { 11674931555LL };
 |^~
   drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:73:32: warning: 
'dc_fixpt_two_pi' defined but not used [-Wunused-const-variable=]
  73 | static const struct fixed31_32 dc_fixpt_two_pi = { 26986075409LL };
 |^~~
   drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:72:32: warning: 
'dc_fixpt_pi' defined but not used [-Wunused-const-variable=]
  72 | static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL };
 |^~~
   drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:67:32: warning: 
'dc_fixpt_zero' defined but not used [-Wunused-const-variable=]
  67 | static const struct fixed31_32 dc_fixpt_zero = { 0 };
 |^
--
   In file included from include/linux/iommu.h:16,
from drivers/gpu/drm/nouveau/include/nvif/os.h:30,
from drivers/gpu/drm/nouveau/include/nvkm/core/os.h:4,
from drivers/gpu/drm/nouveau/include/nvkm/core/oclass.h:3,
from drivers/gpu/drm/nouveau/include/nvkm/core/device.h:4,
from drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h:4,
from drivers/gpu/drm/nouveau/nvkm/nvfw/acr.c:22:
>> include/linux/ioasid.h:141:6: error: 

Re: [PATCH v2 5/9] iommu/ioasid: Introduce ioasid_set private ID

2020-08-22 Thread kernel test robot
Hi Jacob,

I love your patch! Yet something to improve:

[auto build test ERROR on iommu/next]
[also build test ERROR on linux/master linus/master v5.9-rc1 next-20200821]
[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/Jacob-Pan/IOASID-extensions-for-guest-SVA/20200822-123111
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: mips-randconfig-r015-20200822 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 
b587ca93be114d07ec3bf654add97d7872325281)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

   In file included from drivers/of/device.c:7:
   In file included from include/linux/of_iommu.h:6:
   In file included from include/linux/iommu.h:16:
>> include/linux/ioasid.h:141:1: error: unknown type name 'staic'; did you mean 
>> 'static'?
   staic inline int ioasid_attach_spid(ioasid_t ioasid, ioasid_t spid)
   ^
   static
   In file included from drivers/of/device.c:8:
   include/linux/dma-mapping.h:824:9: warning: implicit conversion from 
'unsigned long long' to 'unsigned long' changes value from 18446744073709551615 
to 4294967295 [-Wconstant-conversion]
   return DMA_BIT_MASK(32);
   ~~ ^~~~
   include/linux/dma-mapping.h:139:40: note: expanded from macro 'DMA_BIT_MASK'
   #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
  ^
   1 warning and 1 error generated.
--
   In file included from drivers/of/platform.c:20:
   In file included from include/linux/of_iommu.h:6:
   In file included from include/linux/iommu.h:16:
>> include/linux/ioasid.h:141:1: error: unknown type name 'staic'; did you mean 
>> 'static'?
   staic inline int ioasid_attach_spid(ioasid_t ioasid, ioasid_t spid)
   ^
   static
   1 error generated.

# 
https://github.com/0day-ci/linux/commit/09f31e901946399a274ce954bdefa4108e895b33
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Jacob-Pan/IOASID-extensions-for-guest-SVA/20200822-123111
git checkout 09f31e901946399a274ce954bdefa4108e895b33
vim +141 include/linux/ioasid.h

   140  
 > 141  staic inline int ioasid_attach_spid(ioasid_t ioasid, ioasid_t spid)
   142  {
   143  return -ENOTSUPP;
   144  }
   145  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v2 3/9] iommu/ioasid: Introduce ioasid_set APIs

2020-08-22 Thread kernel test robot
Hi Jacob,

I love your patch! Perhaps something to improve:

[auto build test WARNING on iommu/next]
[also build test WARNING on linux/master linus/master v5.9-rc1 next-20200821]
[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/Jacob-Pan/IOASID-extensions-for-guest-SVA/20200822-123111
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 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 

All warnings (new ones prefixed by >>):

   drivers/iommu/ioasid.c: In function 'ioasid_get_capacity':
>> drivers/iommu/ioasid.c:50:10: warning: old-style function definition 
>> [-Wold-style-definition]
  50 | ioasid_t ioasid_get_capacity()
 |  ^~~
   drivers/iommu/ioasid.c: At top level:
>> drivers/iommu/ioasid.c:577:6: warning: no previous prototype for 
>> 'ioasid_set_get' [-Wmissing-prototypes]
 577 | void ioasid_set_get(struct ioasid_set *set)
 |  ^~

# 
https://github.com/0day-ci/linux/commit/59b6f319b27588b2a8a0268a4f4f09f7be458861
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Jacob-Pan/IOASID-extensions-for-guest-SVA/20200822-123111
git checkout 59b6f319b27588b2a8a0268a4f4f09f7be458861
vim +50 drivers/iommu/ioasid.c

49  
  > 50  ioasid_t ioasid_get_capacity()
51  {
52  return ioasid_capacity;
53  }
54  EXPORT_SYMBOL_GPL(ioasid_get_capacity);
55  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v9 12/32] drm: msm: fix common struct sg_table related issues

2020-08-26 Thread kernel test robot
Hi Marek,

I love your patch! Yet something to improve:

[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on drm-intel/for-linux-next linus/master v5.9-rc2 
next-20200826]
[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/Marek-Szyprowski/DRM-fix-struct-sg_table-nents-vs-orig_nents-misuse/20200826-143908
base:   git://linuxtv.org/media_tree.git master
config: arm64-randconfig-r002-20200826 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 
7cfcecece0e0430937cf529ce74d3a071a4dedc6)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

   aarch64-linux-gnu-ld: warning: -z norelro ignored
   aarch64-linux-gnu-ld: fs/orangefs/orangefs-debugfs.o: in function 
`orangefs_debug_read':
   fs/orangefs/orangefs-debugfs.c:375: undefined reference to `stpcpy'
   aarch64-linux-gnu-ld: security/apparmor/lsm.o: in function `param_get_mode':
   security/apparmor/lsm.c:1559: undefined reference to `stpcpy'
   aarch64-linux-gnu-ld: security/apparmor/lsm.o: in function `param_get_audit':
   security/apparmor/lsm.c:1530: undefined reference to `stpcpy'
   aarch64-linux-gnu-ld: crypto/async_tx/async_tx.o: in function 
`async_tx_channel_switch':
   crypto/async_tx/async_tx.c:118: undefined reference to 
`dma_wait_for_async_tx'
   aarch64-linux-gnu-ld: crypto/async_tx/async_tx.o: in function 
`async_tx_quiesce':
   crypto/async_tx/async_tx.c:270: undefined reference to 
`dma_wait_for_async_tx'
   aarch64-linux-gnu-ld: crypto/async_tx/async_tx.c:270: undefined reference to 
`dma_wait_for_async_tx'
   aarch64-linux-gnu-ld: crypto/async_tx/async_memcpy.o: in function 
`async_memcpy':
   crypto/async_tx/async_memcpy.c:43: undefined reference to 
`dmaengine_get_unmap_data'
   aarch64-linux-gnu-ld: crypto/async_tx/async_memcpy.c:89: undefined reference 
to `dmaengine_unmap_put'
   aarch64-linux-gnu-ld: crypto/async_tx/async_xor.o: in function `async_xor':
   crypto/async_tx/async_xor.c:172: undefined reference to 
`dmaengine_get_unmap_data'
   aarch64-linux-gnu-ld: crypto/async_tx/async_xor.c:199: undefined reference 
to `dmaengine_unmap_put'
   aarch64-linux-gnu-ld: crypto/async_tx/async_xor.c:199: undefined reference 
to `dmaengine_unmap_put'
   aarch64-linux-gnu-ld: crypto/async_tx/async_xor.c:196: undefined reference 
to `dmaengine_unmap_put'
   aarch64-linux-gnu-ld: crypto/async_tx/async_xor.o: in function 
`async_xor_val':
   crypto/async_tx/async_xor.c:268: undefined reference to 
`dmaengine_get_unmap_data'
   aarch64-linux-gnu-ld: crypto/async_tx/async_xor.c:324: undefined reference 
to `dmaengine_unmap_put'
   aarch64-linux-gnu-ld: crypto/async_tx/async_pq.o: in function 
`async_gen_syndrome':
   crypto/async_tx/async_pq.c:176: undefined reference to 
`dmaengine_get_unmap_data'
   aarch64-linux-gnu-ld: crypto/async_tx/async_pq.c:233: undefined reference to 
`dmaengine_unmap_put'
   aarch64-linux-gnu-ld: crypto/async_tx/async_pq.c:229: undefined reference to 
`dmaengine_unmap_put'
   aarch64-linux-gnu-ld: crypto/async_tx/async_pq.o: in function 
`async_syndrome_val':
   crypto/async_tx/async_pq.c:295: undefined reference to 
`dmaengine_get_unmap_data'
   aarch64-linux-gnu-ld: crypto/async_tx/async_pq.c:412: undefined reference to 
`dmaengine_unmap_put'
   aarch64-linux-gnu-ld: drivers/xen/sys-hypervisor.o: in function 
`buildid_show':
   drivers/xen/sys-hypervisor.c:375: undefined reference to `stpcpy'
   aarch64-linux-gnu-ld: drivers/tty/tty_io.o: in function `tty_line_name':
   drivers/tty/tty_io.c:1139: undefined reference to `stpcpy'
   aarch64-linux-gnu-ld: drivers/tty/tty_io.c:1139: undefined reference to 
`stpcpy'
   aarch64-linux-gnu-ld: drivers/tty/tty_io.c:1139: undefined reference to 
`stpcpy'
   aarch64-linux-gnu-ld: drivers/gpu/drm/vc4/vc4_dsi.o: in function 
`dsi_dma_workaround_write':
   drivers/gpu/drm/vc4/vc4_dsi.c:581: undefined reference to `dma_sync_wait'
   aarch64-linux-gnu-ld: drivers/gpu/drm/vc4/vc4_dsi.c:581: undefined reference 
to `dma_sync_wait'
   aarch64-linux-gnu-ld: drivers/gpu/drm/vc4/vc4_dsi.c:581: undefined reference 
to `dma_sync_wait'
   a

Re: [PATCH 1/2] iommu/amd: Add support to indicate whether DMA remap support is enabled

2022-03-15 Thread kernel test robot
Hi Mario,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on joro-iommu/next]
[also build test ERROR on arm-perf/for-next/perf linus/master v5.17-rc8 
next-20220315]
[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/Mario-Limonciello/iommu-amd-Add-support-to-indicate-whether-DMA-remap-support-is-enabled/20220316-002821
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: x86_64-defconfig 
(https://download.01.org/0day-ci/archive/20220316/202203160844.lkviwr1q-...@intel.com/config)
compiler: gcc-9 (Ubuntu 9.4.0-1ubuntu1~20.04) 9.4.0
reproduce (this is a W=1 build):
# 
https://github.com/0day-ci/linux/commit/fa63035401902e438c5ef3213112901a1054c621
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Mario-Limonciello/iommu-amd-Add-support-to-indicate-whether-DMA-remap-support-is-enabled/20220316-002821
git checkout fa63035401902e438c5ef3213112901a1054c621
# save the config file to linux build tree
mkdir build_dir
make W=1 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 

All errors (new ones prefixed by >>):

>> drivers/iommu/amd/init.c:3294:6: error: redefinition of 
>> 'amd_ivrs_remap_support'
3294 | bool amd_ivrs_remap_support(void)
 |  ^~
   In file included from drivers/iommu/amd/init.c:20:
   include/linux/amd-iommu.h:198:20: note: previous definition of 
'amd_ivrs_remap_support' was here
 198 | static inline bool amd_ivrs_remap_support(void)
 |^~


vim +/amd_ivrs_remap_support +3294 drivers/iommu/amd/init.c

  3284  
  3285  /*
  3286   * ivrs_remap_support - Is %IOMMU_IVINFO_DMA_REMAP set in IVRS table
  3287   *
  3288   * Returns true if the platform has %IOMMU_IVINFO_DMA_REMAP% set in the 
IOMMU
  3289   * IVRS IVInfo field.
  3290   * Presence of this flag indicates to the OS/HV that the IOMMU is used 
for
  3291   * Preboot DMA protection and device accessed memory should be remapped 
after
  3292   * the OS has loaded.
  3293   */
> 3294  bool amd_ivrs_remap_support(void)
  3295  {
  3296  return amdr_ivrs_remap_support;
  3297  }
  3298  EXPORT_SYMBOL_GPL(amd_ivrs_remap_support);
  3299  

---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: [PATCH 2/2] thunderbolt: Use pre-boot DMA protection on AMD systems

2022-03-15 Thread kernel test robot
Hi Mario,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on joro-iommu/next]
[also build test ERROR on arm-perf/for-next/perf linus/master v5.17-rc8 
next-20220315]
[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/Mario-Limonciello/iommu-amd-Add-support-to-indicate-whether-DMA-remap-support-is-enabled/20220316-002821
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: x86_64-randconfig-a012 
(https://download.01.org/0day-ci/archive/20220316/202203160904.vb4alcdg-...@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 
a6b2f50fb47da3baeee10b1906da6e30ac5d26ec)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# 
https://github.com/0day-ci/linux/commit/9b0b7079d348c607cba7af4c87eaae1a79e52d91
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Mario-Limonciello/iommu-amd-Add-support-to-indicate-whether-DMA-remap-support-is-enabled/20220316-002821
git checkout 9b0b7079d348c607cba7af4c87eaae1a79e52d91
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 
O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

   In file included from drivers/thunderbolt/domain.c:9:
>> include/linux/amd-iommu.h:159:52: error: use of undeclared identifier 
>> 'ENODEV'
   static inline int amd_iommu_detect(void) { return -ENODEV; }
  ^
   1 error generated.


vim +/ENODEV +159 include/linux/amd-iommu.h

6a9401a7ac13e6 arch/x86/include/asm/amd_iommu.h Joerg Roedel  
2009-11-20  158  
480125ba49ba62 arch/x86/include/asm/amd_iommu.h Konrad Rzeszutek Wilk 
2010-08-26 @159  static inline int amd_iommu_detect(void) { return -ENODEV; }
6a9401a7ac13e6 arch/x86/include/asm/amd_iommu.h Joerg Roedel  
2009-11-20  160  

---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: [PATCH v2] iommu/amd: Add support to indicate whether DMA remap support is enabled

2022-03-20 Thread kernel test robot
Hi Mario,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on joro-iommu/next]
[also build test ERROR on v5.17 next-20220318]
[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/Mario-Limonciello/iommu-amd-Add-support-to-indicate-whether-DMA-remap-support-is-enabled/20220319-063131
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: x86_64-defconfig 
(https://download.01.org/0day-ci/archive/20220321/202203211032.fsaaokqt-...@intel.com/config)
compiler: gcc-9 (Ubuntu 9.4.0-1ubuntu1~20.04) 9.4.0
reproduce (this is a W=1 build):
# 
https://github.com/0day-ci/linux/commit/105690537e561d997e376617aa6a7d6d7b74a6a6
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Mario-Limonciello/iommu-amd-Add-support-to-indicate-whether-DMA-remap-support-is-enabled/20220319-063131
git checkout 105690537e561d997e376617aa6a7d6d7b74a6a6
# save the config file to linux build tree
mkdir build_dir
make W=1 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 

All errors (new ones prefixed by >>):

   drivers/iommu/amd/iommu.c: In function 'amd_iommu_capable':
>> drivers/iommu/amd/iommu.c:2165:7: error: 'IOMMU_CAP_PRE_BOOT_PROTECTION' 
>> undeclared (first use in this function)
2165 |  case IOMMU_CAP_PRE_BOOT_PROTECTION:
 |   ^
   drivers/iommu/amd/iommu.c:2165:7: note: each undeclared identifier is 
reported only once for each function it appears in


vim +/IOMMU_CAP_PRE_BOOT_PROTECTION +2165 drivers/iommu/amd/iommu.c

  2155  
  2156  static bool amd_iommu_capable(enum iommu_cap cap)
  2157  {
  2158  switch (cap) {
  2159  case IOMMU_CAP_CACHE_COHERENCY:
  2160  return true;
  2161  case IOMMU_CAP_INTR_REMAP:
  2162  return (irq_remapping_enabled == 1);
  2163  case IOMMU_CAP_NOEXEC:
  2164  return false;
> 2165  case IOMMU_CAP_PRE_BOOT_PROTECTION:
  2166  return amdr_ivrs_remap_support;
  2167  default:
  2168  break;
  2169  }
  2170  
  2171  return false;
  2172  }
  2173  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: [PATCH v2] iommu/amd: Add support to indicate whether DMA remap support is enabled

2022-03-20 Thread kernel test robot
Hi Mario,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on joro-iommu/next]
[also build test ERROR on v5.17 next-20220318]
[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/Mario-Limonciello/iommu-amd-Add-support-to-indicate-whether-DMA-remap-support-is-enabled/20220319-063131
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: x86_64-buildonly-randconfig-r004-20220321 
(https://download.01.org/0day-ci/archive/20220321/202203211052.wepydsq9-...@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 
85e9b2687a13d1908aa86d1b89c5ce398a06cd39)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# 
https://github.com/0day-ci/linux/commit/105690537e561d997e376617aa6a7d6d7b74a6a6
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Mario-Limonciello/iommu-amd-Add-support-to-indicate-whether-DMA-remap-support-is-enabled/20220319-063131
git checkout 105690537e561d997e376617aa6a7d6d7b74a6a6
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 
O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/iommu/amd/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

>> drivers/iommu/amd/iommu.c:2165:7: error: use of undeclared identifier 
>> 'IOMMU_CAP_PRE_BOOT_PROTECTION'
   case IOMMU_CAP_PRE_BOOT_PROTECTION:
^
   1 error generated.


vim +/IOMMU_CAP_PRE_BOOT_PROTECTION +2165 drivers/iommu/amd/iommu.c

  2155  
  2156  static bool amd_iommu_capable(enum iommu_cap cap)
  2157  {
  2158  switch (cap) {
  2159  case IOMMU_CAP_CACHE_COHERENCY:
  2160  return true;
  2161  case IOMMU_CAP_INTR_REMAP:
  2162  return (irq_remapping_enabled == 1);
  2163  case IOMMU_CAP_NOEXEC:
  2164  return false;
> 2165  case IOMMU_CAP_PRE_BOOT_PROTECTION:
  2166  return amdr_ivrs_remap_support;
  2167  default:
  2168  break;
  2169  }
  2170  
  2171  return false;
  2172  }
  2173  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: [PATCH] RDMA/usnic: Refactor usnic_uiom_alloc_pd()

2022-04-06 Thread kernel test robot
Hi Robin,

I love your patch! Yet something to improve:

[auto build test ERROR on rdma/for-next]
[also build test ERROR on v5.18-rc1 next-20220406]
[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/intel-lab-lkp/linux/commits/Robin-Murphy/RDMA-usnic-Refactor-usnic_uiom_alloc_pd/20220406-133657
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-next
config: i386-allyesconfig 
(https://download.01.org/0day-ci/archive/20220407/202204070316.vozworw5-...@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-19) 11.2.0
reproduce (this is a W=1 build):
# 
https://github.com/intel-lab-lkp/linux/commit/0aa6215010a083081b26ccb23d0aa2b4089bbbfd
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review 
Robin-Murphy/RDMA-usnic-Refactor-usnic_uiom_alloc_pd/20220406-133657
git checkout 0aa6215010a083081b26ccb23d0aa2b4089bbbfd
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

   drivers/infiniband/hw/usnic/usnic_uiom.c: In function 'usnic_uiom_init':
>> drivers/infiniband/hw/usnic/usnic_uiom.c:561:29: error: 'pci_bus_type' 
>> undeclared (first use in this function); did you mean 'bus_type'?
 561 | if (!iommu_present(&pci_bus_type)) {
 | ^~~~
 | bus_type
   drivers/infiniband/hw/usnic/usnic_uiom.c:561:29: note: each undeclared 
identifier is reported only once for each function it appears in


vim +561 drivers/infiniband/hw/usnic/usnic_uiom.c

e3cf00d0a87f02 Upinder Malhi 2013-09-10  558  
e3cf00d0a87f02 Upinder Malhi 2013-09-10  559  int usnic_uiom_init(char 
*drv_name)
e3cf00d0a87f02 Upinder Malhi 2013-09-10  560  {
e3cf00d0a87f02 Upinder Malhi 2013-09-10 @561if 
(!iommu_present(&pci_bus_type)) {

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: [PATCH v6 4/7] hisi_ptt: Add tune function support for HiSilicon PCIe Tune and Trace device

2022-04-06 Thread kernel test robot
Hi Yicong,

I love your patch! Perhaps something to improve:

[auto build test WARNING on joro-iommu/next]
[also build test WARNING on linus/master linux/master v5.18-rc1 next-20220406]
[cannot apply to tip/perf/core]
[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/intel-lab-lkp/linux/commits/Yicong-Yang/Add-support-for-HiSilicon-PCIe-Tune-and-Trace-device/20220406-200044
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: alpha-allyesconfig 
(https://download.01.org/0day-ci/archive/20220407/202204071201.acepulor-...@intel.com/config)
compiler: alpha-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# 
https://github.com/intel-lab-lkp/linux/commit/9400668b70cbcd5ec74a52f043c3a333b80135f8
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review 
Yicong-Yang/Add-support-for-HiSilicon-PCIe-Tune-and-Trace-device/20220406-200044
git checkout 9400668b70cbcd5ec74a52f043c3a333b80135f8
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross 
O=build_dir ARCH=alpha SHELL=/bin/bash drivers/hwtracing/ptt/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>):

   drivers/hwtracing/ptt/hisi_ptt.c: In function 'hisi_ptt_tune_data_get':
>> drivers/hwtracing/ptt/hisi_ptt.c:46:16: warning: conversion from 'long 
>> unsigned int' to 'u32' {aka 'unsigned int'} changes value from 
>> '18446744073709551615' to '4294967295' [-Woverflow]
  46 | writel(~0UL, hisi_ptt->iobase + HISI_PTT_TUNING_DATA);
 |^~~~
   drivers/hwtracing/ptt/hisi_ptt.c: At top level:
   drivers/hwtracing/ptt/hisi_ptt.c:1131:6: warning: no previous prototype for 
'hisi_ptt_remove' [-Wmissing-prototypes]
1131 | void hisi_ptt_remove(struct pci_dev *pdev)
 |  ^~~


vim +46 drivers/hwtracing/ptt/hisi_ptt.c

33  
34  static int hisi_ptt_tune_data_get(struct hisi_ptt *hisi_ptt,
35u32 event, u16 *data)
36  {
37  u32 reg;
38  
39  reg = readl(hisi_ptt->iobase + HISI_PTT_TUNING_CTRL);
40  reg &= ~(HISI_PTT_TUNING_CTRL_CODE | HISI_PTT_TUNING_CTRL_SUB);
41  reg |= FIELD_PREP(HISI_PTT_TUNING_CTRL_CODE | 
HISI_PTT_TUNING_CTRL_SUB,
42event);
43  writel(reg, hisi_ptt->iobase + HISI_PTT_TUNING_CTRL);
44  
45  /* Write all 1 to indicates it's the read process */
  > 46  writel(~0UL, hisi_ptt->iobase + HISI_PTT_TUNING_DATA);
47  
48  if (!hisi_ptt_wait_tuning_finish(hisi_ptt))
49  return -ETIMEDOUT;
50  
51  reg = readl(hisi_ptt->iobase + HISI_PTT_TUNING_DATA);
52  reg &= HISI_PTT_TUNING_DATA_VAL_MASK;
53  *data = FIELD_GET(HISI_PTT_TUNING_DATA_VAL_MASK, reg);
54  
55  return 0;
56  }
57  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: [PATCH] iommu/mediatek: fix NULL pointer dereference when printing dev_name

2022-04-22 Thread kernel test robot
Hi Miles,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on joro-iommu/next]
[also build test WARNING on v5.18-rc3 next-20220422]
[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/intel-lab-lkp/linux/commits/Miles-Chen/iommu-mediatek-fix-NULL-pointer-dereference-when-printing-dev_name/20220423-070605
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: hexagon-randconfig-r041-20220422 
(https://download.01.org/0day-ci/archive/20220423/202204231446.iykdz674-...@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 
5bd87350a5ae429baf8f373cb226a57b62f87280)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# 
https://github.com/intel-lab-lkp/linux/commit/85771767e503ca60069fe4e6ec2ddb80c7f9bafa
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review 
Miles-Chen/iommu-mediatek-fix-NULL-pointer-dereference-when-printing-dev_name/20220423-070605
git checkout 85771767e503ca60069fe4e6ec2ddb80c7f9bafa
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 
O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/iommu/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>):

>> drivers/iommu/mtk_iommu.c:605:6: warning: variable 'larbdev' is 
>> uninitialized when used here [-Wuninitialized]
   if (larbdev) {
   ^~~
   drivers/iommu/mtk_iommu.c:597:24: note: initialize the variable 'larbdev' to 
silence this warning
   struct device *larbdev;
 ^
  = NULL
   1 warning generated.


vim +/larbdev +605 drivers/iommu/mtk_iommu.c

   592  
   593  static void mtk_iommu_release_device(struct device *dev)
   594  {
   595  struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev);
   596  struct mtk_iommu_data *data;
   597  struct device *larbdev;
   598  unsigned int larbid;
   599  
   600  if (!fwspec || fwspec->ops != &mtk_iommu_ops)
   601  return;
   602  
   603  data = dev_iommu_priv_get(dev);
   604  larbid = MTK_M4U_TO_LARB(fwspec->ids[0]);
 > 605  if (larbdev) {
   606  larbdev = data->larb_imu[larbid].dev;
   607  device_link_remove(dev, larbdev);
   608  }
   609  
   610  iommu_fwspec_free(dev);
   611  }
   612  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: [PATCH v11 4/9] ACPI/IORT: Add support to retrieve IORT RMR reserved regions

2022-04-23 Thread kernel test robot
Hi Shameer,

I love your patch! Perhaps something to improve:

[auto build test WARNING on joro-iommu/next]
[also build test WARNING on rafael-pm/linux-next arm/for-next 
arm64/for-next/core soc/for-next linus/master v5.18-rc3 next-20220422]
[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/intel-lab-lkp/linux/commits/Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20220423-003822
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: arm64-randconfig-r012-20220422 
(https://download.01.org/0day-ci/archive/20220423/202204231737.0jkkpxzk-...@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 
5bd87350a5ae429baf8f373cb226a57b62f87280)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# 
https://github.com/intel-lab-lkp/linux/commit/5b73fd681a27e2ad450bac28f8a81f4b35fe4d68
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review 
Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20220423-003822
git checkout 5b73fd681a27e2ad450bac28f8a81f4b35fe4d68
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 
O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/acpi/arm64/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>):

>> drivers/acpi/arm64/iort.c:801:29: warning: no previous prototype for 
>> function 'iort_rmr_alloc' [-Wmissing-prototypes]
   struct iommu_iort_rmr_data *iort_rmr_alloc(struct acpi_iort_rmr_desc 
*rmr_desc,
   ^
   drivers/acpi/arm64/iort.c:801:1: note: declare 'static' if the function is 
not intended to be used outside of this translation unit
   struct iommu_iort_rmr_data *iort_rmr_alloc(struct acpi_iort_rmr_desc 
*rmr_desc,
   ^
   static 
   drivers/acpi/arm64/iort.c:896:20: error: use of undeclared identifier 
'ACPI_IORT_RMR_REMAP_PERMITTED'
   if (rmr->flags & ACPI_IORT_RMR_REMAP_PERMITTED)
^
   drivers/acpi/arm64/iort.c:901:20: error: use of undeclared identifier 
'ACPI_IORT_RMR_ACCESS_PRIVILEGE'
   if (rmr->flags & ACPI_IORT_RMR_ACCESS_PRIVILEGE)
^
   drivers/acpi/arm64/iort.c:905:7: error: call to undeclared function 
'ACPI_IORT_RMR_ACCESS_ATTRIBUTES'; ISO C99 and later do not support implicit 
function declarations [-Wimplicit-function-declaration]
   if (ACPI_IORT_RMR_ACCESS_ATTRIBUTES(rmr->flags) <=
   ^
   drivers/acpi/arm64/iort.c:906:5: error: use of undeclared identifier 
'ACPI_IORT_RMR_ATTR_DEVICE_GRE'
   ACPI_IORT_RMR_ATTR_DEVICE_GRE)
   ^
   drivers/acpi/arm64/iort.c:909:5: error: use of undeclared identifier 
'ACPI_IORT_RMR_ATTR_NORMAL_IWB_OWB'
   ACPI_IORT_RMR_ATTR_NORMAL_IWB_OWB)
   ^
   1 warning and 5 errors generated.


vim +/iort_rmr_alloc +801 drivers/acpi/arm64/iort.c

   800  
 > 801  struct iommu_iort_rmr_data *iort_rmr_alloc(struct acpi_iort_rmr_desc 
 > *rmr_desc,
   802 int prot, enum 
iommu_resv_type type,
   803 u32 *sids, u32 num_sids)
   804  {
   805  struct iommu_iort_rmr_data *rmr_data;
   806  struct iommu_resv_region *region;
   807  u32 *sids_copy;
   808  u64 addr = rmr_desc->base_address, size = rmr_desc->length;
   809  
   810  rmr_data = kmalloc(sizeof(*rmr_data), GFP_KERNEL);
   811  if (!rmr_data)
   812  return NULL;
   813  
   814  /* Create a copy of SIDs array to associate with this rmr_data 
*/
   815  sids_copy = kmemdup(sids, num_sids * sizeof(*sids), GFP_KERNEL);
   816  if (!sids_copy) {
   817  kfree(rmr_data);
   818  return NULL;
   819  }
   820  rmr_data->sids = sids_copy;
   821  rmr_data->num_sids = num_sids;
   822  
   823  if (!IS_ALIGNED(addr, SZ_64K) || !IS_ALIGNED(size, SZ_64K)) {
   824  /* PAGE align base addr and size */
   825  addr &= PAGE_MASK;
   826  size = PAGE_ALIGN(

Re: [PATCH v11 4/9] ACPI/IORT: Add support to retrieve IORT RMR reserved regions

2022-04-23 Thread kernel test robot
Hi Shameer,

I love your patch! Perhaps something to improve:

[auto build test WARNING on joro-iommu/next]
[also build test WARNING on rafael-pm/linux-next arm/for-next 
arm64/for-next/core soc/for-next linus/master v5.18-rc3 next-20220422]
[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/intel-lab-lkp/linux/commits/Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20220423-003822
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: arm64-allyesconfig 
(https://download.01.org/0day-ci/archive/20220423/202204232022.kmubee9l-...@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# 
https://github.com/intel-lab-lkp/linux/commit/5b73fd681a27e2ad450bac28f8a81f4b35fe4d68
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review 
Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20220423-003822
git checkout 5b73fd681a27e2ad450bac28f8a81f4b35fe4d68
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross W=1 
O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/acpi/arm64/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>):

>> drivers/acpi/arm64/iort.c:801:29: warning: no previous prototype for 
>> 'iort_rmr_alloc' [-Wmissing-prototypes]
 801 | struct iommu_iort_rmr_data *iort_rmr_alloc(struct acpi_iort_rmr_desc 
*rmr_desc,
 | ^~
   drivers/acpi/arm64/iort.c: In function 'iort_get_rmrs':
   drivers/acpi/arm64/iort.c:896:34: error: 'ACPI_IORT_RMR_REMAP_PERMITTED' 
undeclared (first use in this function)
 896 | if (rmr->flags & ACPI_IORT_RMR_REMAP_PERMITTED)
 |  ^
   drivers/acpi/arm64/iort.c:896:34: note: each undeclared identifier is 
reported only once for each function it appears in
   drivers/acpi/arm64/iort.c:901:34: error: 'ACPI_IORT_RMR_ACCESS_PRIVILEGE' 
undeclared (first use in this function)
 901 | if (rmr->flags & ACPI_IORT_RMR_ACCESS_PRIVILEGE)
 |  ^~
   drivers/acpi/arm64/iort.c:905:21: error: implicit declaration of function 
'ACPI_IORT_RMR_ACCESS_ATTRIBUTES'; did you mean 'ACPI_IORT_MF_ATTRIBUTES'? 
[-Werror=implicit-function-declaration]
 905 | if (ACPI_IORT_RMR_ACCESS_ATTRIBUTES(rmr->flags) <=
 | ^~~
 | ACPI_IORT_MF_ATTRIBUTES
   drivers/acpi/arm64/iort.c:906:33: error: 'ACPI_IORT_RMR_ATTR_DEVICE_GRE' 
undeclared (first use in this function)
 906 | ACPI_IORT_RMR_ATTR_DEVICE_GRE)
 | ^
   drivers/acpi/arm64/iort.c:909:33: error: 'ACPI_IORT_RMR_ATTR_NORMAL_IWB_OWB' 
undeclared (first use in this function)
 909 | ACPI_IORT_RMR_ATTR_NORMAL_IWB_OWB)
 | ^
   cc1: some warnings being treated as errors


vim +/iort_rmr_alloc +801 drivers/acpi/arm64/iort.c

   800  
 > 801  struct iommu_iort_rmr_data *iort_rmr_alloc(struct acpi_iort_rmr_desc 
 > *rmr_desc,
   802 int prot, enum 
iommu_resv_type type,
   803 u32 *sids, u32 num_sids)
   804  {
   805  struct iommu_iort_rmr_data *rmr_data;
   806  struct iommu_resv_region *region;
   807  u32 *sids_copy;
   808  u64 addr = rmr_desc->base_address, size = rmr_desc->length;
   809  
   810  rmr_data = kmalloc(sizeof(*rmr_data), GFP_KERNEL);
   811  if (!rmr_data)
   812  return NULL;
   813  
   814  /* Create a copy of SIDs array to associate with this rmr_data 
*/
   815  sids_copy = kmemdup(sids, num_sids * sizeof(*sids), GFP_KERNEL);
   816  if (!sids_copy) {
   817  kfree(rmr_data);
   818  return NULL;
   819  }
   820  rmr_data->sids = sids_copy;
   821  rmr_data->num_sids = num_sids;
   822  
   823  if (!IS_ALIGNED(addr, SZ_64K) || !IS_ALIGNED(size, SZ_64K)) {
   824  /* PAGE align base add

Re: [PATCH v2] iommu: fix an incorrect NULL check on list iterator

2022-05-02 Thread kernel test robot
Hi Xiaomeng,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on joro-iommu/next]
[also build test ERROR on v5.18-rc5 next-20220429]
[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/intel-lab-lkp/linux/commits/Xiaomeng-Tong/iommu-fix-an-incorrect-NULL-check-on-list-iterator/20220501-211400
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: arm-allmodconfig 
(https://download.01.org/0day-ci/archive/20220502/202205021754.gethfnns-...@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# 
https://github.com/intel-lab-lkp/linux/commit/99e334beef5d5be25ed19d3142d16000f0a1986d
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review 
Xiaomeng-Tong/iommu-fix-an-incorrect-NULL-check-on-list-iterator/20220501-211400
git checkout 99e334beef5d5be25ed19d3142d16000f0a1986d
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 
O=build_dir ARCH=arm SHELL=/bin/bash drivers/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

   drivers/iommu/msm_iommu.c: In function 'qcom_iommu_of_xlate':
>> drivers/iommu/msm_iommu.c:629:17: error: 'ret' undeclared (first use in this 
>> function); did you mean 'net'?
 629 | ret = -ENODEV;
 | ^~~
 | net
   drivers/iommu/msm_iommu.c:629:17: note: each undeclared identifier is 
reported only once for each function it appears in
   drivers/iommu/msm_iommu.c:638:1: error: control reaches end of non-void 
function [-Werror=return-type]
 638 | }
 | ^
   cc1: some warnings being treated as errors


vim +629 drivers/iommu/msm_iommu.c

f78ebca8ff3d61 Sricharan R   2016-06-13  614  
f78ebca8ff3d61 Sricharan R   2016-06-13  615  static int 
qcom_iommu_of_xlate(struct device *dev,
f78ebca8ff3d61 Sricharan R   2016-06-13  616   struct 
of_phandle_args *spec)
f78ebca8ff3d61 Sricharan R   2016-06-13  617  {
99e334beef5d5b Xiaomeng Tong 2022-05-01  618struct msm_iommu_dev *iommu = 
NULL, *iter;
f78ebca8ff3d61 Sricharan R   2016-06-13  619unsigned long flags;
f78ebca8ff3d61 Sricharan R   2016-06-13  620  
f78ebca8ff3d61 Sricharan R   2016-06-13  621
spin_lock_irqsave(&msm_iommu_lock, flags);
99e334beef5d5b Xiaomeng Tong 2022-05-01  622list_for_each_entry(iter, 
&qcom_iommu_devices, dev_node)
99e334beef5d5b Xiaomeng Tong 2022-05-01  623if (iter->dev->of_node 
== spec->np) {
99e334beef5d5b Xiaomeng Tong 2022-05-01  624iommu = iter;
f78ebca8ff3d61 Sricharan R   2016-06-13  625break;
99e334beef5d5b Xiaomeng Tong 2022-05-01  626}
f78ebca8ff3d61 Sricharan R   2016-06-13  627  
99e334beef5d5b Xiaomeng Tong 2022-05-01  628if (!iommu) {
f78ebca8ff3d61 Sricharan R   2016-06-13 @629ret = -ENODEV;
f78ebca8ff3d61 Sricharan R   2016-06-13  630goto fail;
f78ebca8ff3d61 Sricharan R   2016-06-13  631}
f78ebca8ff3d61 Sricharan R   2016-06-13  632  
bb5bdc5ab7f133 Xiaoke Wang   2022-04-28  633ret = insert_iommu_master(dev, 
&iommu, spec);
f78ebca8ff3d61 Sricharan R   2016-06-13  634  fail:
f78ebca8ff3d61 Sricharan R   2016-06-13  635
spin_unlock_irqrestore(&msm_iommu_lock, flags);
f78ebca8ff3d61 Sricharan R   2016-06-13  636  
f78ebca8ff3d61 Sricharan R   2016-06-13  637return ret;
f78ebca8ff3d61 Sricharan R   2016-06-13  638  }
f78ebca8ff3d61 Sricharan R   2016-06-13  639  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: [PATCH v3 1/2] iommu/io-pgtable-arm-v7s: Add a quirk to allow pgtable PA up to 35bit

2022-05-12 Thread kernel test robot
Hi,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on arm-perf/for-next/perf]
[also build test WARNING on linus/master v5.18-rc6 next-20220512]
[cannot apply to joro-iommu/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
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/intel-lab-lkp/linux/commits/yf-wang-mediatek-com/iommu-io-pgtable-arm-v7s-Add-a-quirk-to-allow-pgtable-PA-up-to-35bit/20220512-234603
base:   https://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git 
for-next/perf
config: hexagon-allmodconfig 
(https://download.01.org/0day-ci/archive/20220513/202205131016.ati0kpnr-...@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 
9519dacab7b8afd537811fc2abaceb4d14f4e16a)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# 
https://github.com/intel-lab-lkp/linux/commit/916a5fc41cbb8ddfe343193598f250d06b09e3fa
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review 
yf-wang-mediatek-com/iommu-io-pgtable-arm-v7s-Add-a-quirk-to-allow-pgtable-PA-up-to-35bit/20220512-234603
git checkout 916a5fc41cbb8ddfe343193598f250d06b09e3fa
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 
O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/iommu/ drivers/rtc/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>):

>> drivers/iommu/io-pgtable-arm-v7s.c:886:4: warning: shift count >= width of 
>> type [-Wshift-count-overflow]
   ARM_V7S_TTBR_35BIT_PA(cfg->arm_v7s_cfg.ttbr, paddr);
   ^~~
   drivers/iommu/io-pgtable-arm-v7s.c:154:39: note: expanded from macro 
'ARM_V7S_TTBR_35BIT_PA'
   ((ttbr & ((u32)(~0U << 3))) | ((pa & GENMASK(34, 32)) >> 32))
^~~
   include/linux/bits.h:38:31: note: expanded from macro 'GENMASK'
   (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
^~~
   include/linux/bits.h:35:22: note: expanded from macro '__GENMASK'
   (((~UL(0)) - (UL(1) << (l)) + 1) & \
   ^  ~~~
>> drivers/iommu/io-pgtable-arm-v7s.c:886:4: warning: shift count is negative 
>> [-Wshift-count-negative]
   ARM_V7S_TTBR_35BIT_PA(cfg->arm_v7s_cfg.ttbr, paddr);
   ^~~
   drivers/iommu/io-pgtable-arm-v7s.c:154:39: note: expanded from macro 
'ARM_V7S_TTBR_35BIT_PA'
   ((ttbr & ((u32)(~0U << 3))) | ((pa & GENMASK(34, 32)) >> 32))
^~~
   include/linux/bits.h:38:31: note: expanded from macro 'GENMASK'
   (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
^~~
   include/linux/bits.h:36:11: note: expanded from macro '__GENMASK'
(~UL(0) >> (BITS_PER_LONG - 1 - (h
^  ~
>> drivers/iommu/io-pgtable-arm-v7s.c:886:4: warning: shift count >= width of 
>> type [-Wshift-count-overflow]
   ARM_V7S_TTBR_35BIT_PA(cfg->arm_v7s_cfg.ttbr, paddr);
   ^~~
   drivers/iommu/io-pgtable-arm-v7s.c:154:56: note: expanded from macro 
'ARM_V7S_TTBR_35BIT_PA'
   ((ttbr & ((u32)(~0U << 3))) | ((pa & GENMASK(34, 32)) >> 32))
 ^  ~~
   3 warnings generated.


vim +886 drivers/iommu/io-pgtable-arm-v7s.c

   795  
   796  static struct io_pgtable *arm_v7s_alloc_pgtable(struct io_pgtable_cfg 
*cfg,
   797  void *cookie)
   798  {
   799  slab_flags_t slab_flag = ARM_V7S_TABLE_SLAB_FLAGS;
   800  struct arm_v7s_io_pgtable *data;
   801  phys_addr_t paddr;
   802  
   803  if (cfg->ias > (arm_v7s_is_mtk_enabled(cfg) ? 34 : 
ARM_V7S_ADDR_BITS))
   804  return NULL;
   805  
   806  if (cfg->oas > (arm_v7s_is_mtk_enabled(cfg) ? 35 : 
ARM_V7S_ADDR_BITS))
   807  return NULL;
   808  
   809  if (cfg->quirks & ~(IO_PGTABLE_QUIRK_ARM_NS |
   810 

Re: [PATCH v3 1/2] iommu/io-pgtable-arm-v7s: Add a quirk to allow pgtable PA up to 35bit

2022-05-12 Thread kernel test robot
Hi,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on arm-perf/for-next/perf]
[also build test WARNING on linus/master v5.18-rc6]
[cannot apply to joro-iommu/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
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/intel-lab-lkp/linux/commits/yf-wang-mediatek-com/iommu-io-pgtable-arm-v7s-Add-a-quirk-to-allow-pgtable-PA-up-to-35bit/20220512-234603
base:   https://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git 
for-next/perf
config: arm-qcom_defconfig 
(https://download.01.org/0day-ci/archive/20220513/202205131021.3gskebg2-...@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# 
https://github.com/intel-lab-lkp/linux/commit/916a5fc41cbb8ddfe343193598f250d06b09e3fa
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review 
yf-wang-mediatek-com/iommu-io-pgtable-arm-v7s-Add-a-quirk-to-allow-pgtable-PA-up-to-35bit/20220512-234603
git checkout 916a5fc41cbb8ddfe343193598f250d06b09e3fa
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 
O=build_dir ARCH=arm SHELL=/bin/bash drivers/iommu/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>):

   In file included from include/linux/ratelimit_types.h:5,
from include/linux/ratelimit.h:5,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from include/linux/dma-mapping.h:7,
from drivers/iommu/io-pgtable-arm-v7s.c:25:
   drivers/iommu/io-pgtable-arm-v7s.c: In function 'arm_v7s_alloc_pgtable':
   include/linux/bits.h:35:29: warning: left shift count >= width of type 
[-Wshift-count-overflow]
  35 | (((~UL(0)) - (UL(1) << (l)) + 1) & \
 | ^~
   include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
  38 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
 |  ^
   drivers/iommu/io-pgtable-arm-v7s.c:154:46: note: in expansion of macro 
'GENMASK'
 154 | ((ttbr & ((u32)(~0U << 3))) | ((pa & GENMASK(34, 32)) >> 32))
 |  ^~~
   drivers/iommu/io-pgtable-arm-v7s.c:886:25: note: in expansion of macro 
'ARM_V7S_TTBR_35BIT_PA'
 886 | ARM_V7S_TTBR_35BIT_PA(cfg->arm_v7s_cfg.ttbr, 
paddr);
 | ^
   include/linux/bits.h:36:18: warning: right shift count is negative 
[-Wshift-count-negative]
  36 |  (~UL(0) >> (BITS_PER_LONG - 1 - (h
 |  ^~
   include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
  38 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
 |  ^
   drivers/iommu/io-pgtable-arm-v7s.c:154:46: note: in expansion of macro 
'GENMASK'
 154 | ((ttbr & ((u32)(~0U << 3))) | ((pa & GENMASK(34, 32)) >> 32))
 |  ^~~
   drivers/iommu/io-pgtable-arm-v7s.c:886:25: note: in expansion of macro 
'ARM_V7S_TTBR_35BIT_PA'
 886 | ARM_V7S_TTBR_35BIT_PA(cfg->arm_v7s_cfg.ttbr, 
paddr);
 | ^
>> drivers/iommu/io-pgtable-arm-v7s.c:154:63: warning: right shift count >= 
>> width of type [-Wshift-count-overflow]
 154 | ((ttbr & ((u32)(~0U << 3))) | ((pa & GENMASK(34, 32)) >> 32))
 |   ^~
   drivers/iommu/io-pgtable-arm-v7s.c:886:25: note: in expansion of macro 
'ARM_V7S_TTBR_35BIT_PA'
 886 | ARM_V7S_TTBR_35BIT_PA(cfg->arm_v7s_cfg.ttbr, 
paddr);
 | ^


vim +154 drivers/iommu/io-pgtable-arm-v7s.c

   145  
   146  #define ARM_V7S_TTBR_S  BIT(1)
   147  #define ARM_V7S_TTBR_NOSBIT(5)
   148  #define ARM_V7S_TTBR_ORGN_ATTR(attr)(((attr) & 0x3) << 3)
   149  #define ARM_V7S_TTBR_IRGN_ATTR(attr)
\
   150  attr) & 0x1) << 6) | (((attr) & 0x2) >> 1))
   

Re: [PATCH 1/3] iommu: Add Visconti5 IOMMU driver

2022-05-24 Thread kernel test robot
Hi Nobuhiro,

I love your patch! Perhaps something to improve:

[auto build test WARNING on joro-iommu/next]
[also build test WARNING on arm-perf/for-next/perf soc/for-next linus/master 
v5.18 next-20220524]
[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/intel-lab-lkp/linux/commits/Nobuhiro-Iwamatsu/Add-Visconti5-IOMMU-driver/20220525-093326
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: nios2-allyesconfig 
(https://download.01.org/0day-ci/archive/20220525/202205251205.phq3cwj3-...@intel.com/config)
compiler: nios2-linux-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# 
https://github.com/intel-lab-lkp/linux/commit/69bb4f3c2ef0bb1f65922bc72bb31109897a6393
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review 
Nobuhiro-Iwamatsu/Add-Visconti5-IOMMU-driver/20220525-093326
git checkout 69bb4f3c2ef0bb1f65922bc72bb31109897a6393
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 
O=build_dir ARCH=nios2 SHELL=/bin/bash drivers/iommu/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>):

   drivers/iommu/visconti-atu.c:47:29: error: field 'iommu' has incomplete type
  47 | struct iommu_device iommu;
 | ^
   drivers/iommu/visconti-atu.c:62:29: error: field 'io_domain' has incomplete 
type
  62 | struct iommu_domain io_domain;
 | ^
   In file included from include/linux/bits.h:22,
from include/linux/ratelimit_types.h:5,
from include/linux/ratelimit.h:5,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from include/linux/dma-mapping.h:7,
from drivers/iommu/visconti-atu.c:12:
   drivers/iommu/visconti-atu.c: In function 'to_atu_domain':
   include/linux/compiler_types.h:293:27: error: expression in static assertion 
is not an integer
 293 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), 
typeof(b))
 |   ^~~~
   include/linux/build_bug.h:78:56: note: in definition of macro 
'__static_assert'
  78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
 |^~~~
   include/linux/container_of.h:19:9: note: in expansion of macro 
'static_assert'
  19 | static_assert(__same_type(*(ptr), ((type *)0)->member) ||
   \
 | ^
   include/linux/container_of.h:19:23: note: in expansion of macro '__same_type'
  19 | static_assert(__same_type(*(ptr), ((type *)0)->member) ||
   \
 |   ^~~
   drivers/iommu/visconti-atu.c:70:16: note: in expansion of macro 
'container_of'
  70 | return container_of(domain, struct visconti_atu_domain, 
io_domain);
 |^~~~
   drivers/iommu/visconti-atu.c: In function 'visconti_atu_enable_entry':
>> drivers/iommu/visconti-atu.c:102:52: warning: right shift count >= width of 
>> type [-Wshift-count-overflow]
 102 |(atu->iova[num] >> 32) & 
ATU_BGADDR_MASK);
 |^~
   drivers/iommu/visconti-atu.c: In function 'visconti_atu_attach_device':
   drivers/iommu/visconti-atu.c:121:43: error: implicit declaration of function 
'dev_iommu_priv_get' [-Werror=implicit-function-declaration]
 121 | struct visconti_atu_device *atu = dev_iommu_priv_get(dev);
 |   ^~
   drivers/iommu/visconti-atu.c:121:43: warning: initialization of 'struct 
visconti_atu_device *' from 'int' makes pointer from integer without a cast 
[-Wint-conversion]
   drivers/iommu/visconti-atu.c: In function 'visconti_atu_detach_device':
   drivers/iommu/visconti-atu.c:150:43: warning: initialization of 'struct 
visconti_atu_device *' from 'int' makes pointer from integer without a cast 
[-Wint-conversion]
 150 | struct visconti_atu_device *atu = dev_iommu_priv_get(dev);
 |

Re: [PATCH 1/3] iommu: Add Visconti5 IOMMU driver

2022-05-24 Thread kernel test robot
Hi Nobuhiro,

I love your patch! Perhaps something to improve:

[auto build test WARNING on joro-iommu/next]
[also build test WARNING on arm-perf/for-next/perf soc/for-next linus/master 
v5.18 next-20220524]
[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/intel-lab-lkp/linux/commits/Nobuhiro-Iwamatsu/Add-Visconti5-IOMMU-driver/20220525-093326
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: alpha-allyesconfig 
(https://download.01.org/0day-ci/archive/20220525/202205251452.kfxlqhqx-...@intel.com/config)
compiler: alpha-linux-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# 
https://github.com/intel-lab-lkp/linux/commit/69bb4f3c2ef0bb1f65922bc72bb31109897a6393
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review 
Nobuhiro-Iwamatsu/Add-Visconti5-IOMMU-driver/20220525-093326
git checkout 69bb4f3c2ef0bb1f65922bc72bb31109897a6393
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 
O=build_dir ARCH=alpha SHELL=/bin/bash drivers/iommu/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>):

   drivers/iommu/visconti-atu.c:47:29: error: field 'iommu' has incomplete type
  47 | struct iommu_device iommu;
 | ^
   drivers/iommu/visconti-atu.c:62:29: error: field 'io_domain' has incomplete 
type
  62 | struct iommu_domain io_domain;
 | ^
   In file included from include/linux/bits.h:22,
from include/linux/ratelimit_types.h:5,
from include/linux/ratelimit.h:5,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from include/linux/dma-mapping.h:7,
from drivers/iommu/visconti-atu.c:12:
   drivers/iommu/visconti-atu.c: In function 'to_atu_domain':
   include/linux/compiler_types.h:293:27: error: expression in static assertion 
is not an integer
 293 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), 
typeof(b))
 |   ^~~~
   include/linux/build_bug.h:78:56: note: in definition of macro 
'__static_assert'
  78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
 |^~~~
   include/linux/container_of.h:19:9: note: in expansion of macro 
'static_assert'
  19 | static_assert(__same_type(*(ptr), ((type *)0)->member) ||
   \
 | ^
   include/linux/container_of.h:19:23: note: in expansion of macro '__same_type'
  19 | static_assert(__same_type(*(ptr), ((type *)0)->member) ||
   \
 |   ^~~
   drivers/iommu/visconti-atu.c:70:16: note: in expansion of macro 
'container_of'
  70 | return container_of(domain, struct visconti_atu_domain, 
io_domain);
 |^~~~
   drivers/iommu/visconti-atu.c: In function 'visconti_atu_attach_device':
   drivers/iommu/visconti-atu.c:121:43: error: implicit declaration of function 
'dev_iommu_priv_get' [-Werror=implicit-function-declaration]
 121 | struct visconti_atu_device *atu = dev_iommu_priv_get(dev);
 |   ^~
>> drivers/iommu/visconti-atu.c:121:43: warning: initialization of 'struct 
>> visconti_atu_device *' from 'int' makes pointer from integer without a cast 
>> [-Wint-conversion]
   drivers/iommu/visconti-atu.c: In function 'visconti_atu_detach_device':
   drivers/iommu/visconti-atu.c:150:43: warning: initialization of 'struct 
visconti_atu_device *' from 'int' makes pointer from integer without a cast 
[-Wint-conversion]
 150 | struct visconti_atu_device *atu = dev_iommu_priv_get(dev);
 |   ^~
   drivers/iommu/visconti-atu.c: At top level:
>> drivers/iommu/visconti-atu.c:196:41: warning: 'struct iommu_iotlb_gather' 
>> declared inside parameter list will not be visible outside of this 
>> definition or declaration
 196 |  struct iommu_iotlb_gather 
*iotlb_ga

Re: [PATCH 1/3] iommu: Add Visconti5 IOMMU driver

2022-05-25 Thread kernel test robot
Hi Nobuhiro,

I love your patch! Yet something to improve:

[auto build test ERROR on joro-iommu/next]
[also build test ERROR on arm-perf/for-next/perf soc/for-next linus/master 
v5.18 next-20220524]
[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/intel-lab-lkp/linux/commits/Nobuhiro-Iwamatsu/Add-Visconti5-IOMMU-driver/20220525-093326
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: alpha-allyesconfig 
(https://download.01.org/0day-ci/archive/20220525/202205251708.q7cwjpf8-...@intel.com/config)
compiler: alpha-linux-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# 
https://github.com/intel-lab-lkp/linux/commit/69bb4f3c2ef0bb1f65922bc72bb31109897a6393
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review 
Nobuhiro-Iwamatsu/Add-Visconti5-IOMMU-driver/20220525-093326
git checkout 69bb4f3c2ef0bb1f65922bc72bb31109897a6393
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 
O=build_dir ARCH=alpha SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot 

Note: the 
linux-review/Nobuhiro-Iwamatsu/Add-Visconti5-IOMMU-driver/20220525-093326 HEAD 
07739c72b066c0781c371eec7614ed876441e8dd builds fine.
  It only hurts bisectability.

All errors (new ones prefixed by >>):

>> drivers/iommu/visconti-atu.c:47:29: error: field 'iommu' has incomplete type
  47 | struct iommu_device iommu;
 | ^
>> drivers/iommu/visconti-atu.c:62:29: error: field 'io_domain' has incomplete 
>> type
  62 | struct iommu_domain io_domain;
 | ^
   In file included from include/linux/bits.h:22,
from include/linux/ratelimit_types.h:5,
from include/linux/ratelimit.h:5,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from include/linux/dma-mapping.h:7,
from drivers/iommu/visconti-atu.c:12:
   drivers/iommu/visconti-atu.c: In function 'to_atu_domain':
   include/linux/compiler_types.h:293:27: error: expression in static assertion 
is not an integer
 293 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), 
typeof(b))
 |   ^~~~
   include/linux/build_bug.h:78:56: note: in definition of macro 
'__static_assert'
  78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
 |^~~~
   include/linux/container_of.h:19:9: note: in expansion of macro 
'static_assert'
  19 | static_assert(__same_type(*(ptr), ((type *)0)->member) ||
   \
 | ^
   include/linux/container_of.h:19:23: note: in expansion of macro '__same_type'
  19 | static_assert(__same_type(*(ptr), ((type *)0)->member) ||
   \
 |   ^~~
   drivers/iommu/visconti-atu.c:70:16: note: in expansion of macro 
'container_of'
  70 | return container_of(domain, struct visconti_atu_domain, 
io_domain);
 |^~~~
   drivers/iommu/visconti-atu.c: In function 'visconti_atu_attach_device':
>> drivers/iommu/visconti-atu.c:121:43: error: implicit declaration of function 
>> 'dev_iommu_priv_get' [-Werror=implicit-function-declaration]
 121 | struct visconti_atu_device *atu = dev_iommu_priv_get(dev);
 |   ^~
   drivers/iommu/visconti-atu.c:121:43: warning: initialization of 'struct 
visconti_atu_device *' from 'int' makes pointer from integer without a cast 
[-Wint-conversion]
   drivers/iommu/visconti-atu.c: In function 'visconti_atu_detach_device':
   drivers/iommu/visconti-atu.c:150:43: warning: initialization of 'struct 
visconti_atu_device *' from 'int' makes pointer from integer without a cast 
[-Wint-conversion]
 150 | struct visconti_atu_device *atu = dev_iommu_priv_get(dev);
 |   ^~
   drivers/iommu/visconti-atu.c: At top level:
   drivers/iommu/visconti-atu.c:196:41: warning: 's

Re: [PATCH 4/6] iommu/qcom: Add support for AArch64 IOMMU pagetables

2022-05-27 Thread kernel test robot
Hi Konrad,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on joro-iommu/next]
[also build test WARNING on v5.18 next-20220527]
[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/intel-lab-lkp/linux/commits/Konrad-Dybcio/iommu-qcom-Use-the-asid-read-from-device-tree-if-specified/20220528-062952
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: arc-allyesconfig 
(https://download.01.org/0day-ci/archive/20220528/202205280904.vsncfpph-...@intel.com/config)
compiler: arceb-elf-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# 
https://github.com/intel-lab-lkp/linux/commit/0744f7d6ebfff8d6854a24d0f95f8e58885b5212
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review 
Konrad-Dybcio/iommu-qcom-Use-the-asid-read-from-device-tree-if-specified/20220528-062952
git checkout 0744f7d6ebfff8d6854a24d0f95f8e58885b5212
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 
O=build_dir ARCH=arc SHELL=/bin/bash drivers/iommu/arm/arm-smmu/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>):

   drivers/iommu/arm/arm-smmu/qcom_iommu.c: In function 
'qcom_iommu_tlb_inv_range_nosync':
>> drivers/iommu/arm/arm-smmu/qcom_iommu.c:174:58: warning: left shift count >= 
>> width of type [-Wshift-count-overflow]
 174 | iova |= (unsigned long)ctx->asid << 48;
 |  ^~


vim +174 drivers/iommu/arm/arm-smmu/qcom_iommu.c

   157  
   158  static void qcom_iommu_tlb_inv_range_nosync(unsigned long iova, size_t 
size,
   159  size_t granule, bool leaf, 
void *cookie)
   160  {
   161  struct qcom_iommu_domain *qcom_domain = cookie;
   162  struct iommu_fwspec *fwspec = qcom_domain->fwspec;
   163  unsigned i, reg;
   164  
   165  reg = leaf ? ARM_SMMU_CB_S1_TLBIVAL : ARM_SMMU_CB_S1_TLBIVA;
   166  
   167  for (i = 0; i < fwspec->num_ids; i++) {
   168  struct qcom_iommu_dev *qcom_iommu = qcom_domain->iommu;
   169  struct qcom_iommu_ctx *ctx = to_ctx(qcom_domain, 
fwspec->ids[i]);
   170  size_t s = size;
   171  
   172  if (qcom_iommu->use_aarch64_pt) {
   173  iova >>= 12;
 > 174  iova |= (unsigned long)ctx->asid << 48;
   175  } else {
   176  iova &= (1UL << 12) - 1UL;
   177  iova |= ctx->asid;
   178  }
   179  do {
   180  iommu_writel(ctx, reg, iova);
   181  iova += granule;
   182  } while (s -= granule);
   183  }
   184  }
   185  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: [PATCH v9 3/3] iommu/mediatek: Allow page table PA up to 35bit

2022-06-15 Thread kernel test robot
Hi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on joro-iommu/next]
[also build test ERROR on linus/master v5.19-rc2 next-20220615]
[cannot apply to arm-perf/for-next/perf]
[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/intel-lab-lkp/linux/commits/yf-wang-mediatek-com/iommu-io-pgtable-arm-v7s-Add-a-quirk-to-allow-pgtable-PA-up-to-35bit/20220616-011227
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: arc-allyesconfig 
(https://download.01.org/0day-ci/archive/20220616/202206161233.wdjdwjgb-...@intel.com/config)
compiler: arceb-elf-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# 
https://github.com/intel-lab-lkp/linux/commit/0032fcce9c1ab50caec1ef5dd4089a8a61fcf15c
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review 
yf-wang-mediatek-com/iommu-io-pgtable-arm-v7s-Add-a-quirk-to-allow-pgtable-PA-up-to-35bit/20220616-011227
git checkout 0032fcce9c1ab50caec1ef5dd4089a8a61fcf15c
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 
O=build_dir ARCH=arc SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

   In file included from include/linux/scatterlist.h:9,
from include/linux/dma-mapping.h:10,
from include/linux/dma-direct.h:9,
from drivers/iommu/mtk_iommu.c:11:
   drivers/iommu/mtk_iommu.c: In function 'mtk_iommu_attach_device':
>> drivers/iommu/mtk_iommu.c:693:49: error: 'struct mtk_iommu_data' has no 
>> member named 'base'
 693 | writel(bank->m4u_dom->ttbr, data->base + 
REG_MMU_PT_BASE_ADDR);
 | ^~
   arch/arc/include/asm/io.h:231:75: note: in definition of macro 
'writel_relaxed'
 231 | #define writel_relaxed(v,c) __raw_writel((__force u32) 
cpu_to_le32(v),c)
 |  
 ^
   drivers/iommu/mtk_iommu.c:693:17: note: in expansion of macro 'writel'
 693 | writel(bank->m4u_dom->ttbr, data->base + 
REG_MMU_PT_BASE_ADDR);
 | ^~


vim +693 drivers/iommu/mtk_iommu.c

   646  
   647  static int mtk_iommu_attach_device(struct iommu_domain *domain,
   648 struct device *dev)
   649  {
   650  struct mtk_iommu_data *data = dev_iommu_priv_get(dev), 
*frstdata;
   651  struct mtk_iommu_domain *dom = to_mtk_domain(domain);
   652  struct list_head *hw_list = data->hw_list;
   653  struct device *m4udev = data->dev;
   654  struct mtk_iommu_bank_data *bank;
   655  unsigned int bankid;
   656  int ret, region_id;
   657  
   658  region_id = mtk_iommu_get_iova_region_id(dev, data->plat_data);
   659  if (region_id < 0)
   660  return region_id;
   661  
   662  bankid = mtk_iommu_get_bank_id(dev, data->plat_data);
   663  mutex_lock(&dom->mutex);
   664  if (!dom->bank) {
   665  /* Data is in the frstdata in sharing pgtable case. */
   666  frstdata = mtk_iommu_get_frst_data(hw_list);
   667  
   668  ret = mtk_iommu_domain_finalise(dom, frstdata, 
region_id);
   669  if (ret) {
   670  mutex_unlock(&dom->mutex);
   671  return -ENODEV;
   672  }
   673  dom->bank = &data->bank[bankid];
   674  }
   675  mutex_unlock(&dom->mutex);
   676  
   677  mutex_lock(&data->mutex);
   678  bank = &data->bank[bankid];
   679  if (!bank->m4u_dom) { /* Initialize the M4U HW for each a BANK 
*/
   680  ret = pm_runtime_resume_and_get(m4udev);
   681  if (ret < 0) {
   682  dev_err(m4udev, "pm get fail(%d) in attach.\n", 
ret);
   683  goto err_unlock;
   684  }
   685  
   686  ret = mtk_iommu_hw_init(data, bankid);
   687  if (ret) {
   688  pm_runtime_put(m4udev);
   689  goto err_unlock;
   690  }
   691

Re: [PATCH] uacce: Tidy up locking

2022-06-20 Thread kernel test robot
Hi Jean-Philippe,

I love your patch! Perhaps something to improve:

[auto build test WARNING on char-misc/char-misc-testing]
[also build test WARNING on soc/for-next linus/master v5.19-rc2 next-20220617]
[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/intel-lab-lkp/linux/commits/Jean-Philippe-Brucker/uacce-Tidy-up-locking/20220620-220634
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git 
0a35780c755ccec097d15c6b4ff8b246a89f1689
config: i386-randconfig-s001 
(https://download.01.org/0day-ci/archive/20220621/202206210432.wvkoxvu5-...@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-30-g92122700-dirty
# 
https://github.com/intel-lab-lkp/linux/commit/3589b5391f54bea3dc85ed65fe0f036757a4f21c
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review 
Jean-Philippe-Brucker/uacce-Tidy-up-locking/20220620-220634
git checkout 3589b5391f54bea3dc85ed65fe0f036757a4f21c
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir 
ARCH=i386 SHELL=/bin/bash drivers/misc/uacce/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot 


sparse warnings: (new ones prefixed by >>)
>> drivers/misc/uacce/uacce.c:291:21: sparse: sparse: incorrect type in 
>> assignment (different base types) @@ expected int ret @@ got 
>> restricted __poll_t @@
   drivers/misc/uacce/uacce.c:291:21: sparse: expected int ret
   drivers/misc/uacce/uacce.c:291:21: sparse: got restricted __poll_t
>> drivers/misc/uacce/uacce.c:295:16: sparse: sparse: incorrect type in return 
>> expression (different base types) @@ expected restricted __poll_t @@ 
>> got int ret @@
   drivers/misc/uacce/uacce.c:295:16: sparse: expected restricted __poll_t
   drivers/misc/uacce/uacce.c:295:16: sparse: got int ret

vim +291 drivers/misc/uacce/uacce.c

   277  
   278  static __poll_t uacce_fops_poll(struct file *file, poll_table *wait)
   279  {
   280  struct uacce_queue *q = file->private_data;
   281  struct uacce_device *uacce = q->uacce;
   282  int ret = 0;
   283  
   284  poll_wait(file, &q->wait, wait);
   285  
   286  mutex_lock(&q->mutex);
   287  if (!uacce_queue_is_valid(q))
   288  goto out_unlock;
   289  
   290  if (uacce->ops->is_q_updated && uacce->ops->is_q_updated(q))
 > 291  ret = EPOLLIN | EPOLLRDNORM;
   292  
   293  out_unlock:
   294  mutex_unlock(&q->mutex);
 > 295  return ret;
   296  }
   297  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: [PATCH v6 04/10] gpu: host1x: Add context device management code

2022-06-22 Thread kernel test robot
Hi Mikko,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm/drm-next]
[also build test ERROR on tegra/for-next linus/master v5.19-rc3]
[cannot apply to tegra-drm/drm/tegra/for-next next-20220621]
[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/intel-lab-lkp/linux/commits/Mikko-Perttunen/Host1x-context-isolation-support/20220621-231339
base:   git://anongit.freedesktop.org/drm/drm drm-next
config: arm64-randconfig-r021-20220622 
(https://download.01.org/0day-ci/archive/20220622/202206221557.laes8ynq-...@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 
8b8d126598ce7bd5243da7f94f69fa1104288bee)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# 
https://github.com/intel-lab-lkp/linux/commit/2501beeae7469b805f9f624049fd56643cf6e18e
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review 
Mikko-Perttunen/Host1x-context-isolation-support/20220621-231339
git checkout 2501beeae7469b805f9f624049fd56643cf6e18e
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 
O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/gpu/host1x/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

>> drivers/gpu/host1x/context.c:80:28: error: no member named 'ids' in 'struct 
>> iommu_fwspec'
   ctx->stream_id = fwspec->ids[0] & 0x;
~~  ^
   1 error generated.


vim +80 drivers/gpu/host1x/context.c

15  
16  int host1x_memory_context_list_init(struct host1x *host1x)
17  {
18  struct host1x_memory_context_list *cdl = &host1x->context_list;
19  struct device_node *node = host1x->dev->of_node;
20  struct host1x_memory_context *ctx;
21  unsigned int i;
22  int err;
23  
24  cdl->devs = NULL;
25  cdl->len = 0;
26  mutex_init(&cdl->lock);
27  
28  err = of_property_count_u32_elems(node, "iommu-map");
29  if (err < 0)
30  return 0;
31  
32  cdl->devs = kcalloc(err, sizeof(*cdl->devs), GFP_KERNEL);
33  if (!cdl->devs)
34  return -ENOMEM;
35  cdl->len = err / 4;
36  
37  for (i = 0; i < cdl->len; i++) {
38  struct iommu_fwspec *fwspec;
39  
40  ctx = &cdl->devs[i];
41  
42  ctx->host = host1x;
43  
44  device_initialize(&ctx->dev);
45  
46  /*
47   * Due to an issue with T194 NVENC, only 38 bits can be 
used.
48   * Anyway, 256GiB of IOVA ought to be enough for anyone.
49   */
50  ctx->dma_mask = DMA_BIT_MASK(38);
51  ctx->dev.dma_mask = &ctx->dma_mask;
52  ctx->dev.coherent_dma_mask = ctx->dma_mask;
53  dev_set_name(&ctx->dev, "host1x-ctx.%d", i);
54  ctx->dev.bus = &host1x_context_device_bus_type;
55  ctx->dev.parent = host1x->dev;
56  
57  dma_set_max_seg_size(&ctx->dev, UINT_MAX);
58  
59  err = device_add(&ctx->dev);
60  if (err) {
61  dev_err(host1x->dev, "could not add context 
device %d: %d\n", i, err);
62  goto del_devices;
63  }
64  
65  err = of_dma_configure_id(&ctx->dev, node, true, &i);
66  if (err) {
67  dev_err(host1x->dev, "IOMMU configuration 
failed for context device %d: %d\n",
68  i, err);
69  device_del(&ctx->dev);
70  goto del_devices;
71  }
72  
73  fwspec = dev_iommu_fwspec_get(&ctx->dev);
74  if (!fwspec) {
75  dev_err(host1x->dev, "Context device %d 

Re: [PATCH v2 1/2] vfio/type1: Simplify bus_type determination

2022-06-22 Thread kernel test robot
Hi Robin,

I love your patch! Yet something to improve:

[auto build test ERROR on v5.19-rc3]
[also build test ERROR on linus/master next-20220622]
[cannot apply to awilliam-vfio/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
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/intel-lab-lkp/linux/commits/Robin-Murphy/vfio-type1-Simplify-bus_type-determination/20220622-200503
base:a111daf0c53ae91e71fd2bfe7497862d14132e3e
config: x86_64-rhel-8.3-kselftests 
(https://download.01.org/0day-ci/archive/20220623/202206231208.pgasmluw-...@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
# 
https://github.com/intel-lab-lkp/linux/commit/7a6e1ddc765bde40f879995137a2ff20cb0eda47
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review 
Robin-Murphy/vfio-type1-Simplify-bus_type-determination/20220622-200503
git checkout 7a6e1ddc765bde40f879995137a2ff20cb0eda47
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot 

All errors (new ones prefixed by >>, old ones prefixed by <<):

>> ERROR: modpost: "vfio_device_get_from_iommu" 
>> [drivers/vfio/vfio_iommu_type1.ko] undefined!
>> ERROR: modpost: "vfio_device_put" [drivers/vfio/vfio_iommu_type1.ko] 
>> undefined!

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: [PATCH v3 2/2] iommu: add Unisoc iommu basic driver

2021-02-03 Thread kernel test robot
Hi Chunyan,

I love your patch! Perhaps something to improve:

[auto build test WARNING on iommu/next]
[also build test WARNING on robh/for-next v5.11-rc6 next-20210125]
[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/Chunyan-Zhang/Add-Unisoc-iommu-basic-driver/20210203-171459
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: nios2-allyesconfig (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# 
https://github.com/0day-ci/linux/commit/02726f17be90f0d6226117f44cef3497250e378f
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Chunyan-Zhang/Add-Unisoc-iommu-basic-driver/20210203-171459
git checkout 02726f17be90f0d6226117f44cef3497250e378f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross 
ARCH=nios2 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>):

   In file included from ./arch/nios2/include/generated/asm/bug.h:1,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from include/asm-generic/current.h:5,
from ./arch/nios2/include/generated/asm/current.h:1,
from include/linux/mutex.h:14,
from include/linux/notifier.h:14,
from include/linux/clk.h:14,
from drivers/iommu/sprd-iommu.c:9:
   drivers/iommu/sprd-iommu.c: In function 'sprd_iommu_iova_to_phys':
>> drivers/iommu/sprd-iommu.c:375:4: warning: format '%llx' expects argument of 
>> type 'long long unsigned int', but argument 5 has type 'dma_addr_t' {aka 
>> 'unsigned int'} [-Wformat=]
 375 |"iova (0x%llx) exceeds the vpn range[0x%lx-0x%lx]\n",
 |^~~~
 376 |iova, start, end))
 |
 ||
 |dma_addr_t {aka unsigned int}
   include/asm-generic/bug.h:89:48: note: in definition of macro '__WARN_printf'
  89 |   warn_slowpath_fmt(__FILE__, __LINE__, taint, arg); \
 |^~~
   drivers/iommu/sprd-iommu.c:374:6: note: in expansion of macro 'WARN'
 374 |  if (WARN(iova < start || iova > end,
 |  ^~~~
   drivers/iommu/sprd-iommu.c:375:16: note: format string is defined here
 375 |"iova (0x%llx) exceeds the vpn range[0x%lx-0x%lx]\n",
 | ~~~^
 ||
 |long long unsigned int
 | %x
   drivers/iommu/sprd-iommu.c: At top level:
   drivers/iommu/sprd-iommu.c:438:20: error: initialization of 'void (*)(struct 
iommu_domain *, long unsigned int,  size_t)' {aka 'void (*)(struct iommu_domain 
*, long unsigned int,  unsigned int)'} from incompatible pointer type 'void 
(*)(struct iommu_domain *)' [-Werror=incompatible-pointer-types]
 438 |  .iotlb_sync_map = sprd_iommu_sync_map,
 |^~~
   drivers/iommu/sprd-iommu.c:438:20: note: (near initialization for 
'sprd_iommu_ops.iotlb_sync_map')
   cc1: some warnings being treated as errors


vim +375 drivers/iommu/sprd-iommu.c

   364  
   365  static phys_addr_t sprd_iommu_iova_to_phys(struct iommu_domain *domain,
   366 dma_addr_t iova)
   367  {
   368  struct sprd_iommu_domain *dom = to_sprd_domain(domain);
   369  unsigned long flags;
   370  phys_addr_t pa;
   371  unsigned long start = domain->geometry.aperture_start;
   372  unsigned long end = domain->geometry.aperture_end;
   373  
   374  if (WARN(iova < start || iova > end,
 > 375   "iova (0x%llx) exceeds the vpn range[0x%lx-0x%lx]\n",
   376   iova, start, end))
   377  return 0;
   378  
   379  spin_lock_irqsave(&dom->pgtlock, flags);
   380  pa = *(dom->pgt_va + ((iova - start) >> SPRD_IOMMU_PAGE_SHIFT));
   381  pa = (pa << SPRD_IOMMU_PAGE_SHIFT) + ((iova - start) & 
(SPRD_IOMMU_PAGE_SIZE - 1));
   382  spin_unlock_irqrestore(&dom->pgtlock, flags);
   383  
   384  return pa;
   385  }
   386  

---
0-DAY CI Kernel Test Service,

[iommu:x86/vt-d 10/12] drivers/iommu/intel/iommu.c:5468:21: error: initialization of 'void iommu_domain from incompatible pointer type 'void iommu_domain long unsigned int, size_t)' {aka 'void iommu_d

2021-02-10 Thread kernel test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git x86/vt-d
head:   31a75cbbb9274cf8185f402904bf11386917870b
commit: 933fcd01e97e2ba29880dd5f1239365e40094950 [10/12] iommu/vt-d: Add 
iotlb_sync_map callback
config: x86_64-rhel-8.3 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# 
https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git/commit/?id=933fcd01e97e2ba29880dd5f1239365e40094950
git remote add iommu 
https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git
git fetch --no-tags iommu x86/vt-d
git checkout 933fcd01e97e2ba29880dd5f1239365e40094950
# 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 

All errors (new ones prefixed by >>):

>> drivers/iommu/intel/iommu.c:5468:21: error: initialization of 'void 
>> (*)(struct iommu_domain *)' from incompatible pointer type 'void (*)(struct 
>> iommu_domain *, long unsigned int,  size_t)' {aka 'void (*)(struct 
>> iommu_domain *, long unsigned int,  long unsigned int)'} 
>> [-Werror=incompatible-pointer-types]
5468 |  .iotlb_sync_map  = intel_iommu_iotlb_sync_map,
 | ^~
   drivers/iommu/intel/iommu.c:5468:21: note: (near initialization for 
'intel_iommu_ops.iotlb_sync_map')
   cc1: some warnings being treated as errors


vim +5468 drivers/iommu/intel/iommu.c

  5455  
  5456  const struct iommu_ops intel_iommu_ops = {
  5457  .capable= intel_iommu_capable,
  5458  .domain_alloc   = intel_iommu_domain_alloc,
  5459  .domain_free= intel_iommu_domain_free,
  5460  .domain_get_attr= intel_iommu_domain_get_attr,
  5461  .domain_set_attr= intel_iommu_domain_set_attr,
  5462  .attach_dev = intel_iommu_attach_device,
  5463  .detach_dev = intel_iommu_detach_device,
  5464  .aux_attach_dev = intel_iommu_aux_attach_device,
  5465  .aux_detach_dev = intel_iommu_aux_detach_device,
  5466  .aux_get_pasid  = intel_iommu_aux_get_pasid,
  5467  .map= intel_iommu_map,
> 5468  .iotlb_sync_map = intel_iommu_iotlb_sync_map,
  5469  .unmap  = intel_iommu_unmap,
  5470  .flush_iotlb_all= intel_flush_iotlb_all,
  5471  .iotlb_sync = intel_iommu_tlb_sync,
  5472  .iova_to_phys   = intel_iommu_iova_to_phys,
  5473  .probe_device   = intel_iommu_probe_device,
  5474  .probe_finalize = intel_iommu_probe_finalize,
  5475  .release_device = intel_iommu_release_device,
  5476  .get_resv_regions   = intel_iommu_get_resv_regions,
  5477  .put_resv_regions   = generic_iommu_put_resv_regions,
  5478  .device_group   = intel_iommu_device_group,
  5479  .dev_has_feat   = intel_iommu_dev_has_feat,
  5480  .dev_feat_enabled   = intel_iommu_dev_feat_enabled,
  5481  .dev_enable_feat= intel_iommu_dev_enable_feat,
  5482  .dev_disable_feat   = intel_iommu_dev_disable_feat,
  5483  .is_attach_deferred = intel_iommu_is_attach_deferred,
  5484  .def_domain_type= device_def_domain_type,
  5485  .pgsize_bitmap  = INTEL_IOMMU_PGSIZES,
  5486  #ifdef CONFIG_INTEL_IOMMU_SVM
  5487  .cache_invalidate   = intel_iommu_sva_invalidate,
  5488  .sva_bind_gpasid= intel_svm_bind_gpasid,
  5489  .sva_unbind_gpasid  = intel_svm_unbind_gpasid,
  5490  .sva_bind   = intel_svm_bind,
  5491  .sva_unbind = intel_svm_unbind,
  5492  .sva_get_pasid  = intel_svm_get_pasid,
  5493  .page_response  = intel_svm_page_response,
  5494  #endif
  5495  };
  5496  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v12 01/13] vfio: VFIO_IOMMU_SET_PASID_TABLE

2021-02-23 Thread kernel test robot
Hi Eric,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on v5.11]
[also build test ERROR on next-20210223]
[cannot apply to vfio/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
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20210224-051641
base:f40ddce88593482919761f74910f42f4b84c004b
config: x86_64-randconfig-s021-20210223 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-229-g60c1f270-dirty
# 
https://github.com/0day-ci/linux/commit/3bb0b5b270edf8c80af65a89749296990f9b9213
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20210224-051641
git checkout 3bb0b5b270edf8c80af65a89749296990f9b9213
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

   In file included from :32:
>> ./usr/include/linux/vfio.h:1198:34: error: field 'config' has incomplete type
1198 |  struct iommu_pasid_table_config config; /* used on SET */
 |  ^~

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v12 01/13] vfio: VFIO_IOMMU_SET_PASID_TABLE

2021-02-23 Thread kernel test robot
Hi Eric,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on v5.11]
[also build test ERROR on next-20210223]
[cannot apply to vfio/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
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20210224-051641
base:f40ddce88593482919761f74910f42f4b84c004b
config: arm64-randconfig-r003-20210223 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 
c9439ca36342fb6013187d0a69aef92736951476)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# 
https://github.com/0day-ci/linux/commit/3bb0b5b270edf8c80af65a89749296990f9b9213
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20210224-051641
git checkout 3bb0b5b270edf8c80af65a89749296990f9b9213
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

   In file included from drivers/vfio/vfio.c:32:
   In file included from include/linux/vfio.h:16:
>> include/uapi/linux/vfio.h:1198:34: error: field has incomplete type 'struct 
>> iommu_pasid_table_config'
   struct iommu_pasid_table_config config; /* used on SET */
   ^
   include/uapi/linux/vfio.h:1198:9: note: forward declaration of 'struct 
iommu_pasid_table_config'
   struct iommu_pasid_table_config config; /* used on SET */
  ^
   1 error generated.
--
   In file included from drivers/vfio/vfio_iommu_type1.c:36:
   In file included from include/linux/vfio.h:16:
>> include/uapi/linux/vfio.h:1198:34: error: field has incomplete type 'struct 
>> iommu_pasid_table_config'
   struct iommu_pasid_table_config config; /* used on SET */
   ^
   include/uapi/linux/vfio.h:1198:9: note: forward declaration of 'struct 
iommu_pasid_table_config'
   struct iommu_pasid_table_config config; /* used on SET */
  ^
>> drivers/vfio/vfio_iommu_type1.c:2597:3: error: implicit declaration of 
>> function 'iommu_detach_pasid_table' [-Werror,-Wimplicit-function-declaration]
   iommu_detach_pasid_table(d->domain);
   ^
   drivers/vfio/vfio_iommu_type1.c:2597:3: note: did you mean 
'vfio_detach_pasid_table'?
   drivers/vfio/vfio_iommu_type1.c:2591:1: note: 'vfio_detach_pasid_table' 
declared here
   vfio_detach_pasid_table(struct vfio_iommu *iommu)
   ^
>> drivers/vfio/vfio_iommu_type1.c:2611:9: error: implicit declaration of 
>> function 'iommu_uapi_attach_pasid_table' 
>> [-Werror,-Wimplicit-function-declaration]
   ret = iommu_uapi_attach_pasid_table(d->domain, (void __user 
*)arg);
 ^
   drivers/vfio/vfio_iommu_type1.c:2614:5: error: implicit declaration of 
function 'iommu_detach_pasid_table' [-Werror,-Wimplicit-function-declaration]
   iommu_detach_pasid_table(d->domain);
   ^
   4 errors generated.


vim +1198 include/uapi/linux/vfio.h

  1184  
  1185  /*
  1186   * VFIO_IOMMU_SET_PASID_TABLE - _IOWR(VFIO_TYPE, VFIO_BASE + 18,
  1187   *  struct vfio_iommu_type1_set_pasid_table)
  1188   *
  1189   * The SET operation passes a PASID table to the host while the
  1190   * UNSET operation detaches the one currently programmed. Setting
  1191   * a table while another is already programmed replaces the old table.
  1192   */
  1193  struct vfio_iommu_type1_set_pasid_table {
  1194  __u32   argsz;
  1195  __u32   flags;
  1196  #define VFIO_PASID_TABLE_FLAG_SET   (1 << 0)
  1197  #define VFIO_PASID_TABLE_FLAG_UNSET (1 << 1)
> 1198  struct iommu_pasid_table_config config; /* used on SET */
  1199  };
  1200  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v12 03/13] vfio: VFIO_IOMMU_SET_MSI_BINDING

2021-02-23 Thread kernel test robot
Hi Eric,

I love your patch! Yet something to improve:

[auto build test ERROR on v5.11]
[cannot apply to vfio/next next-20210223]
[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/Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20210224-051641
base:f40ddce88593482919761f74910f42f4b84c004b
config: arm64-randconfig-r003-20210223 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 
c9439ca36342fb6013187d0a69aef92736951476)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# 
https://github.com/0day-ci/linux/commit/ec823a68d862693dc787422f168409996f43b10a
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20210224-051641
git checkout ec823a68d862693dc787422f168409996f43b10a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

   In file included from drivers/vfio/vfio_iommu_type1.c:36:
   In file included from include/linux/vfio.h:16:
   include/uapi/linux/vfio.h:1198:34: error: field has incomplete type 'struct 
iommu_pasid_table_config'
   struct iommu_pasid_table_config config; /* used on SET */
   ^
   include/uapi/linux/vfio.h:1198:9: note: forward declaration of 'struct 
iommu_pasid_table_config'
   struct iommu_pasid_table_config config; /* used on SET */
  ^
   drivers/vfio/vfio_iommu_type1.c:2625:3: error: implicit declaration of 
function 'iommu_detach_pasid_table' [-Werror,-Wimplicit-function-declaration]
   iommu_detach_pasid_table(d->domain);
   ^
   drivers/vfio/vfio_iommu_type1.c:2625:3: note: did you mean 
'vfio_detach_pasid_table'?
   drivers/vfio/vfio_iommu_type1.c:2619:1: note: 'vfio_detach_pasid_table' 
declared here
   vfio_detach_pasid_table(struct vfio_iommu *iommu)
   ^
   drivers/vfio/vfio_iommu_type1.c:2639:9: error: implicit declaration of 
function 'iommu_uapi_attach_pasid_table' 
[-Werror,-Wimplicit-function-declaration]
   ret = iommu_uapi_attach_pasid_table(d->domain, (void __user 
*)arg);
 ^
   drivers/vfio/vfio_iommu_type1.c:2642:5: error: implicit declaration of 
function 'iommu_detach_pasid_table' [-Werror,-Wimplicit-function-declaration]
   iommu_detach_pasid_table(d->domain);
   ^
>> drivers/vfio/vfio_iommu_type1.c:2668:9: error: implicit declaration of 
>> function 'iommu_bind_guest_msi' [-Werror,-Wimplicit-function-declaration]
   ret = iommu_bind_guest_msi(d->domain, giova, gpa, size);
 ^
>> drivers/vfio/vfio_iommu_type1.c:2675:3: error: implicit declaration of 
>> function 'iommu_unbind_guest_msi' [-Werror,-Wimplicit-function-declaration]
   iommu_unbind_guest_msi(d->domain, giova);
   ^
   drivers/vfio/vfio_iommu_type1.c:2689:3: error: implicit declaration of 
function 'iommu_unbind_guest_msi' [-Werror,-Wimplicit-function-declaration]
   iommu_unbind_guest_msi(d->domain, giova);
   ^
   7 errors generated.


vim +/iommu_bind_guest_msi +2668 drivers/vfio/vfio_iommu_type1.c

  2617  
  2618  static void
> 2619  vfio_detach_pasid_table(struct vfio_iommu *iommu)
  2620  {
  2621  struct vfio_domain *d;
  2622  
  2623  mutex_lock(&iommu->lock);
  2624  list_for_each_entry(d, &iommu->domain_list, next)
  2625  iommu_detach_pasid_table(d->domain);
  2626  
  2627  mutex_unlock(&iommu->lock);
  2628  }
  2629  
  2630  static int
  2631  vfio_attach_pasid_table(struct vfio_iommu *iommu, unsigned long arg)
  2632  {
  2633  struct vfio_domain *d;
  2634  int ret = 0;
  2635  
  2636  mutex_lock(&iommu->lock);
  2637  
  2638  list_for_each_entry(d, &iommu->domain_list, next) {
> 2639  ret = iommu_uapi_attach_pasid_table(d->domain, (void 
> __user *)arg);
  2640  if (ret) {
  2641  list_for_each_entry_continue_reverse(d, 
&iommu->d

Re: [PATCH v12 01/13] vfio: VFIO_IOMMU_SET_PASID_TABLE

2021-02-23 Thread kernel test robot
Hi Eric,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on v5.11]
[also build test ERROR on next-20210223]
[cannot apply to vfio/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
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20210224-051641
base:f40ddce88593482919761f74910f42f4b84c004b
config: i386-randconfig-s001-20210223 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-229-g60c1f270-dirty
# 
https://github.com/0day-ci/linux/commit/3bb0b5b270edf8c80af65a89749296990f9b9213
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20210224-051641
git checkout 3bb0b5b270edf8c80af65a89749296990f9b9213
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

   In file included from include/linux/vfio.h:16,
from drivers/gpu/drm/i915/gvt/dmabuf.h:33,
from :
>> include/uapi/linux/vfio.h:1198:34: error: field 'config' has incomplete type
1198 |  struct iommu_pasid_table_config config; /* used on SET */
 |  ^~


vim +/config +1198 include/uapi/linux/vfio.h

  1184  
  1185  /*
  1186   * VFIO_IOMMU_SET_PASID_TABLE - _IOWR(VFIO_TYPE, VFIO_BASE + 18,
  1187   *  struct vfio_iommu_type1_set_pasid_table)
  1188   *
  1189   * The SET operation passes a PASID table to the host while the
  1190   * UNSET operation detaches the one currently programmed. Setting
  1191   * a table while another is already programmed replaces the old table.
  1192   */
  1193  struct vfio_iommu_type1_set_pasid_table {
  1194  __u32   argsz;
  1195  __u32   flags;
  1196  #define VFIO_PASID_TABLE_FLAG_SET   (1 << 0)
  1197  #define VFIO_PASID_TABLE_FLAG_UNSET (1 << 1)
> 1198  struct iommu_pasid_table_config config; /* used on SET */
  1199  };
  1200  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH 1/4] iommu/vt-d: Enable write protect for supervisor SVM

2021-03-04 Thread kernel test robot
Hi Jacob,

I love your patch! Yet something to improve:

[auto build test ERROR on iommu/next]
[also build test ERROR on linux/master linus/master v5.12-rc1 next-20210303]
[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/Jacob-Pan/Misc-vSVA-fixes-for-VT-d/20210219-141141
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: ia64-randconfig-r023-20210304 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# 
https://github.com/0day-ci/linux/commit/4c1de3403ecb6f91cc1bdc5e3ca81f16a2ffc0b5
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Jacob-Pan/Misc-vSVA-fixes-for-VT-d/20210219-141141
git checkout 4c1de3403ecb6f91cc1bdc5e3ca81f16a2ffc0b5
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross 
ARCH=ia64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

   In file included from arch/ia64/include/asm/pgtable.h:154,
from include/linux/pgtable.h:6,
from include/linux/mm.h:33,
from include/linux/scatterlist.h:8,
from include/linux/dma-mapping.h:10,
from include/linux/iova.h:16,
from include/linux/intel-iommu.h:14,
from drivers/iommu/intel/pasid.c:15:
   arch/ia64/include/asm/mmu_context.h: In function 'reload_context':
   arch/ia64/include/asm/mmu_context.h:127:41: warning: variable 'old_rr4' set 
but not used [-Wunused-but-set-variable]
 127 |  unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
 | ^~~
   drivers/iommu/intel/pasid.c: In function 'pasid_enable_wpe':
>> drivers/iommu/intel/pasid.c:536:22: error: implicit declaration of function 
>> 'read_cr0' [-Werror=implicit-function-declaration]
 536 |  unsigned long cr0 = read_cr0();
 |  ^~~~
   In file included from include/linux/build_bug.h:5,
from include/linux/bits.h:22,
from include/linux/bitops.h:6,
from drivers/iommu/intel/pasid.c:12:
>> drivers/iommu/intel/pasid.c:539:23: error: 'X86_CR0_WP' undeclared (first 
>> use in this function)
 539 |  if (unlikely(!(cr0 & X86_CR0_WP))) {
 |   ^~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
  78 | # define unlikely(x) __builtin_expect(!!(x), 0)
 |  ^
   drivers/iommu/intel/pasid.c:539:23: note: each undeclared identifier is 
reported only once for each function it appears in
 539 |  if (unlikely(!(cr0 & X86_CR0_WP))) {
 |   ^~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
  78 | # define unlikely(x) __builtin_expect(!!(x), 0)
 |  ^
   cc1: some warnings being treated as errors


vim +/read_cr0 +536 drivers/iommu/intel/pasid.c

   533  
   534  static inline int pasid_enable_wpe(struct pasid_entry *pte)
   535  {
 > 536  unsigned long cr0 = read_cr0();
   537  
   538  /* CR0.WP is normally set but just to be sure */
 > 539  if (unlikely(!(cr0 & X86_CR0_WP))) {
   540  pr_err_ratelimited("No CPU write protect!\n");
   541  return -EINVAL;
   542  }
   543  pasid_set_wpe(pte);
   544  
   545  return 0;
   546  };
   547  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v13 01/13] vfio: VFIO_IOMMU_SET_PASID_TABLE

2021-04-11 Thread kernel test robot
Hi Eric,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on v5.12-rc6]
[also build test ERROR on next-20210409]
[cannot apply to vfio/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
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20210411-195216
base:e49d033bddf5b565044e2abe4241353959bc9120
config: arm-randconfig-r003-20210411 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 
9829f5e6b1bca9b61efc629770d28bb9014dec45)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# 
https://github.com/0day-ci/linux/commit/0af9db19db29eb2a707b9e1ca4ff9e1a08a1c511
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20210411-195216
git checkout 0af9db19db29eb2a707b9e1ca4ff9e1a08a1c511
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

   In file included from drivers/vfio/vfio.c:32:
   In file included from include/linux/vfio.h:16:
>> include/uapi/linux/vfio.h:1226:34: error: field has incomplete type 'struct 
>> iommu_pasid_table_config'
   struct iommu_pasid_table_config config; /* used on SET */
   ^
   include/uapi/linux/vfio.h:1226:9: note: forward declaration of 'struct 
iommu_pasid_table_config'
   struct iommu_pasid_table_config config; /* used on SET */
  ^
   1 error generated.


vim +1226 include/uapi/linux/vfio.h

  1211  
  1212  /*
  1213   * VFIO_IOMMU_SET_PASID_TABLE - _IOWR(VFIO_TYPE, VFIO_BASE + 18,
  1214   *  struct vfio_iommu_type1_set_pasid_table)
  1215   *
  1216   * The SET operation passes a PASID table to the host while the
  1217   * UNSET operation detaches the one currently programmed. It is
  1218   * allowed to "SET" the table several times without unsetting as
  1219   * long as the table config does not stay IOMMU_PASID_CONFIG_TRANSLATE.
  1220   */
  1221  struct vfio_iommu_type1_set_pasid_table {
  1222  __u32   argsz;
  1223  __u32   flags;
  1224  #define VFIO_PASID_TABLE_FLAG_SET   (1 << 0)
  1225  #define VFIO_PASID_TABLE_FLAG_UNSET (1 << 1)
> 1226  struct iommu_pasid_table_config config; /* used on SET */
  1227  };
  1228  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v13 01/13] vfio: VFIO_IOMMU_SET_PASID_TABLE

2021-04-11 Thread kernel test robot
Hi Eric,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on v5.12-rc6]
[also build test ERROR on next-20210409]
[cannot apply to vfio/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
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20210411-195216
base:e49d033bddf5b565044e2abe4241353959bc9120
config: i386-randconfig-s001-20210411 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-279-g6d5d9b42-dirty
# 
https://github.com/0day-ci/linux/commit/0af9db19db29eb2a707b9e1ca4ff9e1a08a1c511
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20210411-195216
git checkout 0af9db19db29eb2a707b9e1ca4ff9e1a08a1c511
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

   In file included from include/linux/vfio.h:16,
from drivers/vfio/vfio.c:32:
>> include/uapi/linux/vfio.h:1226:34: error: field 'config' has incomplete type
1226 |  struct iommu_pasid_table_config config; /* used on SET */
 |  ^~
--
   In file included from include/linux/vfio.h:16,
from drivers/vfio/vfio_iommu_type1.c:37:
>> include/uapi/linux/vfio.h:1226:34: error: field 'config' has incomplete type
1226 |  struct iommu_pasid_table_config config; /* used on SET */
 |  ^~
   drivers/vfio/vfio_iommu_type1.c: In function 'vfio_detach_pasid_table':
>> drivers/vfio/vfio_iommu_type1.c:2844:3: error: implicit declaration of 
>> function 'iommu_detach_pasid_table'; did you mean 'vfio_detach_pasid_table'? 
>> [-Werror=implicit-function-declaration]
2844 |   iommu_detach_pasid_table(d->domain);
 |   ^~~~
 |   vfio_detach_pasid_table
   drivers/vfio/vfio_iommu_type1.c: In function 'vfio_attach_pasid_table':
>> drivers/vfio/vfio_iommu_type1.c:2858:9: error: implicit declaration of 
>> function 'iommu_uapi_attach_pasid_table'; did you mean 
>> 'vfio_attach_pasid_table'? [-Werror=implicit-function-declaration]
2858 |   ret = iommu_uapi_attach_pasid_table(d->domain, (void __user *)arg);
 | ^
 | vfio_attach_pasid_table
   cc1: some warnings being treated as errors


vim +/config +1226 include/uapi/linux/vfio.h

  1211  
  1212  /*
  1213   * VFIO_IOMMU_SET_PASID_TABLE - _IOWR(VFIO_TYPE, VFIO_BASE + 18,
  1214   *  struct vfio_iommu_type1_set_pasid_table)
  1215   *
  1216   * The SET operation passes a PASID table to the host while the
  1217   * UNSET operation detaches the one currently programmed. It is
  1218   * allowed to "SET" the table several times without unsetting as
  1219   * long as the table config does not stay IOMMU_PASID_CONFIG_TRANSLATE.
  1220   */
  1221  struct vfio_iommu_type1_set_pasid_table {
  1222  __u32   argsz;
  1223  __u32   flags;
  1224  #define VFIO_PASID_TABLE_FLAG_SET   (1 << 0)
  1225  #define VFIO_PASID_TABLE_FLAG_UNSET (1 << 1)
> 1226  struct iommu_pasid_table_config config; /* used on SET */
  1227  };
  1228  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v13 03/13] vfio: VFIO_IOMMU_SET_MSI_BINDING

2021-04-11 Thread kernel test robot
Hi Eric,

I love your patch! Yet something to improve:

[auto build test ERROR on v5.12-rc6]
[also build test ERROR on next-20210409]
[cannot apply to vfio/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
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20210411-195216
base:e49d033bddf5b565044e2abe4241353959bc9120
config: i386-randconfig-s001-20210411 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-279-g6d5d9b42-dirty
# 
https://github.com/0day-ci/linux/commit/8a9991f0409cae6af9a387b8b90dbb7ad004f590
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20210411-195216
git checkout 8a9991f0409cae6af9a387b8b90dbb7ad004f590
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

   In file included from include/linux/vfio.h:16,
from drivers/vfio/vfio_iommu_type1.c:37:
   include/uapi/linux/vfio.h:1226:34: error: field 'config' has incomplete type
1226 |  struct iommu_pasid_table_config config; /* used on SET */
 |  ^~
   drivers/vfio/vfio_iommu_type1.c: In function 'vfio_detach_pasid_table':
   drivers/vfio/vfio_iommu_type1.c:2872:3: error: implicit declaration of 
function 'iommu_detach_pasid_table'; did you mean 'vfio_detach_pasid_table'? 
[-Werror=implicit-function-declaration]
2872 |   iommu_detach_pasid_table(d->domain);
 |   ^~~~
 |   vfio_detach_pasid_table
   drivers/vfio/vfio_iommu_type1.c: In function 'vfio_attach_pasid_table':
   drivers/vfio/vfio_iommu_type1.c:2886:9: error: implicit declaration of 
function 'iommu_uapi_attach_pasid_table'; did you mean 
'vfio_attach_pasid_table'? [-Werror=implicit-function-declaration]
2886 |   ret = iommu_uapi_attach_pasid_table(d->domain, (void __user *)arg);
 | ^
 | vfio_attach_pasid_table
   drivers/vfio/vfio_iommu_type1.c: In function 'vfio_bind_msi':
>> drivers/vfio/vfio_iommu_type1.c:2915:9: error: implicit declaration of 
>> function 'iommu_bind_guest_msi' [-Werror=implicit-function-declaration]
2915 |   ret = iommu_bind_guest_msi(d->domain, giova, gpa, size);
 | ^~~~
>> drivers/vfio/vfio_iommu_type1.c:2922:3: error: implicit declaration of 
>> function 'iommu_unbind_guest_msi' [-Werror=implicit-function-declaration]
2922 |   iommu_unbind_guest_msi(d->domain, giova);
 |   ^~
   cc1: some warnings being treated as errors


vim +/iommu_bind_guest_msi +2915 drivers/vfio/vfio_iommu_type1.c

  2904  
  2905  static int
  2906  vfio_bind_msi(struct vfio_iommu *iommu,
  2907dma_addr_t giova, phys_addr_t gpa, size_t size)
  2908  {
  2909  struct vfio_domain *d;
  2910  int ret = 0;
  2911  
  2912  mutex_lock(&iommu->lock);
  2913  
  2914  list_for_each_entry(d, &iommu->domain_list, next) {
> 2915  ret = iommu_bind_guest_msi(d->domain, giova, gpa, size);
  2916  if (ret)
  2917  goto unwind;
  2918  }
  2919  goto unlock;
  2920  unwind:
  2921  list_for_each_entry_continue_reverse(d, &iommu->domain_list, 
next) {
> 2922  iommu_unbind_guest_msi(d->domain, giova);
  2923  }
  2924  unlock:
  2925  mutex_unlock(&iommu->lock);
  2926  return ret;
  2927  }
  2928  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH 1/2] iommu/sva: Tighten SVA bind API with explicit flags

2021-04-13 Thread kernel test robot
Hi Jacob,

I love your patch! Yet something to improve:

[auto build test ERROR on vkoul-dmaengine/next]
[also build test ERROR on char-misc/char-misc-testing v5.12-rc7]
[cannot apply to iommu/next next-20210413]
[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/Jacob-Pan/iommu-sva-Tighten-SVA-bind-API-with-explicit-flags/20210409-094521
base:   https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git next
config: x86_64-randconfig-a016-20200531 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# 
https://github.com/0day-ci/linux/commit/3b009446e2f451c401cff7a6d4766424acbcc890
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Jacob-Pan/iommu-sva-Tighten-SVA-bind-API-with-explicit-flags/20210409-094521
git checkout 3b009446e2f451c401cff7a6d4766424acbcc890
# 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 

All errors (new ones prefixed by >>):

   drivers/dma/idxd/init.c: In function 'idxd_enable_system_pasid':
>> drivers/dma/idxd/init.c:307:10: error: 'IOMMU_SVA_BIND_SUPERVISOR' 
>> undeclared (first use in this function)
 307 |  flags = IOMMU_SVA_BIND_SUPERVISOR;
 |  ^
   drivers/dma/idxd/init.c:307:10: note: each undeclared identifier is reported 
only once for each function it appears in


vim +/IOMMU_SVA_BIND_SUPERVISOR +307 drivers/dma/idxd/init.c

   300  
   301  static int idxd_enable_system_pasid(struct idxd_device *idxd)
   302  {
   303  unsigned int flags;
   304  unsigned int pasid;
   305  struct iommu_sva *sva;
   306  
 > 307  flags = IOMMU_SVA_BIND_SUPERVISOR;
   308  
   309  sva = iommu_sva_bind_device(&idxd->pdev->dev, NULL, flags);
   310  if (IS_ERR(sva)) {
   311  dev_warn(&idxd->pdev->dev,
   312   "iommu sva bind failed: %ld\n", PTR_ERR(sva));
   313  return PTR_ERR(sva);
   314  }
   315  
   316  pasid = iommu_sva_get_pasid(sva);
   317  if (pasid == IOMMU_PASID_INVALID) {
   318  iommu_sva_unbind_device(sva);
   319  return -ENODEV;
   320  }
   321  
   322  idxd->sva = sva;
   323  idxd->pasid = pasid;
   324  dev_dbg(&idxd->pdev->dev, "system pasid: %u\n", pasid);
   325  return 0;
   326  }
   327  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH 1/2] iommu/sva: Tighten SVA bind API with explicit flags

2021-04-13 Thread kernel test robot
Hi Jacob,

I love your patch! Yet something to improve:

[auto build test ERROR on vkoul-dmaengine/next]
[also build test ERROR on char-misc/char-misc-testing v5.12-rc7]
[cannot apply to iommu/next next-20210413]
[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/Jacob-Pan/iommu-sva-Tighten-SVA-bind-API-with-explicit-flags/20210409-094521
base:   https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git next
config: x86_64-randconfig-a016-20210413 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 
9829f5e6b1bca9b61efc629770d28bb9014dec45)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -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
# 
https://github.com/0day-ci/linux/commit/3b009446e2f451c401cff7a6d4766424acbcc890
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Jacob-Pan/iommu-sva-Tighten-SVA-bind-API-with-explicit-flags/20210409-094521
git checkout 3b009446e2f451c401cff7a6d4766424acbcc890
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

>> drivers/dma/idxd/init.c:307:10: error: use of undeclared identifier 
>> 'IOMMU_SVA_BIND_SUPERVISOR'
   flags = IOMMU_SVA_BIND_SUPERVISOR;
   ^
   drivers/dma/idxd/init.c:422:30: warning: shift count >= width of type 
[-Wshift-count-overflow]
   rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
   ^~~~
   include/linux/dma-mapping.h:76:54: note: expanded from macro 'DMA_BIT_MASK'
   #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
   drivers/dma/idxd/init.c:428:41: warning: shift count >= width of type 
[-Wshift-count-overflow]
   rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
  ^~~~
   include/linux/dma-mapping.h:76:54: note: expanded from macro 'DMA_BIT_MASK'
   #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
   2 warnings and 1 error generated.


vim +/IOMMU_SVA_BIND_SUPERVISOR +307 drivers/dma/idxd/init.c

   300  
   301  static int idxd_enable_system_pasid(struct idxd_device *idxd)
   302  {
   303  unsigned int flags;
   304  unsigned int pasid;
   305  struct iommu_sva *sva;
   306  
 > 307  flags = IOMMU_SVA_BIND_SUPERVISOR;
   308  
   309  sva = iommu_sva_bind_device(&idxd->pdev->dev, NULL, flags);
   310  if (IS_ERR(sva)) {
   311  dev_warn(&idxd->pdev->dev,
   312   "iommu sva bind failed: %ld\n", PTR_ERR(sva));
   313  return PTR_ERR(sva);
   314  }
   315  
   316  pasid = iommu_sva_get_pasid(sva);
   317  if (pasid == IOMMU_PASID_INVALID) {
   318  iommu_sva_unbind_device(sva);
   319  return -ENODEV;
   320  }
   321  
   322  idxd->sva = sva;
   323  idxd->pasid = pasid;
   324  dev_dbg(&idxd->pdev->dev, "system pasid: %u\n", pasid);
   325  return 0;
   326  }
   327  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v3 2/2] iommu/sva: Remove mm parameter from SVA bind API

2021-04-16 Thread kernel test robot
Hi Jacob,

I love your patch! Yet something to improve:

[auto build test ERROR on e49d033bddf5b565044e2abe4241353959bc9120]

url:
https://github.com/0day-ci/linux/commits/Jacob-Pan/Simplify-and-restrict-IOMMU-SVA-APIs/20210417-052451
base:   e49d033bddf5b565044e2abe4241353959bc9120
config: arm64-randconfig-r022-20210416 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# 
https://github.com/0day-ci/linux/commit/6d85fee95bdcd7e53f10442ddc71d0c310d43367
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Jacob-Pan/Simplify-and-restrict-IOMMU-SVA-APIs/20210417-052451
git checkout 6d85fee95bdcd7e53f10442ddc71d0c310d43367
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 
ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

>> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:2631:15: error: initialization 
>> of 'struct iommu_sva * (*)(struct device *, unsigned int)' from incompatible 
>> pointer type 'struct iommu_sva * (*)(struct device *, struct mm_struct *, 
>> unsigned int)' [-Werror=incompatible-pointer-types]
2631 |  .sva_bind  = arm_smmu_sva_bind,
 |   ^
   drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:2631:15: note: (near 
initialization for 'arm_smmu_ops.sva_bind')
   cc1: some warnings being treated as errors


vim +2631 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c

f534d98b9d2705 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c Jean-Philippe 
Brucker 2020-09-18  2608  
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon  
 2015-05-27  2609  static struct iommu_ops arm_smmu_ops = {
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon  
 2015-05-27  2610   .capable= arm_smmu_capable,
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon  
 2015-05-27  2611   .domain_alloc   = arm_smmu_domain_alloc,
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon  
 2015-05-27  2612   .domain_free= arm_smmu_domain_free,
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon  
 2015-05-27  2613   .attach_dev = arm_smmu_attach_dev,
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon  
 2015-05-27  2614   .map= arm_smmu_map,
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon  
 2015-05-27  2615   .unmap  = arm_smmu_unmap,
07fdef34d2be68 drivers/iommu/arm-smmu-v3.c Zhen Lei 
 2018-09-20  2616   .flush_iotlb_all= arm_smmu_flush_iotlb_all,
32b124492bdf97 drivers/iommu/arm-smmu-v3.c Robin Murphy 
 2017-09-28  2617   .iotlb_sync = arm_smmu_iotlb_sync,
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon  
 2015-05-27  2618   .iova_to_phys   = arm_smmu_iova_to_phys,
cefa0d55da3753 drivers/iommu/arm-smmu-v3.c Joerg Roedel 
 2020-04-29  2619   .probe_device   = arm_smmu_probe_device,
cefa0d55da3753 drivers/iommu/arm-smmu-v3.c Joerg Roedel 
 2020-04-29  2620   .release_device = arm_smmu_release_device,
08d4ca2a672bab drivers/iommu/arm-smmu-v3.c Robin Murphy 
 2016-09-12  2621   .device_group   = arm_smmu_device_group,
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon  
 2015-05-27  2622   .domain_get_attr= arm_smmu_domain_get_attr,
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon  
 2015-05-27  2623   .domain_set_attr= arm_smmu_domain_set_attr,
8f78515425daea drivers/iommu/arm-smmu-v3.c Robin Murphy 
 2016-09-12  2624   .of_xlate   = arm_smmu_of_xlate,
50019f09a4baa0 drivers/iommu/arm-smmu-v3.c Eric Auger   
 2017-01-19  2625   .get_resv_regions   = arm_smmu_get_resv_regions,
a66c5dc549d1e1 drivers/iommu/arm-smmu-v3.c Thierry Reding   
 2019-12-18  2626   .put_resv_regions   = 
generic_iommu_put_resv_regions,
f534d98b9d2705 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c Jean-Philippe 
Brucker 2020-09-18  2627   .dev_has_feat   = 
arm_smmu_dev_has_feature,
f534d98b9d2705 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c Jean-Philippe 
Brucker 2020-09-18  2628   .dev_feat_enabled   = 
arm_smmu_dev_feature_enabl

Re: [PATCH v3 2/2] iommu/sva: Remove mm parameter from SVA bind API

2021-04-16 Thread kernel test robot
Hi Jacob,

I love your patch! Yet something to improve:

[auto build test ERROR on e49d033bddf5b565044e2abe4241353959bc9120]

url:
https://github.com/0day-ci/linux/commits/Jacob-Pan/Simplify-and-restrict-IOMMU-SVA-APIs/20210417-052451
base:   e49d033bddf5b565044e2abe4241353959bc9120
config: arm64-randconfig-r034-20210416 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 
f549176ad976caa3e19edd036df9a7e12770af7c)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# 
https://github.com/0day-ci/linux/commit/6d85fee95bdcd7e53f10442ddc71d0c310d43367
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Jacob-Pan/Simplify-and-restrict-IOMMU-SVA-APIs/20210417-052451
git checkout 6d85fee95bdcd7e53f10442ddc71d0c310d43367
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 
ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

>> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:2631:15: error: incompatible 
>> function pointer types initializing 'struct iommu_sva *(*)(struct device *, 
>> unsigned int)' with an expression of type 'struct iommu_sva *(struct device 
>> *, struct mm_struct *, unsigned int)' 
>> [-Werror,-Wincompatible-function-pointer-types]
   .sva_bind   = arm_smmu_sva_bind,
 ^
   1 error generated.


vim +2631 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c

f534d98b9d2705 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c Jean-Philippe 
Brucker 2020-09-18  2608  
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon  
 2015-05-27  2609  static struct iommu_ops arm_smmu_ops = {
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon  
 2015-05-27  2610   .capable= arm_smmu_capable,
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon  
 2015-05-27  2611   .domain_alloc   = arm_smmu_domain_alloc,
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon  
 2015-05-27  2612   .domain_free= arm_smmu_domain_free,
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon  
 2015-05-27  2613   .attach_dev = arm_smmu_attach_dev,
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon  
 2015-05-27  2614   .map= arm_smmu_map,
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon  
 2015-05-27  2615   .unmap  = arm_smmu_unmap,
07fdef34d2be68 drivers/iommu/arm-smmu-v3.c Zhen Lei 
 2018-09-20  2616   .flush_iotlb_all= arm_smmu_flush_iotlb_all,
32b124492bdf97 drivers/iommu/arm-smmu-v3.c Robin Murphy 
 2017-09-28  2617   .iotlb_sync = arm_smmu_iotlb_sync,
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon  
 2015-05-27  2618   .iova_to_phys   = arm_smmu_iova_to_phys,
cefa0d55da3753 drivers/iommu/arm-smmu-v3.c Joerg Roedel 
 2020-04-29  2619   .probe_device   = arm_smmu_probe_device,
cefa0d55da3753 drivers/iommu/arm-smmu-v3.c Joerg Roedel 
 2020-04-29  2620   .release_device = arm_smmu_release_device,
08d4ca2a672bab drivers/iommu/arm-smmu-v3.c Robin Murphy 
 2016-09-12  2621   .device_group   = arm_smmu_device_group,
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon  
 2015-05-27  2622   .domain_get_attr= arm_smmu_domain_get_attr,
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon  
 2015-05-27  2623   .domain_set_attr= arm_smmu_domain_set_attr,
8f78515425daea drivers/iommu/arm-smmu-v3.c Robin Murphy 
 2016-09-12  2624   .of_xlate   = arm_smmu_of_xlate,
50019f09a4baa0 drivers/iommu/arm-smmu-v3.c Eric Auger   
 2017-01-19  2625   .get_resv_regions   = arm_smmu_get_resv_regions,
a66c5dc549d1e1 drivers/iommu/arm-smmu-v3.c Thierry Reding   
 2019-12-18  2626   .put_resv_regions   = 
generic_iommu_put_resv_regions,
f534d98b9d2705 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c Jean-Philippe 
Brucker 2020-09-18  2627   .dev_has_feat   = 
arm_smmu_dev_has_feature,
f534d98b9d2705 drivers/iommu/arm/arm-smmu-

Re: [PATCH v3 02/10] iommu/dma: Introduce generic helper to retrieve RMR info

2021-04-20 Thread kernel test robot
Hi Shameer,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on pm/linux-next]
[also build test WARNING on arm/for-next soc/for-next arm64/for-next/core 
linus/master v5.12-rc8]
[cannot apply to iommu/next xlnx/master next-20210420]
[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/Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20210420-173125
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git 
linux-next
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# 
https://github.com/0day-ci/linux/commit/c68d4ba37ecc2173a2dc418799e23a184685d681
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20210420-173125
git checkout c68d4ba37ecc2173a2dc418799e23a184685d681
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 
ARCH=arc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>):

   In file included from drivers/gpu/drm/exynos/exynos_drm_dma.c:7:
>> include/linux/dma-iommu.h:92:31: warning: 'struct fwnode_handle' declared 
>> inside parameter list will not be visible outside of this definition or 
>> declaration
  92 | int iommu_dma_get_rmrs(struct fwnode_handle *iommu, struct list_head 
*list);
 |   ^
   include/linux/dma-iommu.h:93:1: error: expected identifier or '(' before '{' 
token
  93 | {
 | ^


vim +92 include/linux/dma-iommu.h

91  
  > 92  int iommu_dma_get_rmrs(struct fwnode_handle *iommu, struct list_head 
*list);
93  {
94  return 0;
95  }
96  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v3 04/10] iommu/dma: Add a helper function to reserve RMRs for IOMMU drivers

2021-04-20 Thread kernel test robot
Hi Shameer,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on pm/linux-next]
[also build test WARNING on arm/for-next soc/for-next arm64/for-next/core 
linus/master v5.12-rc8]
[cannot apply to iommu/next xlnx/master next-20210420]
[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/Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20210420-173125
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git 
linux-next
config: m68k-randconfig-m031-20210420 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# 
https://github.com/0day-ci/linux/commit/2501962e423895e2e4f126ff5998b226f4803186
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20210420-173125
git checkout 2501962e423895e2e4f126ff5998b226f4803186
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 
ARCH=m68k 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>):

   In file included from drivers/iommu/rockchip-iommu.c:13:
>> include/linux/dma-iommu.h:94:71: warning: 'struct iommu_rmr' declared inside 
>> parameter list will not be visible outside of this definition or declaration
  94 | static void iommu_dma_get_rmr_resv_regions(struct device *dev, 
struct iommu_rmr *rmr,
 |  
 ^
   include/linux/dma-iommu.h:100:1: error: expected identifier or '(' before 
'{' token
 100 | {
 | ^
   In file included from drivers/iommu/rockchip-iommu.c:13:
   include/linux/dma-iommu.h:94:13: warning: 'iommu_dma_get_rmr_resv_regions' 
defined but not used [-Wunused-function]
  94 | static void iommu_dma_get_rmr_resv_regions(struct device *dev, 
struct iommu_rmr *rmr,
 | ^~

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for ADI_AXI_ADC
   Depends on IIO && HAS_IOMEM && OF
   Selected by
   - AD9467 && IIO && SPI


vim +94 include/linux/dma-iommu.h

93  
  > 94  static void iommu_dma_get_rmr_resv_regions(struct device *dev, struct 
iommu_rmr *rmr,
95 struct list_head *list)
96  {
97  }
98  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v3 02/10] iommu/dma: Introduce generic helper to retrieve RMR info

2021-04-20 Thread kernel test robot
Hi Shameer,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on pm/linux-next]
[also build test ERROR on arm/for-next soc/for-next arm64/for-next/core 
linus/master v5.12-rc8]
[cannot apply to iommu/next xlnx/master next-20210420]
[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/Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20210420-173125
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git 
linux-next
config: arm-randconfig-r023-20210420 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 
ca8eef7e3da8f750d7c7aa004fe426d1d34787ea)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# 
https://github.com/0day-ci/linux/commit/c68d4ba37ecc2173a2dc418799e23a184685d681
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20210420-173125
git checkout c68d4ba37ecc2173a2dc418799e23a184685d681
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

   In file included from drivers/iommu/arm/arm-smmu/arm-smmu.c:24:
>> include/linux/dma-iommu.h:93:1: error: expected identifier or '('
   {
   ^
   1 error generated.


vim +93 include/linux/dma-iommu.h

91  
92  int iommu_dma_get_rmrs(struct fwnode_handle *iommu, struct list_head 
*list);
  > 93  {
94  return 0;
95  }
96  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v3 02/10] iommu/dma: Introduce generic helper to retrieve RMR info

2021-04-20 Thread kernel test robot
Hi Shameer,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on pm/linux-next]
[also build test WARNING on arm/for-next soc/for-next arm64/for-next/core 
linus/master v5.12-rc8]
[cannot apply to iommu/next xlnx/master next-20210420]
[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/Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20210420-173125
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git 
linux-next
config: x86_64-randconfig-a002-20210420 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 
ca8eef7e3da8f750d7c7aa004fe426d1d34787ea)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -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
# 
https://github.com/0day-ci/linux/commit/c68d4ba37ecc2173a2dc418799e23a184685d681
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20210420-173125
git checkout c68d4ba37ecc2173a2dc418799e23a184685d681
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 
ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>):

   In file included from drivers/iommu/arm/arm-smmu/qcom_iommu.c:13:
>> include/linux/dma-iommu.h:92:31: warning: declaration of 'struct 
>> fwnode_handle' will not be visible outside of this function [-Wvisibility]
   int iommu_dma_get_rmrs(struct fwnode_handle *iommu, struct list_head *list);
 ^
   include/linux/dma-iommu.h:93:1: error: expected identifier or '('
   {
   ^
   1 warning and 1 error generated.


vim +92 include/linux/dma-iommu.h

91  
  > 92  int iommu_dma_get_rmrs(struct fwnode_handle *iommu, struct list_head 
*list);
93  {
94  return 0;
95  }
96  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v3 10/10] iommu/arm-smmu: Reserve any RMR regions associated with a dev

2021-04-20 Thread kernel test robot
Hi Shameer,

I love your patch! Yet something to improve:

[auto build test ERROR on pm/linux-next]
[also build test ERROR on arm/for-next soc/for-next arm64/for-next/core 
linus/master v5.12-rc8]
[cannot apply to iommu/next xlnx/master next-20210420]
[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/Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20210420-173125
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git 
linux-next
config: arm-randconfig-r023-20210420 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 
ca8eef7e3da8f750d7c7aa004fe426d1d34787ea)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# 
https://github.com/0day-ci/linux/commit/ea2019c2969e4e8f6ec2b0dc2d492f0d05f36cd9
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20210420-173125
git checkout ea2019c2969e4e8f6ec2b0dc2d492f0d05f36cd9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

   In file included from drivers/iommu/arm/arm-smmu/arm-smmu.c:24:
   include/linux/dma-iommu.h:94:71: warning: declaration of 'struct iommu_rmr' 
will not be visible outside of this function [-Wvisibility]
   static void iommu_dma_get_rmr_resv_regions(struct device *dev, struct 
iommu_rmr *rmr,
 ^
   include/linux/dma-iommu.h:100:1: error: expected identifier or '('
   {
   ^
>> drivers/iommu/arm/arm-smmu/arm-smmu.c:1622:39: error: incompatible pointer 
>> types passing 'struct iommu_rmr *' to parameter of type 'struct iommu_rmr *' 
>> [-Werror,-Wincompatible-pointer-types]
   iommu_dma_get_rmr_resv_regions(dev, rmr, head);
   ^~~
   include/linux/dma-iommu.h:94:82: note: passing argument to parameter 'rmr' 
here
   static void iommu_dma_get_rmr_resv_regions(struct device *dev, struct 
iommu_rmr *rmr,

^
   1 warning and 2 errors generated.


vim +1622 drivers/iommu/arm/arm-smmu/arm-smmu.c

  1609  
  1610  static void arm_smmu_rmr_get_resv_regions(struct device *dev,
  1611struct list_head *head)
  1612  {
  1613  struct arm_smmu_master_cfg *cfg = dev_iommu_priv_get(dev);
  1614  struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev);
  1615  struct arm_smmu_device *smmu = cfg->smmu;
  1616  struct iommu_rmr *rmr;
  1617  
  1618  list_for_each_entry(rmr, &smmu->rmr_list, list) {
  1619  if (!arm_smmu_dev_has_rmr(cfg, fwspec, rmr))
  1620  continue;
  1621  
> 1622  iommu_dma_get_rmr_resv_regions(dev, rmr, head);
  1623  }
  1624  }
  1625  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v3 04/10] iommu/dma: Add a helper function to reserve RMRs for IOMMU drivers

2021-04-21 Thread kernel test robot
Hi Shameer,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on pm/linux-next]
[also build test WARNING on arm/for-next soc/for-next arm64/for-next/core 
linus/master v5.12-rc8]
[cannot apply to iommu/next xlnx/master next-20210420]
[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/Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20210420-173125
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git 
linux-next
config: arm-randconfig-r023-20210420 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 
ca8eef7e3da8f750d7c7aa004fe426d1d34787ea)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# 
https://github.com/0day-ci/linux/commit/2501962e423895e2e4f126ff5998b226f4803186
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20210420-173125
git checkout 2501962e423895e2e4f126ff5998b226f4803186
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>):

   In file included from drivers/iommu/arm/arm-smmu/arm-smmu.c:24:
>> include/linux/dma-iommu.h:94:71: warning: declaration of 'struct iommu_rmr' 
>> will not be visible outside of this function [-Wvisibility]
   static void iommu_dma_get_rmr_resv_regions(struct device *dev, struct 
iommu_rmr *rmr,
 ^
   include/linux/dma-iommu.h:100:1: error: expected identifier or '('
   {
   ^
   1 warning and 1 error generated.


vim +94 include/linux/dma-iommu.h

93  
  > 94  static void iommu_dma_get_rmr_resv_regions(struct device *dev, struct 
iommu_rmr *rmr,
95 struct list_head *list)
96  {
97  }
98  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

[RFC PATCH] iova: __init_iova_domain can be static

2021-05-10 Thread kernel test robot
drivers/iommu/iova.c:50:1: warning: symbol '__init_iova_domain' was not 
declared. Should it be static?

Reported-by: kernel test robot 
Signed-off-by: kernel test robot 
---
 iova.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/iova.c b/drivers/iommu/iova.c
index 273a689006c36..ae4901073a98a 100644
--- a/drivers/iommu/iova.c
+++ b/drivers/iommu/iova.c
@@ -46,7 +46,7 @@ static struct iova *to_iova(struct rb_node *node)
return rb_entry(node, struct iova, node);
 }
 
-void
+static void
 __init_iova_domain(struct iova_domain *iovad, unsigned long granule,
unsigned long start_pfn, unsigned long iova_len)
 {
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: [PATCH v2 09/15] iova: Add init_iova_domain_ext()

2021-05-10 Thread kernel test robot
Hi John,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.13-rc1 next-20210510]
[cannot apply to iommu/next mkp-scsi/for-next scsi/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
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/John-Garry/dma-mapping-iommu-Allow-IOMMU-IOVA-rcache-range-to-be-configured/20210510-222805
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
6efb943b8616ec53a5e444193dccf1af9ad627b5
config: i386-randconfig-s002-20210510 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# 
https://github.com/0day-ci/linux/commit/d9a8e3a4ac0070cd3094af3b41e9c6277faf3ea6
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
John-Garry/dma-mapping-iommu-Allow-IOMMU-IOVA-rcache-range-to-be-configured/20210510-222805
git checkout d9a8e3a4ac0070cd3094af3b41e9c6277faf3ea6
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>):

>> drivers/iommu/iova.c:50:1: warning: no previous prototype for 
>> '__init_iova_domain' [-Wmissing-prototypes]
  50 | __init_iova_domain(struct iova_domain *iovad, unsigned long granule,
 | ^~


sparse warnings: (new ones prefixed by >>)
>> drivers/iommu/iova.c:50:1: sparse: sparse: symbol '__init_iova_domain' was 
>> not declared. Should it be static?

Please review and possibly fold the followup patch.

vim +/__init_iova_domain +50 drivers/iommu/iova.c

48  
49  void
  > 50  __init_iova_domain(struct iova_domain *iovad, unsigned long granule,
51  unsigned long start_pfn, unsigned long iova_len)
52  {
53  /*
54   * IOVA granularity will normally be equal to the smallest
55   * supported IOMMU page size; both *must* be capable of
56   * representing individual CPU pages exactly.
57   */
58  BUG_ON((granule > PAGE_SIZE) || !is_power_of_2(granule));
59  
60  spin_lock_init(&iovad->iova_rbtree_lock);
61  iovad->rbroot = RB_ROOT;
62  iovad->cached_node = &iovad->anchor.node;
63  iovad->cached32_node = &iovad->anchor.node;
64  iovad->granule = granule;
65  iovad->start_pfn = start_pfn;
66  iovad->dma_32bit_pfn = 1UL << (32 - iova_shift(iovad));
67  iovad->max32_alloc_size = iovad->dma_32bit_pfn;
68  iovad->flush_cb = NULL;
69  iovad->fq = NULL;
70  iovad->anchor.pfn_lo = iovad->anchor.pfn_hi = IOVA_ANCHOR;
71  rb_link_node(&iovad->anchor.node, NULL, &iovad->rbroot.rb_node);
72  rb_insert_color(&iovad->anchor.node, &iovad->rbroot);
73  cpuhp_state_add_instance_nocalls(CPUHP_IOMMU_IOVA_DEAD, 
&iovad->cpuhp_dead);
74  init_iova_rcaches(iovad, iova_len);
75  }
76  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v5 2/8] iommu/dma: Introduce generic helper to retrieve RMR info

2021-05-24 Thread kernel test robot
Hi Shameer,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on iommu/next]
[also build test WARNING on pm/linux-next arm64/for-next/core linus/master 
v5.13-rc3 next-20210524]
[cannot apply to xlnx/master arm/for-next soc/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
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20210524-190633
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: x86_64-randconfig-a013-20210524 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 
93d1e5822ed64abd777eb94ea9899e96c4c39fbe)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -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
# 
https://github.com/0day-ci/linux/commit/2c046e03beb7d64e0f7182d01a7dc63dce79c882
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20210524-190633
git checkout 2c046e03beb7d64e0f7182d01a7dc63dce79c882
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>):

   In file included from drivers/vfio/vfio_iommu_type1.c:41:
>> include/linux/dma-iommu.h:90:5: warning: no previous prototype for function 
>> 'iommu_dma_get_rmrs' [-Wmissing-prototypes]
   int iommu_dma_get_rmrs(struct fwnode_handle *iommu, struct list_head *list)
   ^
   include/linux/dma-iommu.h:90:1: note: declare 'static' if the function is 
not intended to be used outside of this translation unit
   int iommu_dma_get_rmrs(struct fwnode_handle *iommu, struct list_head *list)
   ^
   static 
>> include/linux/dma-iommu.h:95:6: warning: no previous prototype for function 
>> 'iommu_dma_put_rmrs' [-Wmissing-prototypes]
   void iommu_dma_put_rmrs(struct fwnode_handle *iommu, struct list_head *list)
^
   include/linux/dma-iommu.h:95:1: note: declare 'static' if the function is 
not intended to be used outside of this translation unit
   void iommu_dma_put_rmrs(struct fwnode_handle *iommu, struct list_head *list)
   ^
   static 
   2 warnings generated.


vim +/iommu_dma_get_rmrs +90 include/linux/dma-iommu.h

89  
  > 90  int iommu_dma_get_rmrs(struct fwnode_handle *iommu, struct list_head 
*list)
91  {
92  return -ENODEV;
93  }
94  
  > 95  void iommu_dma_put_rmrs(struct fwnode_handle *iommu, struct list_head 
*list)
96  {
97  }
98  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v7 4/4] iommu: rockchip: Add support for iommu v2

2021-05-25 Thread kernel test robot
Hi Benjamin,

I love your patch! Yet something to improve:

[auto build test ERROR on iommu/next]
[also build test ERROR on rockchip/for-next robh/for-next v5.13-rc3 
next-20210525]
[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/Benjamin-Gaignard/Add-IOMMU-driver-for-rk356x/20210525-201749
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: powerpc-randconfig-s031-20210525 (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# 
https://github.com/0day-ci/linux/commit/bd6c989c628be7c8ac1f8aeb9f301bd3a6e0a078
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Benjamin-Gaignard/Add-IOMMU-driver-for-rk356x/20210525-201749
git checkout bd6c989c628be7c8ac1f8aeb9f301bd3a6e0a078
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 
CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=powerpc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

>> drivers/iommu/rockchip-iommu.c:1384:19: error: 'rk_dma_addr_dte' undeclared 
>> here (not in a function); did you mean 'rk_dma_addr_dte_v2'?
1384 |  .dma_addr_dte = &rk_dma_addr_dte,
 |   ^~~
 |   rk_dma_addr_dte_v2


vim +1384 drivers/iommu/rockchip-iommu.c

0f181d3cf7d984b Jeffy Chen2018-03-23  1378  
ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25  1379  static struct rk_iommu_ops 
iommu_data_ops_v1 = {
ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25  1380  .pt_address = 
&rk_dte_pt_address,
ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25  1381  .mk_dtentries = 
&rk_mk_dte,
ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25  1382  .mk_ptentries = 
&rk_mk_pte,
ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25  1383  .dte_addr_phys = 
&rk_dte_addr_phys,
ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25 @1384  .dma_addr_dte = 
&rk_dma_addr_dte,
ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25  1385  .dma_bit_mask = 
DMA_BIT_MASK(32),
ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25  1386  };
ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25  1387  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v7 4/4] iommu: rockchip: Add support for iommu v2

2021-05-25 Thread kernel test robot
Hi Benjamin,

I love your patch! Yet something to improve:

[auto build test ERROR on iommu/next]
[also build test ERROR on rockchip/for-next robh/for-next v5.13-rc3 
next-20210525]
[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/Benjamin-Gaignard/Add-IOMMU-driver-for-rk356x/20210525-201749
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: arm-randconfig-r025-20210525 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 
99155e913e9bad5f7f8a247f8bb3a3ff3da74af1)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# 
https://github.com/0day-ci/linux/commit/bd6c989c628be7c8ac1f8aeb9f301bd3a6e0a078
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Benjamin-Gaignard/Add-IOMMU-driver-for-rk356x/20210525-201749
git checkout bd6c989c628be7c8ac1f8aeb9f301bd3a6e0a078
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

>> drivers/iommu/rockchip-iommu.c:1384:19: error: use of undeclared identifier 
>> 'rk_dma_addr_dte'; did you mean 'rk_dma_addr_dte_v2'?
   .dma_addr_dte = &rk_dma_addr_dte,
^~~
rk_dma_addr_dte_v2
   drivers/iommu/rockchip-iommu.c:551:19: note: 'rk_dma_addr_dte_v2' declared 
here
   static inline u32 rk_dma_addr_dte_v2(dma_addr_t dt_dma)
 ^
   1 error generated.


vim +1384 drivers/iommu/rockchip-iommu.c

0f181d3cf7d984b Jeffy Chen2018-03-23  1378  
ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25  1379  static struct rk_iommu_ops 
iommu_data_ops_v1 = {
ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25  1380  .pt_address = 
&rk_dte_pt_address,
ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25  1381  .mk_dtentries = 
&rk_mk_dte,
ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25  1382  .mk_ptentries = 
&rk_mk_pte,
ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25  1383  .dte_addr_phys = 
&rk_dte_addr_phys,
ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25 @1384  .dma_addr_dte = 
&rk_dma_addr_dte,
ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25  1385  .dma_bit_mask = 
DMA_BIT_MASK(32),
ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25  1386  };
ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25  1387  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v3 2/6] ACPI: Move IOMMU setup code out of IORT

2021-06-02 Thread kernel test robot
Hi Jean-Philippe,

I love your patch! Yet something to improve:

[auto build test ERROR on pm/linux-next]
[also build test ERROR on iommu/next arm64/for-next/core linus/master v5.13-rc4 
next-20210602]
[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/Jean-Philippe-Brucker/Add-support-for-ACPI-VIOT/20210602-235849
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git 
linux-next
config: x86_64-randconfig-a012-20210602 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 
d41cb6bb2607fa5c7a9df2b3dab361353657d225)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -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
# 
https://github.com/0day-ci/linux/commit/937da71a81108243877fb1f0f568e56a08a62c50
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Jean-Philippe-Brucker/Add-support-for-ACPI-VIOT/20210602-235849
git checkout 937da71a81108243877fb1f0f568e56a08a62c50
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

>> drivers/acpi/scan.c:1540:26: error: no member named 'ops' in 'struct 
>> iommu_fwspec'
   return fwspec ? fwspec->ops : NULL;
   ~~  ^
>> drivers/acpi/scan.c:1564:9: error: implicit declaration of function 
>> 'iommu_probe_device' [-Werror,-Wimplicit-function-declaration]
   err = iommu_probe_device(dev);
 ^
   2 errors generated.


vim +1540 drivers/acpi/scan.c

  1535  
  1536  static inline const struct iommu_ops *acpi_iommu_fwspec_ops(struct 
device *dev)
  1537  {
  1538  struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev);
  1539  
> 1540  return fwspec ? fwspec->ops : NULL;
  1541  }
  1542  
  1543  static const struct iommu_ops *acpi_iommu_configure_id(struct device 
*dev,
  1544 const u32 *id_in)
  1545  {
  1546  int err;
  1547  const struct iommu_ops *ops;
  1548  
  1549  /*
  1550   * If we already translated the fwspec there is nothing left to 
do,
  1551   * return the iommu_ops.
  1552   */
  1553  ops = acpi_iommu_fwspec_ops(dev);
  1554  if (ops)
  1555  return ops;
  1556  
  1557  err = iort_iommu_configure_id(dev, id_in);
  1558  
  1559  /*
  1560   * If we have reason to believe the IOMMU driver missed the 
initial
  1561   * add_device callback for dev, replay it to get things in 
order.
  1562   */
  1563  if (!err && dev->bus && !device_iommu_mapped(dev))
> 1564  err = iommu_probe_device(dev);
  1565  
  1566  /* Ignore all other errors apart from EPROBE_DEFER */
  1567  if (err == -EPROBE_DEFER) {
  1568  return ERR_PTR(err);
  1569  } else if (err) {
  1570  dev_dbg(dev, "Adding to IOMMU failed: %d\n", err);
  1571  return NULL;
  1572  }
  1573  return acpi_iommu_fwspec_ops(dev);
  1574  }
  1575  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

[asahilinux:dart/dev 1/4] drivers/iommu/dma-iommu.c:249:5: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'phys_addr_t' {aka 'unsigned int'}

2021-06-03 Thread kernel test robot
tree:   https://github.com/AsahiLinux/linux dart/dev
head:   1bc74c306de810171ce90d15c42ac846bbf183dc
commit: df7d638f551bba7275f5deedee488db2b7fbcc51 [1/4] iommu/dma: Fix IOVA 
reserve dma ranges
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# 
https://github.com/AsahiLinux/linux/commit/df7d638f551bba7275f5deedee488db2b7fbcc51
git remote add asahilinux https://github.com/AsahiLinux/linux
git fetch --no-tags asahilinux dart/dev
git checkout df7d638f551bba7275f5deedee488db2b7fbcc51
# save the attached .config to linux build tree
make W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>):

   In file included from include/linux/device.h:15,
from include/linux/acpi.h:15,
from include/linux/acpi_iort.h:10,
from drivers/iommu/dma-iommu.c:11:
   drivers/iommu/dma-iommu.c: In function 'iova_reserve_pci_windows':
>> drivers/iommu/dma-iommu.c:249:5: warning: format '%llx' expects argument of 
>> type 'long long unsigned int', but argument 3 has type 'phys_addr_t' {aka 
>> 'unsigned int'} [-Wformat=]
 249 | "Failed to reserve IOVA [%#010llx-%#010llx]\n",
 | ^~
   include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
  19 | #define dev_fmt(fmt) fmt
 |  ^~~
   drivers/iommu/dma-iommu.c:248:4: note: in expansion of macro 'dev_err'
 248 |dev_err(&dev->dev,
 |^~~
   drivers/iommu/dma-iommu.c:249:37: note: format string is defined here
 249 | "Failed to reserve IOVA [%#010llx-%#010llx]\n",
 |  ~~~^
 | |
 | long long unsigned int
 |  %#010x
   In file included from include/linux/device.h:15,
from include/linux/acpi.h:15,
from include/linux/acpi_iort.h:10,
from drivers/iommu/dma-iommu.c:11:
   drivers/iommu/dma-iommu.c:249:5: warning: format '%llx' expects argument of 
type 'long long unsigned int', but argument 4 has type 'phys_addr_t' {aka 
'unsigned int'} [-Wformat=]
 249 | "Failed to reserve IOVA [%#010llx-%#010llx]\n",
 | ^~
   include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
  19 | #define dev_fmt(fmt) fmt
 |  ^~~
   drivers/iommu/dma-iommu.c:248:4: note: in expansion of macro 'dev_err'
 248 |dev_err(&dev->dev,
 |^~~
   drivers/iommu/dma-iommu.c:249:46: note: format string is defined here
 249 | "Failed to reserve IOVA [%#010llx-%#010llx]\n",
 |   ~~~^
 |  |
 |  long long unsigned int
 |   %#010x


vim +249 drivers/iommu/dma-iommu.c

   220  
   221  static int iova_reserve_pci_windows(struct pci_dev *dev,
   222  struct iova_domain *iovad)
   223  {
   224  struct pci_host_bridge *bridge = pci_find_host_bridge(dev->bus);
   225  struct resource_entry *window;
   226  unsigned long lo, hi;
   227  phys_addr_t start = 0, end;
   228  
   229  resource_list_for_each_entry(window, &bridge->windows) {
   230  if (resource_type(window->res) != IORESOURCE_MEM)
   231  continue;
   232  
   233  lo = iova_pfn(iovad, window->res->start - 
window->offset);
   234  hi = iova_pfn(iovad, window->res->end - window->offset);
   235  reserve_iova(iovad, lo, hi);
   236  }
   237  
   238  /* Get reserved DMA windows from host bridge */
   239  resource_list_for_each_entry(window, &bridge->dma_ranges) {
   240  end = window->res->start - window->offset;
   241  resv_iova:
   242  if (end > start) {
   243  lo = iova_pfn(iovad, start);
   244  hi = iova_pfn(iovad, end);
   245  reserve_iova(iovad, lo, hi);
   246  } else if (end < start) {
   247  /* dma_ranges list should be sorted */
   248  dev_err(&dev->dev,
 > 249

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

2021-07-22 Thread kernel test robot
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
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Robin-Murphy/iommu-Refactor-DMA-domain-strictness/20210722-022514
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 10.3.0
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# 
https://github.com/0day-ci/linux/commit/c05e0e1856b394eff1167c00f7bbd6ac7cc9dea6
git remote add linux-review https://github.com/0day-ci/linux
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=gcc-10.3.0 make.cross 
O=build_dir ARCH=ia64 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

   In file included from arch/ia64/include/asm/bug.h:17,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/preempt.h:5,
from ./arch/ia64/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/wait.h:9,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from include/linux/debugfs.h:15,
from drivers/iommu/intel/iommu.c:18:
   drivers/iommu/intel/iommu.c: In function 'domain_get_iommu':
>> drivers/iommu/intel/iommu.c:604:38: error: '__IOMMU_DOMAIN_DMA' undeclared 
>> (first use in this function); did you mean 'IOMMU_DOMAIN_DMA'?
 604 |  if (WARN_ON(!(domain->domain.type & __IOMMU_DOMAIN_DMA)))
 |  ^~
   include/asm-generic/bug.h:121:25: note: in definition of macro 'WARN_ON'
 121 |  int __ret_warn_on = !!(condition);\
 | ^
   drivers/iommu/intel/iommu.c:604:38: note: each undeclared identifier is 
reported only once for each function it appears in
 604 |  if (WARN_ON(!(domain->domain.type & __IOMMU_DOMAIN_DMA)))
 |  ^~
   include/asm-generic/bug.h:121:25: note: in definition of macro 'WARN_ON'
 121 |  int __ret_warn_on = !!(condition);\
 | ^


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

   597  
   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;
   602  
   603  /* si_domain and vm domain should not get here. */
 > 604  if (WARN_ON(!(domain->domain.type & __IOMMU_DOMAIN_DMA)))
   605  return NULL;
   606  
   607  for_each_domain_iommu(iommu_id, domain)
   608  break;
   609  
   610  if (iommu_id < 0 || iommu_id >= g_num_of_iommus)
   611  return NULL;
   612  
   613  return g_iommus[iommu_id];
   614  }
   615  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

2021-07-22 Thread kernel test robot
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
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Robin-Murphy/iommu-Refactor-DMA-domain-strictness/20210722-022514
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: x86_64-randconfig-a015-20210722 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 
9625ca5b602616b2f5584e8a49ba93c52c141e40)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -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
# 
https://github.com/0day-ci/linux/commit/c05e0e1856b394eff1167c00f7bbd6ac7cc9dea6
git remote add linux-review https://github.com/0day-ci/linux
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 

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

   597  
   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;
   602  
   603  /* si_domain and vm domain should not get here. */
 > 604  if (WARN_ON(!(domain->domain.type & __IOMMU_DOMAIN_DMA)))
   605  return NULL;
   606  
   607  for_each_domain_iommu(iommu_id, domain)
   608  break;
   609  
   610  if (iommu_id < 0 || iommu_id >= g_num_of_iommus)
   611  return NULL;
   612  
   613  return g_iommus[iommu_id];
   614  }
   615  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v3 02/25] iommu/amd: Drop IOVA cookie management

2021-08-05 Thread kernel test robot
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 sunxi/sunxi/for-next linus/master 
v5.14-rc4 next-20210804]
[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/Robin-Murphy/iommu-Refactor-DMA-domain-strictness/20210805-011913
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# 
https://github.com/0day-ci/linux/commit/33b83e4adc16220361ed42c229e8cd37f8a2a3aa
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Robin-Murphy/iommu-Refactor-DMA-domain-strictness/20210805-011913
git checkout 33b83e4adc16220361ed42c229e8cd37f8a2a3aa
# 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 

All errors (new ones prefixed by >>):

   drivers/iommu/amd/iommu.c: In function 'amd_iommu_probe_finalize':
>> drivers/iommu/amd/iommu.c:1757:3: error: implicit declaration of function 
>> 'iommu_setup_dma_ops'; did you mean 'arch_setup_dma_ops'? 
>> [-Werror=implicit-function-declaration]
1757 |   iommu_setup_dma_ops(dev, 0, U64_MAX);
 |   ^~~
 |   arch_setup_dma_ops
   cc1: some warnings being treated as errors


vim +1757 drivers/iommu/amd/iommu.c

1ac4cbbc5eb56d arch/x86/kernel/amd_iommu.c Joerg Roedel  2008-12-10  
1749  
dce8d6964ebdb3 drivers/iommu/amd_iommu.c   Joerg Roedel  2020-04-29  
1750  static void amd_iommu_probe_finalize(struct device *dev)
dce8d6964ebdb3 drivers/iommu/amd_iommu.c   Joerg Roedel  2020-04-29  
1751  {
dce8d6964ebdb3 drivers/iommu/amd_iommu.c   Joerg Roedel  2020-04-29  
1752   struct iommu_domain *domain;
ac1534a55d1e87 drivers/iommu/amd_iommu.c   Joerg Roedel  2012-06-21  
1753  
07ee86948c9111 drivers/iommu/amd_iommu.c   Joerg Roedel  2015-05-28  
1754   /* Domains are initialized for this device - have a look what we 
ended up with */
07ee86948c9111 drivers/iommu/amd_iommu.c   Joerg Roedel  2015-05-28  
1755   domain = iommu_get_domain_for_dev(dev);
57f9842e488406 drivers/iommu/amd_iommu.c   Joerg Roedel  2020-04-29  
1756   if (domain->type == IOMMU_DOMAIN_DMA)
ac6d704679d343 drivers/iommu/amd/iommu.c   Jean-Philippe Brucker 2021-06-18 
@1757   iommu_setup_dma_ops(dev, 0, U64_MAX);
d6177a6556f853 drivers/iommu/amd/iommu.c   Jean-Philippe Brucker 2021-04-22  
1758   else
d6177a6556f853 drivers/iommu/amd/iommu.c   Jean-Philippe Brucker 2021-04-22  
1759   set_dma_ops(dev, NULL);
e275a2a0fc9e21 arch/x86/kernel/amd_iommu.c Joerg Roedel  2008-12-10  
1760  }
e275a2a0fc9e21 arch/x86/kernel/amd_iommu.c Joerg Roedel  2008-12-10  
1761  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v2 3/9] dma-iommu: bounce buffers for untrusted devices

2021-08-06 Thread kernel test robot
Hi David,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on iommu/next]
[also build test WARNING on drm-intel/for-linux-next hch-configfs/for-next 
linus/master v5.14-rc4]
[cannot apply to next-20210805]
[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/David-Stevens/Add-dynamic-iommu-backed-bounce-buffers/20210806-183631
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: ia64-randconfig-r025-20210804 (attached as .config)
compiler: ia64-linux-gcc (GCC) 10.3.0
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# 
https://github.com/0day-ci/linux/commit/c5f1f9fa88a7062c1ded50fa165f6b01ed73f161
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
David-Stevens/Add-dynamic-iommu-backed-bounce-buffers/20210806-183631
git checkout c5f1f9fa88a7062c1ded50fa165f6b01ed73f161
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross 
ARCH=ia64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>):

>> drivers/iommu/io-buffer-manager.c:57:24: warning: no previous prototype for 
>> 'find_fallback_node' [-Wmissing-prototypes]
  57 | struct io_buffer_node *find_fallback_node(struct rb_root *root, 
dma_addr_t iova)
 |^~
>> drivers/iommu/io-buffer-manager.c:75:6: warning: no previous prototype for 
>> 'insert_fallback_node' [-Wmissing-prototypes]
  75 | bool insert_fallback_node(struct rb_root *root, struct 
io_buffer_node *node)
 |  ^~~~


vim +/find_fallback_node +57 drivers/iommu/io-buffer-manager.c

56  
  > 57  struct io_buffer_node *find_fallback_node(struct rb_root *root, 
dma_addr_t iova)
58  {
59  struct rb_node *node = root->rb_node;
60  
61  while (node) {
62  struct io_buffer_node *cur =
63  container_of(node, struct io_buffer_node, node);
64  
65  if (iova < cur->info.iova)
66  node = node->rb_left;
67  else if (iova >= cur->info.iova + cur->info.size)
68  node = node->rb_right;
69  else
70  return cur;
71  }
72  return NULL;
73  }
74  
  > 75  bool insert_fallback_node(struct rb_root *root, struct io_buffer_node 
*node)
76  {
77  struct rb_node **new = &(root->rb_node), *parent = NULL;
78  dma_addr_t node_end = node->info.iova + node->info.size;
79  
80  while (*new) {
81  struct io_buffer_node *cur =
82  container_of(*new, struct io_buffer_node, node);
83  dma_addr_t cur_end = cur->info.iova + cur->info.size;
84  
85  parent = *new;
86  if (node_end <= cur->info.iova)
87  new = &((*new)->rb_left);
88  else if (node->info.iova >= cur_end)
89  new = &((*new)->rb_right);
90  else {
91  pr_crit("IOVA collision new=[%llx,%llx) 
old=[%llx,%llx)\n",
92  node->info.iova, node_end, 
cur->info.iova,
93  cur_end);
94  return false;
95  }
96  }
97  
98  rb_link_node(&node->node, parent, new);
99  rb_insert_color(&node->node, root);
   100  return true;
   101  }
   102  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v2 2/9] dma-iommu: expose a few helper functions to module

2021-08-06 Thread kernel test robot
Hi David,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on iommu/next]
[also build test ERROR on drm-intel/for-linux-next hch-configfs/for-next 
linus/master v5.14-rc4]
[cannot apply to next-20210805]
[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/David-Stevens/Add-dynamic-iommu-backed-bounce-buffers/20210806-183631
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: i386-randconfig-a011-20210804 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# 
https://github.com/0day-ci/linux/commit/385dff3d789a97ef650912616e9d696fba96cb20
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
David-Stevens/Add-dynamic-iommu-backed-bounce-buffers/20210806-183631
git checkout 385dff3d789a97ef650912616e9d696fba96cb20
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

>> drivers/iommu/dma-iommu.c:415:12: error: conflicting types for 
>> '__iommu_dma_alloc_iova'
 415 | dma_addr_t __iommu_dma_alloc_iova(struct iommu_domain *domain,
 |^~
   In file included from drivers/iommu/dma-iommu.c:14:
   include/linux/dma-iommu.h:47:12: note: previous declaration of 
'__iommu_dma_alloc_iova' was here
  47 | dma_addr_t __iommu_dma_alloc_iova(struct iommu_domain *domain,
 |^~


vim +/__iommu_dma_alloc_iova +415 drivers/iommu/dma-iommu.c

   414  
 > 415  dma_addr_t __iommu_dma_alloc_iova(struct iommu_domain *domain,
   416  size_t size, u64 dma_limit, struct device *dev)
   417  {
   418  struct iommu_dma_cookie *cookie = domain->iova_cookie;
   419  struct iova_domain *iovad = &cookie->iovad;
   420  unsigned long shift, iova_len, iova = 0;
   421  
   422  if (cookie->type == IOMMU_DMA_MSI_COOKIE) {
   423  cookie->msi_iova += size;
   424  return cookie->msi_iova - size;
   425  }
   426  
   427  shift = iova_shift(iovad);
   428  iova_len = size >> shift;
   429  /*
   430   * Freeing non-power-of-two-sized allocations back into the 
IOVA caches
   431   * will come back to bite us badly, so we have to waste a bit 
of space
   432   * rounding up anything cacheable to make sure that can't 
happen. The
   433   * order of the unadjusted size will still match upon freeing.
   434   */
   435  if (iova_len < (1 << (IOVA_RANGE_CACHE_MAX_SIZE - 1)))
   436  iova_len = roundup_pow_of_two(iova_len);
   437  
   438  dma_limit = min_not_zero(dma_limit, dev->bus_dma_limit);
   439  
   440  if (domain->geometry.force_aperture)
   441  dma_limit = min(dma_limit, 
(u64)domain->geometry.aperture_end);
   442  
   443  /* Try to get PCI devices a SAC address */
   444  if (dma_limit > DMA_BIT_MASK(32) && !iommu_dma_forcedac && 
dev_is_pci(dev))
   445  iova = alloc_iova_fast(iovad, iova_len,
   446 DMA_BIT_MASK(32) >> shift, 
false);
   447  
   448  if (!iova)
   449  iova = alloc_iova_fast(iovad, iova_len, dma_limit >> 
shift,
   450 true);
   451  
   452  return (dma_addr_t)iova << shift;
   453  }
   454  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

[iommu:apple/dart 3/3] drivers/iommu/apple-dart.c:730:17: error: initialization of 'size_t (*)(struct iommu_domain *, long unsigned int, size_t, struct iommu_iotlb_gather *)' {aka 'long unsigned int

2021-08-09 Thread kernel test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git 
apple/dart
head:   05ce9d20d699b093dec985192a7db63b48f26ca2
commit: 05ce9d20d699b093dec985192a7db63b48f26ca2 [3/3] iommu/dart: Add DART 
iommu driver
config: sparc-allyesconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 10.3.0
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# 
https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git/commit/?id=05ce9d20d699b093dec985192a7db63b48f26ca2
git remote add iommu 
https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git
git fetch --no-tags iommu apple/dart
git checkout 05ce9d20d699b093dec985192a7db63b48f26ca2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross 
ARCH=sparc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

   drivers/iommu/apple-dart.c: In function 'apple_dart_map_pages':
   drivers/iommu/apple-dart.c:380:12: error: 'struct io_pgtable_ops' has no 
member named 'map_pages'
 380 |  return ops->map_pages(ops, iova, paddr, pgsize, pgcount, prot, gfp,
 |^~
   drivers/iommu/apple-dart.c: In function 'apple_dart_unmap_pages':
   drivers/iommu/apple-dart.c:392:12: error: 'struct io_pgtable_ops' has no 
member named 'unmap_pages'
 392 |  return ops->unmap_pages(ops, iova, pgsize, pgcount, gather);
 |^~
   drivers/iommu/apple-dart.c: At top level:
   drivers/iommu/apple-dart.c:729:3: error: 'const struct iommu_ops' has no 
member named 'map_pages'
 729 |  .map_pages = apple_dart_map_pages,
 |   ^
   drivers/iommu/apple-dart.c:729:15: error: initialization of 'int (*)(struct 
iommu_domain *, long unsigned int,  phys_addr_t,  size_t,  int,  gfp_t)' {aka 
'int (*)(struct iommu_domain *, long unsigned int,  long long unsigned int,  
long unsigned int,  int,  unsigned int)'} from incompatible pointer type 'int 
(*)(struct iommu_domain *, long unsigned int,  phys_addr_t,  size_t,  size_t,  
int,  gfp_t,  size_t *)' {aka 'int (*)(struct iommu_domain *, long unsigned 
int,  long long unsigned int,  long unsigned int,  long unsigned int,  int,  
unsigned int,  long unsigned int *)'} [-Werror=incompatible-pointer-types]
 729 |  .map_pages = apple_dart_map_pages,
 |   ^~~~
   drivers/iommu/apple-dart.c:729:15: note: (near initialization for 
'apple_dart_iommu_ops.map')
   drivers/iommu/apple-dart.c:730:3: error: 'const struct iommu_ops' has no 
member named 'unmap_pages'
 730 |  .unmap_pages = apple_dart_unmap_pages,
 |   ^~~
>> drivers/iommu/apple-dart.c:730:17: error: initialization of 'size_t 
>> (*)(struct iommu_domain *, long unsigned int,  size_t,  struct 
>> iommu_iotlb_gather *)' {aka 'long unsigned int (*)(struct iommu_domain *, 
>> long unsigned int,  long unsigned int,  struct iommu_iotlb_gather *)'} from 
>> incompatible pointer type 'size_t (*)(struct iommu_domain *, long unsigned 
>> int,  size_t,  size_t,  struct iommu_iotlb_gather *)' {aka 'long unsigned 
>> int (*)(struct iommu_domain *, long unsigned int,  long unsigned int,  long 
>> unsigned int,  struct iommu_iotlb_gather *)'} 
>> [-Werror=incompatible-pointer-types]
 730 |  .unmap_pages = apple_dart_unmap_pages,
 | ^~
   drivers/iommu/apple-dart.c:730:17: note: (near initialization for 
'apple_dart_iommu_ops.unmap')
   drivers/iommu/apple-dart.c: In function 'apple_dart_unmap_pages':
   drivers/iommu/apple-dart.c:393:1: error: control reaches end of non-void 
function [-Werror=return-type]
 393 | }
 | ^
   drivers/iommu/apple-dart.c: In function 'apple_dart_map_pages':
   drivers/iommu/apple-dart.c:382:1: error: control reaches end of non-void 
function [-Werror=return-type]
 382 | }
 | ^
   cc1: some warnings being treated as errors


vim +730 drivers/iommu/apple-dart.c

   723  
   724  static const struct iommu_ops apple_dart_iommu_ops = {
   725  .domain_alloc = apple_dart_domain_alloc,
   726  .domain_free = apple_dart_domain_free,
   727  .attach_dev = apple_dart_attach_dev,
   728  .detach_dev = apple_dart_detach_dev,
 > 729  .map_pages = apple_dart_map_pages,
 > 730  .unmap_pages = apple_dart_unmap_pages,
   731  .flush_iotlb_all = apple_dart_flush_iotlb_all,
   732  .iotlb_sync = apple_dart_iotlb_sync,
   733  .iotlb_syn

Re: [PATCH v4 5/6] swiotlb: support aligned swiotlb buffers

2021-08-14 Thread kernel test robot
Hi David,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on iommu/next]
[also build test ERROR on hch-configfs/for-next linus/master v5.14-rc5]
[cannot apply to swiotlb/linux-next next-20210813]
[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/David-Stevens/Fixes-for-dma-iommu-swiotlb-bounce-buffers/20210813-154739
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: x86_64-randconfig-a003-20210812 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# 
https://github.com/0day-ci/linux/commit/50aeec27cc4ccaa914c0bbefa59e349278646b6e
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
David-Stevens/Fixes-for-dma-iommu-swiotlb-bounce-buffers/20210813-154739
git checkout 50aeec27cc4ccaa914c0bbefa59e349278646b6e
# save the attached .config to linux build tree
mkdir build_dir
make W=1 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 

All errors (new ones prefixed by >>):

   drivers/xen/swiotlb-xen.c: In function 'xen_swiotlb_map_page':
>> drivers/xen/swiotlb-xen.c:385:8: error: too few arguments to function 
>> 'swiotlb_tbl_map_single'
 385 |  map = swiotlb_tbl_map_single(dev, phys, size, size, dir, attrs);
 |^~
   In file included from arch/x86/include/asm/swiotlb.h:5,
from arch/x86/include/asm/dma-mapping.h:12,
from include/linux/dma-map-ops.h:75,
from include/linux/dma-direct.h:10,
from drivers/xen/swiotlb-xen.c:30:
   include/linux/swiotlb.h:45:13: note: declared here
  45 | phys_addr_t swiotlb_tbl_map_single(struct device *hwdev, phys_addr_t 
phys,
 | ^~


vim +/swiotlb_tbl_map_single +385 drivers/xen/swiotlb-xen.c

b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11  352  
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11  353  /*
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11  354   * Map a single buffer of 
the indicated size for DMA in streaming mode.  The
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11  355   * physical address to 
use is returned.
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11  356   *
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11  357   * Once the device is 
given the dma address, the device owns this memory until
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11  358   * either 
xen_swiotlb_unmap_page or xen_swiotlb_dma_sync_single is performed.
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11  359   */
dceb1a6819ab2c Christoph Hellwig 2017-05-21  360  static dma_addr_t 
xen_swiotlb_map_page(struct device *dev, struct page *page,
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11  361
unsigned long offset, size_t size,
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11  362
enum dma_data_direction dir,
00085f1efa387a Krzysztof Kozlowski   2016-08-03  363
unsigned long attrs)
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11  364  {
e05ed4d1fad9e7 Alexander Duyck   2012-10-15  365phys_addr_t map, phys = 
page_to_phys(page) + offset;
91ffe4ad534ab2 Stefano Stabellini2020-07-10  366dma_addr_t dev_addr = 
xen_phys_to_dma(dev, phys);
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11  367  
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11  368BUG_ON(dir == DMA_NONE);
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11  369/*
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11  370 * If the address 
happens to be in the device's DMA window,
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11  371 * we can safely return 
the device addr and not worry about bounce
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11  372 * buffering it.
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11  373 */
68a33b1794665b Christoph Hellwig 2019-11-19  374if (dma_capable(dev, 
dev_addr, size, true) &&
a4dba130891271 Stefano Stabellini2014-11-21  375
!range_straddles_page_boundary(phys, size) &&
291be10fd75111 Julien Grall  2015-09-09  376
!xen_arch_need_swiotlb(dev, phys, dev_addr) &&
063b8271ec8f70 Christoph Hellwig 2019-04-11  377swiotlb_force 
!= SWIOTLB_FORCE)
063b8271ec8f70 Christoph Hellwig 2019-04-11  378goto done;
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11  379  
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11  380/*
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11  381 * Oh well, have to 
allocate 

[iommu:x86/vt-d 41/59] drivers/iommu/io-pgtable-arm-v7s.c:703:43: error: 'struct iommu_iotlb_gather' has no member named 'queued'

2021-08-20 Thread kernel test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git x86/vt-d
head:   423d39d8518c1bba12e0889a92beeddbb1502392
commit: a8e5f04458c4e496eada2b029ce96713bb6c388d [41/59] iommu/io-pgtable: 
Remove non-strict quirk
config: nds32-buildonly-randconfig-r001-20210820 (attached as .config)
compiler: nds32le-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# 
https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git/commit/?id=a8e5f04458c4e496eada2b029ce96713bb6c388d
git remote add iommu 
https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git
git fetch --no-tags iommu x86/vt-d
git checkout a8e5f04458c4e496eada2b029ce96713bb6c388d
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross 
O=build_dir ARCH=nds32 SHELL=/bin/bash drivers/iommu/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

   In file included from include/linux/init.h:5,
from arch/nds32/include/asm/nds32.h:11,
from arch/nds32/include/asm/irqflags.h:4,
from include/linux/irqflags.h:16,
from include/asm-generic/cmpxchg.h:15,
from ./arch/nds32/include/generated/asm/cmpxchg.h:1,
from include/asm-generic/atomic.h:12,
from ./arch/nds32/include/generated/asm/atomic.h:1,
from include/linux/atomic.h:7,
from drivers/iommu/io-pgtable-arm-v7s.c:24:
   drivers/iommu/io-pgtable-arm-v7s.c: In function '__arm_v7s_unmap':
>> drivers/iommu/io-pgtable-arm-v7s.c:703:43: error: 'struct 
>> iommu_iotlb_gather' has no member named 'queued'
 703 | } else if (!gather->queued) {
 |   ^~
   include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
  58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : 
__trace_if_value(cond))
 |^~~~
   drivers/iommu/io-pgtable-arm-v7s.c:703:32: note: in expansion of macro 'if'
 703 | } else if (!gather->queued) {
 |^~
>> drivers/iommu/io-pgtable-arm-v7s.c:703:43: error: 'struct 
>> iommu_iotlb_gather' has no member named 'queued'
 703 | } else if (!gather->queued) {
 |   ^~
   include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
  58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : 
__trace_if_value(cond))
 | ^~~~
   drivers/iommu/io-pgtable-arm-v7s.c:703:32: note: in expansion of macro 'if'
 703 | } else if (!gather->queued) {
 |^~
>> drivers/iommu/io-pgtable-arm-v7s.c:703:43: error: 'struct 
>> iommu_iotlb_gather' has no member named 'queued'
 703 | } else if (!gather->queued) {
 |   ^~
   include/linux/compiler.h:69:10: note: in definition of macro 
'__trace_if_value'
  69 | (cond) ?\
 |  ^~~~
   include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
  56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) 
) )
 |^~
   drivers/iommu/io-pgtable-arm-v7s.c:703:32: note: in expansion of macro 'if'
 703 | } else if (!gather->queued) {
 |^~


vim +703 drivers/iommu/io-pgtable-arm-v7s.c

   650  
   651  static size_t __arm_v7s_unmap(struct arm_v7s_io_pgtable *data,
   652struct iommu_iotlb_gather *gather,
   653unsigned long iova, size_t size, int lvl,
   654arm_v7s_iopte *ptep)
   655  {
   656  arm_v7s_iopte pte[ARM_V7S_CONT_PAGES];
   657  struct io_pgtable *iop = &data->iop;
   658  int idx, i = 0, num_entries = size >> ARM_V7S_LVL_SHIFT(lvl);
   659  
   660  /* Something went horribly wrong and we ran out of page table */
   661  if (WARN_ON(lvl > 2))
   662  return 0;
   663  
   664  idx = 

Re: [PATCH v2 4/8] iommu/dma: Support granule > PAGE_SIZE in dma_map_sg

2021-08-28 Thread kernel test robot
Hi Sven,

I love your patch! Perhaps something to improve:

[auto build test WARNING on iommu/next]
[also build test WARNING on v5.14-rc7 next-20210827]
[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/Sven-Peter/Support-IOMMU-page-sizes-larger-than-the-CPU-page-size/20210828-233909
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: i386-randconfig-c001-20210827 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 
4e1a164d7bd53653f79decc121afe784d2fde0a7)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# 
https://github.com/0day-ci/linux/commit/fa978f84667cfd7d8cb467899da60c08321798a5
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Sven-Peter/Support-IOMMU-page-sizes-larger-than-the-CPU-page-size/20210828-233909
git checkout fa978f84667cfd7d8cb467899da60c08321798a5
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>):

   drivers/iommu/dma-iommu.c:935:18: error: implicit declaration of function 
'phys_to_page' [-Werror,-Wimplicit-function-declaration]
   sg_set_page(s, phys_to_page(sg_phys(s) + s_iova_off), 
s_length,
  ^
>> drivers/iommu/dma-iommu.c:935:18: warning: incompatible integer to pointer 
>> conversion passing 'int' to parameter of type 'struct page *' 
>> [-Wint-conversion]
   sg_set_page(s, phys_to_page(sg_phys(s) + s_iova_off), 
s_length,
  ^
   include/linux/scatterlist.h:110:69: note: passing argument to parameter 
'page' here
   static inline void sg_set_page(struct scatterlist *sg, struct page *page,
   ^
   drivers/iommu/dma-iommu.c:982:9: error: implicit declaration of function 
'phys_to_page' [-Werror,-Wimplicit-function-declaration]
   phys_to_page(sg_phys(s) + 
sg_dma_address(s)),
   ^
   drivers/iommu/dma-iommu.c:982:9: warning: incompatible integer to pointer 
conversion passing 'int' to parameter of type 'struct page *' [-Wint-conversion]
   phys_to_page(sg_phys(s) + 
sg_dma_address(s)),
   
^~~~
   include/linux/scatterlist.h:110:69: note: passing argument to parameter 
'page' here
   static inline void sg_set_page(struct scatterlist *sg, struct page *page,
   ^
   drivers/iommu/dma-iommu.c:1068:18: error: implicit declaration of function 
'phys_to_page' [-Werror,-Wimplicit-function-declaration]
   sg_set_page(s, phys_to_page(s_phys - s_iova_off),
  ^
   drivers/iommu/dma-iommu.c:1068:18: warning: incompatible integer to pointer 
conversion passing 'int' to parameter of type 'struct page *' [-Wint-conversion]
   sg_set_page(s, phys_to_page(s_phys - s_iova_off),
  ^
   include/linux/scatterlist.h:110:69: note: passing argument to parameter 
'page' here
   static inline void sg_set_page(struct scatterlist *sg, struct page *page,
   ^
   3 warnings and 3 errors generated.


vim +935 drivers/iommu/dma-iommu.c

   913  
   914  /*
   915   * Prepare a successfully-mapped scatterlist to give back to the caller.
   916   *
   917   * At this point the segments are already laid out by 
iommu_dma_map_sg() to
   918   * avoid individually crossing any boundaries, so we merely need to 
check a
   919   * segment's start address to avoid concatenating across one.
   920   */
   921  static int __finalise_sg(struct device *dev, struct scatterlist *sg, 
int nents,
   922  dma_addr_t dma_addr)
   923  {
   924  struct scatterlist *s, *cur = sg;
   925  unsigned long seg_mask = dma_get_seg_boundary(dev);
   926  unsigned int cur_len = 0, max_len = dma_get_max_seg_size(dev);
   927  int i, count = 0;
   928  
   929  for_each_sg(sg, s, nents, i) {
   930  /* Resto

Re: [PATCH v2 4/8] iommu/dma: Support granule > PAGE_SIZE in dma_map_sg

2021-08-28 Thread kernel test robot
Hi Sven,

I love your patch! Perhaps something to improve:

[auto build test WARNING on iommu/next]
[also build test WARNING on v5.14-rc7 next-20210827]
[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/Sven-Peter/Support-IOMMU-page-sizes-larger-than-the-CPU-page-size/20210828-233909
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: x86_64-randconfig-m001-20210827 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# 
https://github.com/0day-ci/linux/commit/fa978f84667cfd7d8cb467899da60c08321798a5
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Sven-Peter/Support-IOMMU-page-sizes-larger-than-the-CPU-page-size/20210828-233909
git checkout fa978f84667cfd7d8cb467899da60c08321798a5
# 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 

All warnings (new ones prefixed by >>):

   drivers/iommu/dma-iommu.c: In function '__finalise_sg':
   drivers/iommu/dma-iommu.c:935:18: error: implicit declaration of function 
'phys_to_page'; did you mean 'pfn_to_page'? 
[-Werror=implicit-function-declaration]
 935 |   sg_set_page(s, phys_to_page(sg_phys(s) + s_iova_off), s_length,
 |  ^~~~
 |  pfn_to_page
>> drivers/iommu/dma-iommu.c:935:18: warning: passing argument 2 of 
>> 'sg_set_page' makes pointer from integer without a cast [-Wint-conversion]
 935 |   sg_set_page(s, phys_to_page(sg_phys(s) + s_iova_off), s_length,
 |  ^
 |  |
 |  int
   In file included from include/linux/dma-mapping.h:10,
from include/linux/dma-map-ops.h:9,
from drivers/iommu/dma-iommu.c:13:
   include/linux/scatterlist.h:110:69: note: expected 'struct page *' but 
argument is of type 'int'
 110 | static inline void sg_set_page(struct scatterlist *sg, struct page 
*page,
 |
~^~~~
   drivers/iommu/dma-iommu.c: In function '__invalidate_sg':
   drivers/iommu/dma-iommu.c:982:9: warning: passing argument 2 of 
'sg_set_page' makes pointer from integer without a cast [-Wint-conversion]
 982 | phys_to_page(sg_phys(s) + sg_dma_address(s)),
 | ^~~~
 | |
 | int
   In file included from include/linux/dma-mapping.h:10,
from include/linux/dma-map-ops.h:9,
from drivers/iommu/dma-iommu.c:13:
   include/linux/scatterlist.h:110:69: note: expected 'struct page *' but 
argument is of type 'int'
 110 | static inline void sg_set_page(struct scatterlist *sg, struct page 
*page,
 |
~^~~~
   drivers/iommu/dma-iommu.c: In function 'iommu_dma_map_sg':
   drivers/iommu/dma-iommu.c:1068:18: warning: passing argument 2 of 
'sg_set_page' makes pointer from integer without a cast [-Wint-conversion]
1068 |   sg_set_page(s, phys_to_page(s_phys - s_iova_off),
 |  ^
 |  |
 |  int
   In file included from include/linux/dma-mapping.h:10,
from include/linux/dma-map-ops.h:9,
from drivers/iommu/dma-iommu.c:13:
   include/linux/scatterlist.h:110:69: note: expected 'struct page *' but 
argument is of type 'int'
 110 | static inline void sg_set_page(struct scatterlist *sg, struct page 
*page,
 |
~^~~~
   cc1: some warnings being treated as errors


vim +/sg_set_page +935 drivers/iommu/dma-iommu.c

   913  
   914  /*
   915   * Prepare a successfully-mapped scatterlist to give back to the caller.
   916   *
   917   * At this point the segments are already laid out by 
iommu_dma_map_sg() to
   918   * avoid individually crossing any boundaries, so we merely need to 
check a
   919   * segment's start address to avoid concatenating across one.
   920   */
   921  static int __finalise_sg(struct device *dev, struct scatterlist *sg, 
int nents,
   922  dma_addr_t dma_addr)
   923  {
   924  struct scatterlist *s, *cur = sg;
   925  unsigned long seg_mask = dma_get_seg_boundary(dev);
  

Re: [PATCH v2 4/8] iommu/dma: Support granule > PAGE_SIZE in dma_map_sg

2021-08-28 Thread kernel test robot
Hi Sven,

I love your patch! Perhaps something to improve:

[auto build test WARNING on iommu/next]
[also build test WARNING on v5.14-rc7 next-20210827]
[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/Sven-Peter/Support-IOMMU-page-sizes-larger-than-the-CPU-page-size/20210828-233909
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: x86_64-randconfig-r004-20210827 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 
4e1a164d7bd53653f79decc121afe784d2fde0a7)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# 
https://github.com/0day-ci/linux/commit/fa978f84667cfd7d8cb467899da60c08321798a5
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Sven-Peter/Support-IOMMU-page-sizes-larger-than-the-CPU-page-size/20210828-233909
git checkout fa978f84667cfd7d8cb467899da60c08321798a5
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>):

   drivers/iommu/dma-iommu.c:935:18: error: implicit declaration of function 
'phys_to_page' [-Werror,-Wimplicit-function-declaration]
   sg_set_page(s, phys_to_page(sg_phys(s) + s_iova_off), 
s_length,
  ^
>> drivers/iommu/dma-iommu.c:935:18: warning: incompatible integer to pointer 
>> conversion passing 'int' to parameter of type 'struct page *' 
>> [-Wint-conversion]
   sg_set_page(s, phys_to_page(sg_phys(s) + s_iova_off), 
s_length,
  ^
   include/linux/scatterlist.h:110:69: note: passing argument to parameter 
'page' here
   static inline void sg_set_page(struct scatterlist *sg, struct page *page,
   ^
   drivers/iommu/dma-iommu.c:982:9: error: implicit declaration of function 
'phys_to_page' [-Werror,-Wimplicit-function-declaration]
   phys_to_page(sg_phys(s) + 
sg_dma_address(s)),
   ^
   drivers/iommu/dma-iommu.c:982:9: warning: incompatible integer to pointer 
conversion passing 'int' to parameter of type 'struct page *' [-Wint-conversion]
   phys_to_page(sg_phys(s) + 
sg_dma_address(s)),
   
^~~~
   include/linux/scatterlist.h:110:69: note: passing argument to parameter 
'page' here
   static inline void sg_set_page(struct scatterlist *sg, struct page *page,
   ^
   drivers/iommu/dma-iommu.c:1068:18: error: implicit declaration of function 
'phys_to_page' [-Werror,-Wimplicit-function-declaration]
   sg_set_page(s, phys_to_page(s_phys - s_iova_off),
  ^
   drivers/iommu/dma-iommu.c:1068:18: warning: incompatible integer to pointer 
conversion passing 'int' to parameter of type 'struct page *' [-Wint-conversion]
   sg_set_page(s, phys_to_page(s_phys - s_iova_off),
  ^
   include/linux/scatterlist.h:110:69: note: passing argument to parameter 
'page' here
   static inline void sg_set_page(struct scatterlist *sg, struct page *page,
   ^
   3 warnings and 3 errors generated.


vim +935 drivers/iommu/dma-iommu.c

   913  
   914  /*
   915   * Prepare a successfully-mapped scatterlist to give back to the caller.
   916   *
   917   * At this point the segments are already laid out by 
iommu_dma_map_sg() to
   918   * avoid individually crossing any boundaries, so we merely need to 
check a
   919   * segment's start address to avoid concatenating across one.
   920   */
   921  static int __finalise_sg(struct device *dev, struct scatterlist *sg, 
int nents,
   922  dma_addr_t dma_addr)
   923  {
   924  struct scatterlist *s, *cur = sg;
   925  unsigned long seg_mask = dma_get_seg_boundary(dev);
   926  unsigned int cur_len = 0, max_len = dma_get_max_seg_size(dev);
   927  int i, count = 0;
   928  
   929  for_each_sg(sg, s, nents, i) {
   930  /* R

Re: [PATCH] iommu/qcom: add missing put_device() call in qcom_iommu_of_xlate()

2020-09-21 Thread kernel test robot
Hi Yu,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on iommu/next]
[also build test WARNING on linus/master v5.9-rc6 next-20200921]
[cannot apply to robclark/msm-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
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Yu-Kuai/iommu-qcom-add-missing-put_device-call-in-qcom_iommu_of_xlate/20200918-091341
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: arm64-randconfig-r023-20200920 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 
4e8c028158b56d9c2142a62464e8e0686bde3584)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>):

>> drivers/iommu/arm/arm-smmu/qcom_iommu.c:601:4: warning: misleading 
>> indentation; statement is not part of the previous 'if' 
>> [-Wmisleading-indentation]
   return -EINVAL;
   ^
   drivers/iommu/arm/arm-smmu/qcom_iommu.c:599:3: note: previous statement is 
here
   if (WARN_ON(qcom_iommu != dev_iommu_priv_get(dev)))
   ^
   1 warning generated.

# 
https://github.com/0day-ci/linux/commit/2d982fb40897ad8088dd9dba06aee499f51c73ba
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Yu-Kuai/iommu-qcom-add-missing-put_device-call-in-qcom_iommu_of_xlate/20200918-091341
git checkout 2d982fb40897ad8088dd9dba06aee499f51c73ba
vim +/if +601 drivers/iommu/arm/arm-smmu/qcom_iommu.c

0ae349a0f33fb0 drivers/iommu/qcom_iommu.c  Rob Clark2017-08-09  
562  
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c  Rob Clark2017-08-09  
563  static int qcom_iommu_of_xlate(struct device *dev, struct of_phandle_args 
*args)
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c  Rob Clark2017-08-09  
564  {
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c  Rob Clark2017-08-09  
565 struct qcom_iommu_dev *qcom_iommu;
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c  Rob Clark2017-08-09  
566 struct platform_device *iommu_pdev;
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c  Rob Clark2017-08-09  
567 unsigned asid = args->args[0];
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c  Rob Clark2017-08-09  
568  
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c  Rob Clark2017-08-09  
569 if (args->args_count != 1) {
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c  Rob Clark2017-08-09  
570 dev_err(dev, "incorrect number of iommu params found for %s "
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c  Rob Clark2017-08-09  
571 "(found %d, expected 1)\n",
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c  Rob Clark2017-08-09  
572 args->np->full_name, args->args_count);
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c  Rob Clark2017-08-09  
573 return -EINVAL;
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c  Rob Clark2017-08-09  
574 }
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c  Rob Clark2017-08-09  
575  
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c  Rob Clark2017-08-09  
576 iommu_pdev = of_find_device_by_node(args->np);
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c  Rob Clark2017-08-09  
577 if (WARN_ON(!iommu_pdev))
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c  Rob Clark2017-08-09  
578 return -EINVAL;
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c  Rob Clark2017-08-09  
579  
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c  Rob Clark2017-08-09  
580 qcom_iommu = platform_get_drvdata(iommu_pdev);
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c  Rob Clark2017-08-09  
581  
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c  Rob Clark2017-08-09  
582 /* make sure the asid specified in dt is valid, so we don't have
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c  Rob Clark2017-08-09  
583  * to sanity check this elsewhere, since 'asid - 1' is used to
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c  Rob Clark2017-08-09  
584  * index into qcom_

Re: [PATCH] iommu/qcom: add missing put_device() call in qcom_iommu_of_xlate()

2020-09-22 Thread kernel test robot
Hi Yu,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on iommu/next]
[also build test WARNING on linus/master v5.9-rc6 next-20200922]
[cannot apply to robclark/msm-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
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Yu-Kuai/iommu-qcom-add-missing-put_device-call-in-qcom_iommu_of_xlate/20200918-091341
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: arm64-randconfig-m031-20200923 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
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
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross 
ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>):

   In file included from arch/arm64/include/asm/atomic.h:12,
from include/linux/atomic.h:7,
from drivers/iommu/arm/arm-smmu/qcom_iommu.c:9:
   drivers/iommu/arm/arm-smmu/qcom_iommu.c: In function 'qcom_iommu_of_xlate':
>> include/linux/compiler.h:56:23: warning: this 'if' clause does not guard... 
>> [-Wmisleading-indentation]
  56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) 
) )
 |   ^~
   drivers/iommu/arm/arm-smmu/qcom_iommu.c:599:3: note: in expansion of macro 
'if'
 599 |   if (WARN_ON(qcom_iommu != dev_iommu_priv_get(dev)))
 |   ^~
   drivers/iommu/arm/arm-smmu/qcom_iommu.c:601:4: note: ...this statement, but 
the latter is misleadingly indented as if it were guarded by the 'if'
 601 |return -EINVAL;
 |^~

# 
https://github.com/0day-ci/linux/commit/2d982fb40897ad8088dd9dba06aee499f51c73ba
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Yu-Kuai/iommu-qcom-add-missing-put_device-call-in-qcom_iommu_of_xlate/20200918-091341
git checkout 2d982fb40897ad8088dd9dba06aee499f51c73ba
vim +/if +56 include/linux/compiler.h

2bcd521a684cc9 Steven Rostedt 2008-11-21  50  
2bcd521a684cc9 Steven Rostedt 2008-11-21  51  #ifdef CONFIG_PROFILE_ALL_BRANCHES
2bcd521a684cc9 Steven Rostedt 2008-11-21  52  /*
2bcd521a684cc9 Steven Rostedt 2008-11-21  53   * "Define 'is'", Bill Clinton
2bcd521a684cc9 Steven Rostedt 2008-11-21  54   * "Define 'if'", Steven Rostedt
2bcd521a684cc9 Steven Rostedt 2008-11-21  55   */
a15fd609ad53a6 Linus Torvalds 2019-03-20 @56  #define if(cond, ...) if ( 
__trace_if_var( !!(cond , ## __VA_ARGS__) ) )
a15fd609ad53a6 Linus Torvalds 2019-03-20  57  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH 1/4] of/fdt: Update zone_dma_bits when running in bcm2711

2020-10-02 Thread kernel test robot
Hi Nicolas,

I love your patch! Perhaps something to improve:

[auto build test WARNING on next-20201001]
[also build test WARNING on v5.9-rc7]
[cannot apply to robh/for-next arm64/for-next/core hnaz-linux-mm/master 
linus/master v5.9-rc7 v5.9-rc6 v5.9-rc5]
[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/Nicolas-Saenz-Julienne/arm64-Default-to-32-bit-wide-ZONE_DMA/20201002-002007
base:d39294091fee6b89d9c4a683bb19441b25098330
config: arm64-randconfig-r005-20200930 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 
bcd05599d0e53977a963799d6ee4f6e0bc21331b)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# 
https://github.com/0day-ci/linux/commit/7d073ab6c280772b1bcf9e337528be2138d0bc85
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Nicolas-Saenz-Julienne/arm64-Default-to-32-bit-wide-ZONE_DMA/20201002-002007
git checkout 7d073ab6c280772b1bcf9e337528be2138d0bc85
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>):

>> drivers/of/fdt.c:1202:13: warning: no previous prototype for function 
>> 'early_init_dt_update_zone_dma_bits' [-Wmissing-prototypes]
   void __init early_init_dt_update_zone_dma_bits(void)
   ^
   drivers/of/fdt.c:1202:1: note: declare 'static' if the function is not 
intended to be used outside of this translation unit
   void __init early_init_dt_update_zone_dma_bits(void)
   ^
   static 
   1 warning generated.

vim +/early_init_dt_update_zone_dma_bits +1202 drivers/of/fdt.c

  1201  
> 1202  void __init early_init_dt_update_zone_dma_bits(void)
  1203  {
  1204  unsigned long dt_root = of_get_flat_dt_root();
  1205  
  1206  if (of_flat_dt_is_compatible(dt_root, "brcm,bcm2711"))
  1207  zone_dma_bits = 30;
  1208  }
  1209  

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH] RDMA: Fix software RDMA drivers for dma mapping error

2020-10-28 Thread kernel test robot
Hi Parav,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on rdma/for-next]
[also build test ERROR on v5.10-rc1 next-20201028]
[cannot apply to hch-configfs/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
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Parav-Pandit/RDMA-Fix-software-RDMA-drivers-for-dma-mapping-error/20201027-205440
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-next
config: x86_64-rhel-8.3 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# 
https://github.com/0day-ci/linux/commit/cbe9509f0d3a076646d576c1d1f5adc59159316c
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Parav-Pandit/RDMA-Fix-software-RDMA-drivers-for-dma-mapping-error/20201027-205440
git checkout cbe9509f0d3a076646d576c1d1f5adc59159316c
# 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 

All errors (new ones prefixed by >>):

   drivers/infiniband/sw/rxe/rxe_verbs.c: In function 'rxe_register_device':
>> drivers/infiniband/sw/rxe/rxe_verbs.c:1133:48: error: 'DMA_MASK_NONE' 
>> undeclared (first use in this function); did you mean 'CPU_MASK_NONE'?
1133 |  err = dma_coerce_mask_and_coherent(&dev->dev, DMA_MASK_NONE);
 |^
 |CPU_MASK_NONE
   drivers/infiniband/sw/rxe/rxe_verbs.c:1133:48: note: each undeclared 
identifier is reported only once for each function it appears in
--
   drivers/infiniband/sw/siw/siw_main.c: In function 'siw_device_create':
>> drivers/infiniband/sw/siw/siw_main.c:387:51: error: 'DMA_MASK_NONE' 
>> undeclared (first use in this function); did you mean 'CPU_MASK_NONE'?
 387 |  if (dma_coerce_mask_and_coherent(&base_dev->dev, DMA_MASK_NONE))
 |   ^
 |   CPU_MASK_NONE
   drivers/infiniband/sw/siw/siw_main.c:387:51: note: each undeclared 
identifier is reported only once for each function it appears in

vim +1133 drivers/infiniband/sw/rxe/rxe_verbs.c

  1115  
  1116  int rxe_register_device(struct rxe_dev *rxe, const char *ibdev_name)
  1117  {
  1118  int err;
  1119  struct ib_device *dev = &rxe->ib_dev;
  1120  struct crypto_shash *tfm;
  1121  
  1122  strlcpy(dev->node_desc, "rxe", sizeof(dev->node_desc));
  1123  
  1124  dev->node_type = RDMA_NODE_IB_CA;
  1125  dev->phys_port_cnt = 1;
  1126  dev->num_comp_vectors = num_possible_cpus();
  1127  dev->dev.parent = rxe_dma_device(rxe);
  1128  dev->local_dma_lkey = 0;
  1129  addrconf_addr_eui48((unsigned char *)&dev->node_guid,
  1130  rxe->ndev->dev_addr);
  1131  dev->dev.dma_parms = &rxe->dma_parms;
  1132  dma_set_max_seg_size(&dev->dev, UINT_MAX);
> 1133  err = dma_coerce_mask_and_coherent(&dev->dev, DMA_MASK_NONE);

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v2 1/2] dma-mapping: add benchmark support for streaming DMA APIs

2020-11-01 Thread kernel test robot
Hi Barry,

I love your patch! Yet something to improve:

[auto build test ERROR on kselftest/next]
[also build test ERROR on linus/master v5.10-rc1 next-20201030]
[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/Barry-Song/dma-mapping-provide-a-benchmark-for-streaming-DMA-mapping/20201101-182009
base:   
https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git next
config: mips-allyesconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# 
https://github.com/0day-ci/linux/commit/b9abda38be7f32b9420c27b6c24eff2e69defa87
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Barry-Song/dma-mapping-provide-a-benchmark-for-streaming-DMA-mapping/20201101-182009
git checkout b9abda38be7f32b9420c27b6c24eff2e69defa87
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross 
ARCH=mips 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

   arch/mips/kernel/head.o: in function `dtb_found':
   (.ref.text+0xe0): relocation truncated to fit: R_MIPS_26 against 
`start_kernel'
   init/main.o: in function `set_reset_devices':
   main.c:(.init.text+0x20): relocation truncated to fit: R_MIPS_26 against 
`_mcount'
   main.c:(.init.text+0x30): relocation truncated to fit: R_MIPS_26 against 
`__sanitizer_cov_trace_pc'
   init/main.o: in function `debug_kernel':
   main.c:(.init.text+0x9c): relocation truncated to fit: R_MIPS_26 against 
`_mcount'
   main.c:(.init.text+0xac): relocation truncated to fit: R_MIPS_26 against 
`__sanitizer_cov_trace_pc'
   init/main.o: in function `quiet_kernel':
   main.c:(.init.text+0x118): relocation truncated to fit: R_MIPS_26 against 
`_mcount'
   main.c:(.init.text+0x128): relocation truncated to fit: R_MIPS_26 against 
`__sanitizer_cov_trace_pc'
   init/main.o: in function `init_setup':
   main.c:(.init.text+0x1a4): relocation truncated to fit: R_MIPS_26 against 
`_mcount'
   main.c:(.init.text+0x1c8): relocation truncated to fit: R_MIPS_26 against 
`__sanitizer_cov_trace_pc'
   main.c:(.init.text+0x1e8): relocation truncated to fit: R_MIPS_26 against 
`__sanitizer_cov_trace_pc'
   main.c:(.init.text+0x1fc): additional relocation overflows omitted from the 
output
   mips-linux-ld: kernel/dma/map_benchmark.o: in function 
`map_benchmark_thread':
>> map_benchmark.c:(.text.map_benchmark_thread+0x1f4): undefined reference to 
>> `__divdi3'
>> mips-linux-ld: map_benchmark.c:(.text.map_benchmark_thread+0x218): undefined 
>> reference to `__divdi3'
   mips-linux-ld: kernel/dma/map_benchmark.o: in function `do_map_benchmark':
>> map_benchmark.c:(.text.do_map_benchmark+0x260): undefined reference to 
>> `__udivdi3'
>> mips-linux-ld: map_benchmark.c:(.text.do_map_benchmark+0x284): undefined 
>> reference to `__udivdi3'
   mips-linux-ld: map_benchmark.c:(.text.do_map_benchmark+0x2b4): undefined 
reference to `__udivdi3'
   mips-linux-ld: map_benchmark.c:(.text.do_map_benchmark+0x300): undefined 
reference to `__udivdi3'

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v2 1/2] dma-mapping: add benchmark support for streaming DMA APIs

2020-11-01 Thread kernel test robot
Hi Barry,

I love your patch! Yet something to improve:

[auto build test ERROR on kselftest/next]
[also build test ERROR on linus/master v5.10-rc1]
[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/Barry-Song/dma-mapping-provide-a-benchmark-for-streaming-DMA-mapping/20201101-182009
base:   
https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git next
config: h8300-allyesconfig (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# 
https://github.com/0day-ci/linux/commit/b9abda38be7f32b9420c27b6c24eff2e69defa87
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Barry-Song/dma-mapping-provide-a-benchmark-for-streaming-DMA-mapping/20201101-182009
git checkout b9abda38be7f32b9420c27b6c24eff2e69defa87
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross 
ARCH=h8300 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

   h8300-linux-ld: kernel/dma/map_benchmark.o: in function `.L28':
   map_benchmark.c:(.text+0x283): undefined reference to `__udivdi3'
>> h8300-linux-ld: map_benchmark.c:(.text+0x2c1): undefined reference to 
>> `__udivdi3'
   h8300-linux-ld: map_benchmark.c:(.text+0x327): undefined reference to 
`__udivdi3'
   h8300-linux-ld: kernel/dma/map_benchmark.o: in function `.L26':
   map_benchmark.c:(.text+0x3d7): undefined reference to `__udivdi3'
   h8300-linux-ld: kernel/dma/map_benchmark.o: in function `.L44':
   map_benchmark.c:(.text+0x799): undefined reference to `__divdi3'
   h8300-linux-ld: kernel/dma/map_benchmark.o: in function `.L45':
   map_benchmark.c:(.text+0x7f5): undefined reference to `__divdi3'

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

  1   2   >