Re: [PATCH] iommu/iova: Add support for IOVA max alignment tuning

2021-10-13 Thread kernel test robot
Hi Georgi,

I love your patch! Yet something to improve:

[auto build test ERROR on joro-iommu/next]
[also build test ERROR on hnaz-mm/master linus/master v5.15-rc5 next-20211013]
[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/Georgi-Djakov/iommu-iova-Add-support-for-IOVA-max-alignment-tuning/20211014-021248
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: i386-randconfig-a003-20211013 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 
b6a8c695542b2987eb9a203d5663a0740cb4725f)
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/dc4cf3ea22a4c30a8a2c395e830ea37dd819
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Georgi-Djakov/iommu-iova-Add-support-for-IOVA-max-alignment-tuning/20211014-021248
git checkout dc4cf3ea22a4c30a8a2c395e830ea37dd819
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 
O=build_dir ARCH=i386 SHELL=/bin/bash drivers/iommu/

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

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

>> drivers/iommu/iova.c:52:13: error: expected parameter declarator
   early_param("iommu.max_align_shift", iommu_set_def_max_align_shift);
   ^
>> drivers/iommu/iova.c:52:13: error: expected ')'
   drivers/iommu/iova.c:52:12: note: to match this '('
   early_param("iommu.max_align_shift", iommu_set_def_max_align_shift);
  ^
>> drivers/iommu/iova.c:52:1: warning: declaration specifier missing, 
>> defaulting to 'int'
   early_param("iommu.max_align_shift", iommu_set_def_max_align_shift);
   ^
   int
>> drivers/iommu/iova.c:52:12: error: this function declaration is not a 
>> prototype [-Werror,-Wstrict-prototypes]
   early_param("iommu.max_align_shift", iommu_set_def_max_align_shift);
  ^
 void
   1 warning and 3 errors generated.


vim +52 drivers/iommu/iova.c

40  
41  static int __init iommu_set_def_max_align_shift(char *str)
42  {
43  unsigned long max_align_shift;
44  
45  int ret = kstrtoul(str, 10, _align_shift);
46  
47  if (!ret)
48  iommu_max_align_shift = max_align_shift;
49  
50  return 0;
51  }
  > 52  early_param("iommu.max_align_shift", iommu_set_def_max_align_shift);
53  

---
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 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  /* Restore this segment's original unaligned fields 
first */
   931  unsigned int s_iova_off = sg_dma_address(s);
   932  

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);
   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, 

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  /* Restore this segment's original unaligned fields 
first */
   931  unsigned int s_iova_off = sg_dma_address(s);
   932  

[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 = >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 = ARM_V7S_LVL_IDX(iova, lvl, >cfg);
   665  ptep += idx;
   666  do {
   667  pte[i] = READ_ONCE(ptep[i]);

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 and map a bounce buffer.
b097186fd2

[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_sync_map = apple_dart_iotlb_sync_map,
   734  .iova_to_phys = apple_dart_iova_to_phys,
   735  .probe_device = apple_dart_probe_device,
   736  .release_device = apple_dart_release_device,
   737

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 = >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

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, parent, new);
99  rb_insert_color(>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 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 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 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

[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,
 |^~~
   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,
 |^~~
   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, >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, >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,
 > 249  "Failed to reserve IOVA 
 > [%#010llx-%#010llx]\n",
   250  start, end);
   251  return -EINVAL;
   252

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

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 = _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 = 
_dte_pt_address,
ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25  1381  .mk_dtentries = 
_mk_dte,
ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25  1382  .mk_ptentries = 
_mk_pte,
ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25  1383  .dte_addr_phys = 
_dte_addr_phys,
ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25 @1384  .dma_addr_dte = 
_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: 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 = _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 = 
_dte_pt_address,
ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25  1381  .mk_dtentries = 
_mk_dte,
ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25  1382  .mk_ptentries = 
_mk_pte,
ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25  1383  .dte_addr_phys = 
_dte_addr_phys,
ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25 @1384  .dma_addr_dte = 
_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 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 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(>iova_rbtree_lock);
61  iovad->rbroot = RB_ROOT;
62  iovad->cached_node = >anchor.node;
63  iovad->cached32_node = >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(>anchor.node, NULL, >rbroot.rb_node);
72  rb_insert_color(>anchor.node, >rbroot);
73  cpuhp_state_add_instance_nocalls(CPUHP_IOMMU_IOVA_DEAD, 
>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

[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 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

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, >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 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 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 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! 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 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-v3/arm-smmu-v3.c Jea

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_enabled,
f534d98b9d2705 drivers/iom

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(>pdev->dev, NULL, flags);
   310  if (IS_ERR(sva)) {
   311  dev_warn(>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(>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-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(>pdev->dev, NULL, flags);
   310  if (IS_ERR(sva)) {
   311  dev_warn(>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(>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 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(>lock);
  2913  
  2914  list_for_each_entry(d, >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, >domain_list, 
next) {
> 2922  iommu_unbind_guest_msi(d->domain, giova);
  2923  }
  2924  unlock:
  2925  mutex_unlock(>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 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 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 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 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 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(>lock);
  2624  list_for_each_entry(d, >domain_list, next)
  2625  iommu_detach_pasid_table(d->domain);
  2626  
  2627  mutex_unlock(>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(>lock);
  2637  
  2638  list_for_each_entry(d, >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, 
>domain_list, next)
  2642  iommu_detach_pasid_table(d->domain);
  2643  break;
  2644  }
  2645

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 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

[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 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(>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(>pgtlock, flags);
   383  
   384  return pa;
   385  }
   386  

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


.config.gz
Description: application/gzip
_

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

2021-01-21 Thread kernel test robot
Hi Chunyan,

I love your patch! Yet something to improve:

[auto build test ERROR on robh/for-next]
[also build test ERROR on v5.11-rc4 next-20210121]
[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/Chunyan-Zhang/Add-Unisoc-iommu-basic-driver/20210121-194023
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-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/891db11d7229149235a02e5bc31a61188243a5d7
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Chunyan-Zhang/Add-Unisoc-iommu-basic-driver/20210121-194023
git checkout 891db11d7229149235a02e5bc31a61188243a5d7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc 

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

All errors (new ones prefixed by >>):

   drivers/iommu/sprd-iommu.c: In function 'sprd_iommu_attach_device':
>> drivers/iommu/sprd-iommu.c:248:16: error: implicit declaration of function 
>> 'dma_alloc_coherent' [-Werror=implicit-function-declaration]
 248 |  dom->pgt_va = dma_alloc_coherent(sdev->dev, pgt_size, >pgt_pa, 
GFP_KERNEL);
 |^~
   drivers/iommu/sprd-iommu.c:248:14: warning: assignment to 'u32 *' {aka 
'unsigned int *'} from 'int' makes pointer from integer without a cast 
[-Wint-conversion]
 248 |  dom->pgt_va = dma_alloc_coherent(sdev->dev, pgt_size, >pgt_pa, 
GFP_KERNEL);
 |  ^
   drivers/iommu/sprd-iommu.c: In function 'sprd_iommu_detach_device':
>> drivers/iommu/sprd-iommu.c:270:2: error: implicit declaration of function 
>> 'dma_free_coherent' [-Werror=implicit-function-declaration]
 270 |  dma_free_coherent(sdev->dev, pgt_size, dom->pgt_va, dom->pgt_pa);
 |  ^
   In file included from include/linux/device.h:15,
from drivers/iommu/sprd-iommu.c:10:
   drivers/iommu/sprd-iommu.c: In function 'sprd_iommu_map':
   drivers/iommu/sprd-iommu.c:296:27: warning: format '%lx' expects argument of 
type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'} 
[-Wformat=]
 296 |   dev_err(dom->sdev->dev, "(iova(0x%lx) + sixe(0x%lx)) are not in 
the range!\n",
 |   
^
   include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
  19 | #define dev_fmt(fmt) fmt
 |  ^~~
   drivers/iommu/sprd-iommu.c:296:3: note: in expansion of macro 'dev_err'
 296 |   dev_err(dom->sdev->dev, "(iova(0x%lx) + sixe(0x%lx)) are not in 
the range!\n",
 |   ^~~
   drivers/iommu/sprd-iommu.c:296:52: note: format string is defined here
 296 |   dev_err(dom->sdev->dev, "(iova(0x%lx) + sixe(0x%lx)) are not in 
the range!\n",
 |  ~~^
 ||
 |long unsigned int
 |  %x
   drivers/iommu/sprd-iommu.c:279:38: warning: variable 'mdata' set but not 
used [-Wunused-but-set-variable]
 279 |  const struct sprd_iommu_match_data *mdata;
 |  ^
   drivers/iommu/sprd-iommu.c: In function 'sprd_iommu_probe':
   drivers/iommu/sprd-iommu.c:483:21: warning: assignment to 'u32 *' {aka 
'unsigned int *'} from 'int' makes pointer from integer without a cast 
[-Wint-conversion]
 483 |  sdev->prot_page_va = dma_alloc_coherent(dev, SPRD_IOMMU_PAGE_SIZE,
 | ^
   cc1: some warnings being treated as errors


vim +/dma_alloc_coherent +248 drivers/iommu/sprd-iommu.c

   240  
   241  static int sprd_iommu_attach_device(struct iommu_domain *domain,
   242  struct device *dev)
   243  {
   244  struct sprd_iommu_device *sdev = dev_iommu_priv_get(dev);
   245  struct sprd_iommu_domain *dom = to_sprd_domain(domain);
   246  size_t pgt_size = sprd_iommu_pgt_size(domain);
   247  
 > 248  dom->pgt_va = dma_alloc_coherent(sdev->dev, pgt_size, 
 > >pgt_pa, GFP_KERNEL);
   249  if (!dom->pgt_va)
   250 

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

2021-01-21 Thread kernel test robot
Hi Chunyan,

I love your patch! Perhaps something to improve:

[auto build test WARNING on robh/for-next]
[also build test WARNING on v5.11-rc4 next-20210121]
[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/Chunyan-Zhang/Add-Unisoc-iommu-basic-driver/20210121-194023
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-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/891db11d7229149235a02e5bc31a61188243a5d7
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Chunyan-Zhang/Add-Unisoc-iommu-basic-driver/20210121-194023
git checkout 891db11d7229149235a02e5bc31a61188243a5d7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc 

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

All warnings (new ones prefixed by >>):

   drivers/iommu/sprd-iommu.c: In function 'sprd_iommu_attach_device':
   drivers/iommu/sprd-iommu.c:248:16: error: implicit declaration of function 
'dma_alloc_coherent' [-Werror=implicit-function-declaration]
 248 |  dom->pgt_va = dma_alloc_coherent(sdev->dev, pgt_size, >pgt_pa, 
GFP_KERNEL);
 |^~
>> drivers/iommu/sprd-iommu.c:248:14: warning: assignment to 'u32 *' {aka 
>> 'unsigned int *'} from 'int' makes pointer from integer without a cast 
>> [-Wint-conversion]
 248 |  dom->pgt_va = dma_alloc_coherent(sdev->dev, pgt_size, >pgt_pa, 
GFP_KERNEL);
 |  ^
   drivers/iommu/sprd-iommu.c: In function 'sprd_iommu_detach_device':
   drivers/iommu/sprd-iommu.c:270:2: error: implicit declaration of function 
'dma_free_coherent' [-Werror=implicit-function-declaration]
 270 |  dma_free_coherent(sdev->dev, pgt_size, dom->pgt_va, dom->pgt_pa);
 |  ^
   In file included from include/linux/device.h:15,
from drivers/iommu/sprd-iommu.c:10:
   drivers/iommu/sprd-iommu.c: In function 'sprd_iommu_map':
>> drivers/iommu/sprd-iommu.c:296:27: warning: format '%lx' expects argument of 
>> type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned 
>> int'} [-Wformat=]
 296 |   dev_err(dom->sdev->dev, "(iova(0x%lx) + sixe(0x%lx)) are not in 
the range!\n",
 |   
^
   include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
  19 | #define dev_fmt(fmt) fmt
 |  ^~~
   drivers/iommu/sprd-iommu.c:296:3: note: in expansion of macro 'dev_err'
 296 |   dev_err(dom->sdev->dev, "(iova(0x%lx) + sixe(0x%lx)) are not in 
the range!\n",
 |   ^~~
   drivers/iommu/sprd-iommu.c:296:52: note: format string is defined here
 296 |   dev_err(dom->sdev->dev, "(iova(0x%lx) + sixe(0x%lx)) are not in 
the range!\n",
 |  ~~^
 ||
 |long unsigned int
 |  %x
>> drivers/iommu/sprd-iommu.c:279:38: warning: variable 'mdata' set but not 
>> used [-Wunused-but-set-variable]
 279 |  const struct sprd_iommu_match_data *mdata;
 |  ^
   drivers/iommu/sprd-iommu.c: In function 'sprd_iommu_probe':
   drivers/iommu/sprd-iommu.c:483:21: warning: assignment to 'u32 *' {aka 
'unsigned int *'} from 'int' makes pointer from integer without a cast 
[-Wint-conversion]
 483 |  sdev->prot_page_va = dma_alloc_coherent(dev, SPRD_IOMMU_PAGE_SIZE,
 | ^
   cc1: some warnings being treated as errors


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

   240  
   241  static int sprd_iommu_attach_device(struct iommu_domain *domain,
   242  struct device *dev)
   243  {
   244  struct sprd_iommu_device *sdev = dev_iommu_priv_get(dev);
   245  struct sprd_iommu_domain *dom = to_sprd_domain(domain);
   246  size_t pgt_size = sprd_iommu_pgt_size(domain);
   247  
 > 248  dom->pgt_va = dma_alloc_coherent(sdev->dev, pgt_size, 
 > >pgt_pa, GFP_KERNEL);
   249  if (!dom->

Re: [PATCH v2 1/7] iommu/io-pgtable: Introduce dynamic io-pgtable fmt registration

2020-12-23 Thread kernel test robot
Hi "Isaac,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on iommu/next]
[also build test WARNING on soc/for-next xlnx/master linus/master v5.10 
next-20201223]
[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/Isaac-J-Manjarres/iommu-Permit-modular-builds-of-io-pgtable-drivers/20201222-085121
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: alpha-randconfig-r023-20201221 (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
# 
https://github.com/0day-ci/linux/commit/9cc3cfc5f79e5c9072aea2218dd9080227933caa
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Isaac-J-Manjarres/iommu-Permit-modular-builds-of-io-pgtable-drivers/20201222-085121
git checkout 9cc3cfc5f79e5c9072aea2218dd9080227933caa
# 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 >>):

   In file included from include/linux/printk.h:7,
from include/linux/kernel.h:16,
from include/asm-generic/bug.h:20,
from arch/alpha/include/asm/bug.h:23,
from include/linux/bug.h:5,
from include/linux/scatterlist.h:7,
from include/linux/iommu.h:10,
from include/linux/io-pgtable.h:6,
from drivers/iommu/io-pgtable-arm.c:14:
   drivers/iommu/io-pgtable-arm.c: In function 'arm_lpae_init':
>> include/linux/kern_levels.h:5:18: warning: format '%d' expects a matching 
>> 'int' argument [-Wformat=]
   5 | #define KERN_SOH "\001"  /* ASCII Start Of Header */
 |  ^~
   include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH'
  11 | #define KERN_ERR KERN_SOH "3" /* error conditions */
 |  ^~~~
   include/linux/printk.h:343:9: note: in expansion of macro 'KERN_ERR'
 343 |  printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
 | ^~~~
   drivers/iommu/io-pgtable-arm.c:1257:4: note: in expansion of macro 'pr_err'
1257 |pr_err("Failed to register ARM LPAE fmt: %d\n");
 |^~
   drivers/iommu/io-pgtable-arm.c:1257:46: note: format string is defined here
1257 |pr_err("Failed to register ARM LPAE fmt: %d\n");
 | ~^
 |  |
 |  int


vim +5 include/linux/kern_levels.h

314ba3520e513a7 Joe Perches 2012-07-30  4  
04d2c8c83d0e3ac Joe Perches 2012-07-30 @5  #define KERN_SOH "\001"  
/* ASCII Start Of Header */
04d2c8c83d0e3ac Joe Perches 2012-07-30  6  #define KERN_SOH_ASCII   '\001'
04d2c8c83d0e3ac Joe Perches 2012-07-30  7  

---
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 05/15] iommu/smmuv3: Get prepared for nested stage support

2020-11-18 Thread kernel test robot
Hi Eric,

I love your patch! Perhaps something to improve:

[auto build test WARNING on iommu/next]
[also build test WARNING on linus/master v5.10-rc4 next-20201118]
[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-IOMMU-part/20201118-192520
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: arm64-randconfig-s031-20201118 (attached as .config)
compiler: aarch64-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-123-g626c4742-dirty
# 
https://github.com/0day-ci/linux/commit/7308cdb07384d807c5ef43e6bfe0cd61c35a121e
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Eric-Auger/SMMUv3-Nested-Stage-Setup-IOMMU-part/20201118-192520
git checkout 7308cdb07384d807c5ef43e6bfe0cd61c35a121e
# 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__' ARCH=arm64 

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/arm-smmu-v3/arm-smmu-v3.c:1326:37: sparse: sparse: 
>> restricted __le64 degrades to integer
   drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:1326:37: sparse: sparse: cast to 
restricted __le64
   drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c: note: in included file (through 
arch/arm64/include/asm/atomic.h, include/linux/atomic.h, 
include/asm-generic/bitops/atomic.h, ...):
   arch/arm64/include/asm/cmpxchg.h:172:1: sparse: sparse: cast truncates bits 
from constant value (8000 becomes 0)
   arch/arm64/include/asm/cmpxchg.h:172:1: sparse: sparse: cast truncates bits 
from constant value (8000 becomes 0)

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

  1175  
  1176  static void arm_smmu_write_strtab_ent(struct arm_smmu_master *master, 
u32 sid,
  1177__le64 *dst)
  1178  {
  1179  /*
  1180   * This is hideously complicated, but we only really care about
  1181   * three cases at the moment:
  1182   *
  1183   * 1. Invalid (all zero) -> bypass/fault (init)
  1184   * 2. Bypass/fault -> single stage translation/bypass (attach)
  1185   * 3. Single or nested stage Translation/bypass -> bypass/fault 
(detach)
  1186   * 4. S2 -> S1 + S2 (attach_pasid_table)
  1187   * 5. S1 + S2 -> S2 (detach_pasid_table)
  1188   *
  1189   * Given that we can't update the STE atomically and the SMMU
  1190   * doesn't read the thing in a defined order, that leaves us
  1191   * with the following maintenance requirements:
  1192   *
  1193   * 1. Update Config, return (init time STEs aren't live)
  1194   * 2. Write everything apart from dword 0, sync, write dword 0, 
sync
  1195   * 3. Update Config, sync
  1196   */
  1197  u64 val = le64_to_cpu(dst[0]);
  1198  bool s1_live = false, s2_live = false, ste_live;
  1199  bool abort, nested = false, translate = false;
  1200  struct arm_smmu_device *smmu = NULL;
  1201  struct arm_smmu_s1_cfg *s1_cfg;
  1202  struct arm_smmu_s2_cfg *s2_cfg;
  1203  struct arm_smmu_domain *smmu_domain = NULL;
  1204  struct arm_smmu_cmdq_ent prefetch_cmd = {
  1205  .opcode = CMDQ_OP_PREFETCH_CFG,
  1206  .prefetch   = {
  1207  .sid= sid,
  1208  },
  1209  };
  1210  
  1211  if (master) {
  1212  smmu_domain = master->domain;
  1213  smmu = master->smmu;
  1214  }
  1215  
  1216  if (smmu_domain) {
  1217  s1_cfg = _domain->s1_cfg;
  1218  s2_cfg = _domain->s2_cfg;
  1219  
  1220  switch (smmu_domain->stage) {
  1221  case ARM_SMMU_DOMAIN_S1:
  1222  s1_cfg->set = true;
  1223  s2_cfg->set = false;
  1224  break;
  1225  case ARM_SMMU_DOMAIN_S2:
  1226  s1_cfg->set = false;
  1227  s2_cfg->set = true;
  1228  break;
  1229  case ARM_SMMU_DOMAIN_NESTED:
  1230  /*
  1231  

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

2020-11-16 Thread kernel test robot
Hi Eric,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on v5.10-rc4]
[also build test ERROR on next-20201116]
[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/20201116-190742
base:09162bc32c880a791c6c0668ce0745cf7958f576
config: x86_64-randconfig-s022-20201115 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-107-gaf3512a6-dirty
# 
https://github.com/0day-ci/linux/commit/ce7c900f2d50c7e8cc62d54836369a3f3150adaf
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/20201116-190742
git checkout ce7c900f2d50c7e8cc62d54836369a3f3150adaf
# 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:1197:34: error: field 'config' has incomplete type
1197 |  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 v11 05/13] vfio/pci: Register an iommu fault handler

2020-11-16 Thread kernel test robot
Hi Eric,

I love your patch! Perhaps something to improve:

[auto build test WARNING on v5.10-rc4]
[also build test WARNING on next-20201116]
[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/20201116-190742
base:09162bc32c880a791c6c0668ce0745cf7958f576
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):
# 
https://github.com/0day-ci/linux/commit/747ef402696e1192684908ca99f06f3d68466c04
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/20201116-190742
git checkout 747ef402696e1192684908ca99f06f3d68466c04
# 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 >>):

   In file included from include/linux/vfio.h:16,
from drivers/vfio/pci/vfio_pci.c:26:
   include/uapi/linux/vfio.h:1231:34: error: field 'config' has incomplete type
1231 |  struct iommu_pasid_table_config config; /* used on SET */
 |  ^~
>> drivers/vfio/pci/vfio_pci.c:339:5: warning: no previous prototype for 
>> 'vfio_pci_iommu_dev_fault_handler' [-Wmissing-prototypes]
 339 | int vfio_pci_iommu_dev_fault_handler(struct iommu_fault *fault, void 
*data)
 | ^~~~

vim +/vfio_pci_iommu_dev_fault_handler +339 drivers/vfio/pci/vfio_pci.c

   338  
 > 339  int vfio_pci_iommu_dev_fault_handler(struct iommu_fault *fault, void 
 > *data)
   340  {
   341  struct vfio_pci_device *vdev = (struct vfio_pci_device *)data;
   342  struct vfio_region_dma_fault *reg =
   343  (struct vfio_region_dma_fault *)vdev->fault_pages;
   344  struct iommu_fault *new;
   345  u32 head, tail, size;
   346  int ret = -EINVAL;
   347  
   348  
   349  if (WARN_ON(!reg))
   350  return ret;
   351  
   352  mutex_lock(>fault_queue_lock);
   353  
   354  head = reg->head;
   355  tail = reg->tail;
   356  size = reg->nb_entries;
   357  
   358  new = (struct iommu_fault *)(vdev->fault_pages + reg->offset +
   359   head * reg->entry_size);
   360  
   361  if (CIRC_SPACE(head, tail, size) < 1) {
   362  ret = -ENOSPC;
   363  goto unlock;
   364  }
   365  
   366  *new = *fault;
   367  reg->head = (head + 1) % size;
   368  ret = 0;
   369  unlock:
   370  mutex_unlock(>fault_queue_lock);
   371  return ret;
   372  }
   373  

---
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 15/15] iommu/smmuv3: Add PASID cache invalidation per PASID

2020-11-16 Thread kernel test robot
Hi Eric,

I love your patch! Perhaps something to improve:

[auto build test WARNING on iommu/next]
[also build test WARNING on linus/master v5.10-rc4 next-20201116]
[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-IOMMU-part/20201116-185039
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: arm64-randconfig-r034-20201115 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 
c044709b8fbea2a9a375e4173a6bd735f6866c0c)
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/95e4ccc61b7a7c06e1e0c6c01f362d590136ad3c
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Eric-Auger/SMMUv3-Nested-Stage-Setup-IOMMU-part/20201116-185039
git checkout 95e4ccc61b7a7c06e1e0c6c01f362d590136ad3c
# 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-v3/arm-smmu-v3.c:3010:8: warning: logical not is 
>> only applied to the left hand side of this bitwise operator 
>> [-Wlogical-not-parentheses]
   if (!info->flags & IOMMU_INV_PASID_FLAGS_PASID)
   ^~
   drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:3010:8: note: add parentheses 
after the '!' to evaluate the bitwise operator first
   if (!info->flags & IOMMU_INV_PASID_FLAGS_PASID)
   ^
()
   drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:3010:8: note: add parentheses 
around left hand side expression to silence this warning
   if (!info->flags & IOMMU_INV_PASID_FLAGS_PASID)
   ^
   (   )
   1 warning generated.

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

  2960  
  2961  static int
  2962  arm_smmu_cache_invalidate(struct iommu_domain *domain, struct device 
*dev,
  2963struct iommu_cache_invalidate_info *inv_info)
  2964  {
  2965  struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);
  2966  struct arm_smmu_device *smmu = smmu_domain->smmu;
  2967  
  2968  if (smmu_domain->stage != ARM_SMMU_DOMAIN_NESTED)
  2969  return -EINVAL;
  2970  
  2971  if (!smmu)
  2972  return -EINVAL;
  2973  
  2974  if (inv_info->version != IOMMU_CACHE_INVALIDATE_INFO_VERSION_1)
  2975  return -EINVAL;
  2976  
  2977  if (inv_info->cache & IOMMU_CACHE_INV_TYPE_IOTLB) {
  2978  if (inv_info->granularity == IOMMU_INV_GRANU_PASID) {
  2979  struct iommu_inv_pasid_info *info =
  2980  _info->granu.pasid_info;
  2981  
  2982  if (!(info->flags & 
IOMMU_INV_PASID_FLAGS_ARCHID) ||
  2983   (info->flags & 
IOMMU_INV_PASID_FLAGS_PASID))
  2984  return -EINVAL;
  2985  
  2986  __arm_smmu_tlb_inv_context(smmu_domain, 
info->archid);
  2987  
  2988  } else if (inv_info->granularity == 
IOMMU_INV_GRANU_ADDR) {
  2989  struct iommu_inv_addr_info *info = 
_info->granu.addr_info;
  2990  size_t size = info->nb_granules * 
info->granule_size;
  2991  bool leaf = info->flags & 
IOMMU_INV_ADDR_FLAGS_LEAF;
  2992  
  2993  if (!(info->flags & 
IOMMU_INV_ADDR_FLAGS_ARCHID) ||
  2994   (info->flags & IOMMU_INV_ADDR_FLAGS_PASID))
  2995  return -EINVAL;
  2996  
  2997  __arm_smmu_tlb_inv_range(info->addr, size,
  2998   info->granule_size, 
leaf,
  2999smmu_domain, 
info->archid);
  3000  
  3001  arm_smmu_cmdq_issue_sync(smmu);
  3002  } else {
  3003   

Re: [PATCH v12 01/15] iommu: Introduce attach/detach_pasid_table API

2020-11-16 Thread kernel test robot
Hi Eric,

I love your patch! Perhaps something to improve:

[auto build test WARNING on iommu/next]
[also build test WARNING on linus/master v5.10-rc4 next-20201116]
[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-IOMMU-part/20201116-185039
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: arm64-randconfig-r034-20201115 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 
c044709b8fbea2a9a375e4173a6bd735f6866c0c)
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/54be9a9e014a566f9c7640da201c24cfb1eda06e
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Eric-Auger/SMMUv3-Nested-Stage-Setup-IOMMU-part/20201116-185039
git checkout 54be9a9e014a566f9c7640da201c24cfb1eda06e
# 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/iommu.c:2225:34: warning: overlapping comparisons always 
>> evaluate to false [-Wtautological-overlap-compare]
   if (pasid_table_data.config < 1 && pasid_table_data.config > 3)
   ^~
   1 warning generated.

vim +2225 drivers/iommu/iommu.c

  2182  
  2183  int iommu_uapi_attach_pasid_table(struct iommu_domain *domain,
  2184void __user *uinfo)
  2185  {
  2186  struct iommu_pasid_table_config pasid_table_data = { 0 };
  2187  u32 minsz;
  2188  
  2189  if (unlikely(!domain->ops->attach_pasid_table))
  2190  return -ENODEV;
  2191  
  2192  /*
  2193   * No new spaces can be added before the variable sized union, 
the
  2194   * minimum size is the offset to the union.
  2195   */
  2196  minsz = offsetof(struct iommu_pasid_table_config, vendor_data);
  2197  
  2198  /* Copy minsz from user to get flags and argsz */
  2199  if (copy_from_user(_table_data, uinfo, minsz))
  2200  return -EFAULT;
  2201  
  2202  /* Fields before the variable size union are mandatory */
  2203  if (pasid_table_data.argsz < minsz)
  2204  return -EINVAL;
  2205  
  2206  /* PASID and address granu require additional info beyond minsz 
*/
  2207  if (pasid_table_data.version != PASID_TABLE_CFG_VERSION_1)
  2208  return -EINVAL;
  2209  if (pasid_table_data.format == IOMMU_PASID_FORMAT_SMMUV3 &&
  2210  pasid_table_data.argsz <
  2211  offsetofend(struct iommu_pasid_table_config, 
vendor_data.smmuv3))
  2212  return -EINVAL;
  2213  
  2214  /*
  2215   * User might be using a newer UAPI header which has a larger 
data
  2216   * size, we shall support the existing flags within the current
  2217   * size. Copy the remaining user data _after_ minsz but not more
  2218   * than the current kernel supported size.
  2219   */
  2220  if (copy_from_user((void *)_table_data + minsz, uinfo + 
minsz,
  2221 min_t(u32, pasid_table_data.argsz, 
sizeof(pasid_table_data)) - minsz))
    return -EFAULT;
  2223  
  2224  /* Now the argsz is validated, check the content */
> 2225  if (pasid_table_data.config < 1 && pasid_table_data.config > 3)
  2226  return -EINVAL;
  2227  
  2228  return domain->ops->attach_pasid_table(domain, 
_table_data);
  2229  }
  2230  EXPORT_SYMBOL_GPL(iommu_uapi_attach_pasid_table);
  2231  

---
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 v11 05/13] vfio/pci: Register an iommu fault handler

2020-11-16 Thread kernel test robot
Hi Eric,

I love your patch! Perhaps something to improve:

[auto build test WARNING on v5.10-rc4]
[also build test WARNING on next-20201116]
[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/20201116-190742
base:09162bc32c880a791c6c0668ce0745cf7958f576
config: powerpc64-randconfig-r026-20201116 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 
c044709b8fbea2a9a375e4173a6bd735f6866c0c)
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 powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# 
https://github.com/0day-ci/linux/commit/747ef402696e1192684908ca99f06f3d68466c04
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/20201116-190742
git checkout 747ef402696e1192684908ca99f06f3d68466c04
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 
ARCH=powerpc64 

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/pci/vfio_pci.c:26:
   In file included from include/linux/vfio.h:16:
   include/uapi/linux/vfio.h:1231: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:1231:9: note: forward declaration of 'struct 
iommu_pasid_table_config'
   struct iommu_pasid_table_config config; /* used on SET */
  ^
>> drivers/vfio/pci/vfio_pci.c:339:5: warning: no previous prototype for 
>> function 'vfio_pci_iommu_dev_fault_handler' [-Wmissing-prototypes]
   int vfio_pci_iommu_dev_fault_handler(struct iommu_fault *fault, void *data)
   ^
   drivers/vfio/pci/vfio_pci.c:339:1: note: declare 'static' if the function is 
not intended to be used outside of this translation unit
   int vfio_pci_iommu_dev_fault_handler(struct iommu_fault *fault, void *data)
   ^
   static 
   1 warning and 1 error generated.

vim +/vfio_pci_iommu_dev_fault_handler +339 drivers/vfio/pci/vfio_pci.c

   338  
 > 339  int vfio_pci_iommu_dev_fault_handler(struct iommu_fault *fault, void 
 > *data)
   340  {
   341  struct vfio_pci_device *vdev = (struct vfio_pci_device *)data;
   342  struct vfio_region_dma_fault *reg =
   343  (struct vfio_region_dma_fault *)vdev->fault_pages;
   344  struct iommu_fault *new;
   345  u32 head, tail, size;
   346  int ret = -EINVAL;
   347  
   348  
   349  if (WARN_ON(!reg))
   350  return ret;
   351  
   352  mutex_lock(>fault_queue_lock);
   353  
   354  head = reg->head;
   355  tail = reg->tail;
   356  size = reg->nb_entries;
   357  
   358  new = (struct iommu_fault *)(vdev->fault_pages + reg->offset +
   359   head * reg->entry_size);
   360  
   361  if (CIRC_SPACE(head, tail, size) < 1) {
   362  ret = -ENOSPC;
   363  goto unlock;
   364  }
   365  
   366  *new = *fault;
   367  reg->head = (head + 1) % size;
   368  ret = 0;
   369  unlock:
   370  mutex_unlock(>fault_queue_lock);
   371  return ret;
   372  }
   373  

---
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

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] 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, 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(_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 = >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 *)>node_guid,
  1130  rxe->ndev->dev_addr);
  1131  dev->dev.dma_parms = >dma_parms;
  1132  dma_set_max_seg_size(>dev, UINT_MAX);
> 1133  err = dma_coerce_mask_and_coherent(>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 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] 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] 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_iommu->ctxs:
0ae349a0f33fb0 driv

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'
   aarch64-linux-gnu-ld: drivers/gpu/drm/vc4/vc4_dsi.o: in function 
`vc4_dsi_host_transfer':
   drivers/gpu/drm/vc4/vc4_dsi.c:564: undefined reference to `dma_sync_wait'
   aarch64-linux-gnu-ld: drivers/gpu/d

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 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 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: expected ';' before 'inline'
 141 | staic inline int ioasid_attach_spid(ioasid_t ioasid, ioasid_t spid)
 |  ^

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 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] 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(>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] 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] 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(>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(_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(_domain_lock, flags);
  2578  free_devinfo_mem(info);
  2579  /* Caller must free the original domain */
  2580  

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

[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
:: 5e3435eb7e1d8c9431254f5e0053ce1ad654a591 iommu/exynos: Remove 
ARM-specific cache flush interface

:: TO: Marek Szyprowski 

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

[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 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) > (h), 0)))
 |^
   include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
  58 | #defin

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, );
   865  pci_read_config_word(dev, pos + PCI_ACS_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 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]
d6930169a33644 kernel/dma/contig

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, , );
  5394  if (!iommu)
  5395  return -ENODEV;
  5396  
  5397  if (!(dmar_domain->flags & DOMAIN_FLAG_NESTING_MODE))
  5398  return -EINVAL;
  5399  
  5400  spin_lock_irqsave(_domain_lock, flags);
  5401  spin_lock(>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 *)_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, 0x%llx, size order %llu\n",
  5446

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 = >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  >q.llq.atomic.prod);
  1413  
  1414  owner = !(prod & owner_mask);
  1415  llq.prod = prod_mask & prod;
  1416  head.prod = queue_inc_prod_n(, n + sync);
  1417  
  1418  /*
  1419   * Ensure it's safe to write the entries. For th

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 = >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 = _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  
   164  default:

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   
kref_init(

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(>iova, size);
31  shift = iova_shift(>iova);
32  
33  iova = alloc_iova(>iova, size >> shift, end >> shift, 
true);
34  if (!iova)
35  return -ENOMEM;
36  
37  addr = iova_dma_addr(>iova, iova);
38  
  > 39  size = iommu_map_sgtable(vde->domain, addr, sgt,
40   IOMMU_READ | IOMMU_WRITE);
41  if (!size) {
42  __free_iova(>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 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(dev, vmw_tt->sgt, DMA_BIDIRECTIONAL, 0);
 > 387  }
   388  

---
0-DAY CI Kernel Test 

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 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-core.h:18,
from include/media/videobuf2-v4l2.h:16,
from drivers/media/common/videobuf2/videobuf2-dma-s

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++, 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) {
 |  ^~~

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 = >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, _iter, 0) {
96  dma_addr_t dma_addr = 
sg_page_iter_dma_address(_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 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/amdgpu/amdgpu_vram_mgr.c:26:
At top level:
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;
|  ^~~~
I

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 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 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))
|   ^
drivers/gpu/drm/msm/msm_iommu.c:54:11: note: in expansion of macro 'GENMASK'
54 |   iova |= GENMASK(63, 4

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 = _domain->cfg;
   680  
   681  mutex_lock(_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_S1))
   728  cfg->fmt = ARM_SMMU_CTX_FMT_AARCH32_S;
   

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  
3080return iommu;
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  
3081return 

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] 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 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: 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

[arch] WARNING: CPU: 0 PID: 0 at kernel/memremap.c:31 memremap()

2015-07-22 Thread kernel test robot
Greetings,

0day kernel testing robot got the below dmesg and the first bad commit is

git://git.kernel.org/pub/scm/linux/kernel/git/djbw/nvdimm.git pmem-api

commit 163f9409a57082aed03fbeeb321fbf18bdaf5f42
Author: Dan Williams dan.j.willi...@intel.com
AuthorDate: Wed Jul 22 18:09:01 2015 -0400
Commit: Dan Williams dan.j.willi...@intel.com
CommitDate: Wed Jul 22 18:09:01 2015 -0400

arch: introduce memremap(), replace ioremap_cache()

Existing users of ioremap_cache() are mapping memory that is known in
advance to not have i/o side effects.  These users are forced to cast
away the __iomem annotation, or otherwise neglect to fix the sparse
errors thrown when dereferencing pointers to this memory.  Provide
memremap() as a non __iomem annotated ioremap_*() in the case when
ioremap is otherwise a pointer to memory.

The ARCH_HAS_MEMREMAP kconfig symbol is introduced for archs to assert
that it is safe to recast / reuse the return value from ioremap as a
normal pointer to memory.  In other words, archs that mandate specific
accessors for __iomem are not memremap() capable and drivers that care,
like pmem, can add a dependency to disable themselves on these archs.

Note, that memremap is a break from the ioremap implementation pattern
of adding a new memremap_type() for each mapping type.  Instead,
the implementation defines flags that are passed to the central
memremap() implementation.

Outside of ioremap() and ioremap_nocache(), the expectation is that most
calls to ioremap_type() are seeking memory-like semantics (e.g.
speculative reads, and prefetching permitted).  These callsites can be
moved to memremap() over time.

Cc: Arnd Bergmann a...@arndb.de
Acked-by: Andy Shevchenko andy.shevche...@gmail.com
Signed-off-by: Dan Williams dan.j.willi...@intel.com

+++++
|| dc5d38e432 | 163f9409a5 | 
5dfe2d5864 |
+++++
| boot_successes | 63 | 0  | 0  
|
| boot_failures  | 0  | 26 | 19 
|
| WARNING:at_kernel/memremap.c:#memremap()   | 0  | 26 | 19 
|
| backtrace:acpi_load_tables | 0  | 26 | 19 
|
| backtrace:acpi_early_init  | 0  | 26 | 19 
|
| IP-Config:Auto-configuration_of_network_failed | 0  | 0  | 2  
|
+++++

[0.227312] ACPI: Core revision 20150619
[0.227690] memremap: acpi_os_map_iomem
[0.228021] [ cut here ]
[0.228406] WARNING: CPU: 0 PID: 0 at kernel/memremap.c:31 
memremap+0x73/0x159()
[0.229202] memremap attempted on unknown/mixed range 0x0ffe 
size: 4096
[0.229829] Modules linked in:
[0.230106] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 
4.2.0-rc3-7-g163f940 #1
[0.230718]    c175bf04 c1489068 c175bf30 c175bf20 c103a1ae 
001f
[0.231456]  c10f6407 1000 0001 0001 c175bf38 c103a1f0 0009 
c175bf30
[0.232242]  c16b3ecb c175bf4c c175bf68 c10f6407 c16b3f04 001f c16b3ecb 
c175bf54
[0.232985] Call Trace:
[0.233196]  [c1489068] dump_stack+0x48/0x60
[0.233570]  [c103a1ae] warn_slowpath_common+0x89/0xa0
[0.234016]  [c10f6407] ? memremap+0x73/0x159
[0.234396]  [c103a1f0] warn_slowpath_fmt+0x2b/0x2f
[0.234816]  [c10f6407] memremap+0x73/0x159
[0.235190]  [c1486181] acpi_os_map_iomem+0x10b/0x15f
[0.235660]  [c14861e2] acpi_os_map_memory+0xd/0xf
[0.236089]  [c1293d5c] acpi_tb_acquire_table+0x35/0x5a
[0.236538]  [c1293e41] acpi_tb_validate_table+0x22/0x37
[0.237001]  [c1841255] acpi_load_tables+0x38/0x146
[0.237424]  [c184080e] acpi_early_init+0x64/0xd4
[0.237830]  [c1817b14] start_kernel+0x3e1/0x447
[0.238232]  [c18172bb] i386_start_kernel+0x85/0x89
[0.238734] ---[ end trace cb88537fdc8fa200 ]---
[0.239133] ACPI Exception: AE_NO_ACPI_TABLES, While loading namespace from 
ACPI tables (20150619/tbxfload-80)

git bisect start 5dfe2d5864e91244e7befaa2317519ea15dc9c89 
52721d9d3334c1cb1f76219a161084094ec634dc --
git bisect good cfc652fabeee43adf800889a5a4a935a9af090a7  # 07:04 20+  
0  arch, drivers: don't include asm/io.h directly, use linux/io.h instead
git bisect good dc5d38e432ff171125f746d80a037692feb16fc9  # 07:11 22+  
0  intel_iommu: fix leaked ioremap mapping
git bisect  bad 163f9409a57082aed03fbeeb321fbf18bdaf5f42  # 07:17  0- 
22  arch: introduce memremap(), replace ioremap_cache()
# first bad commit: [163f9409a57082aed03fbeeb321fbf18bdaf5f42] arch: