* drivers/vfio/pci/vfio_pci_nvlink2.c:101:10: error: implicit declaration of function 'mm_iommu_put'
@ 2021-03-27 19:06 ` kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-03-27 19:06 UTC (permalink / raw)
To: Jason Gunthorpe
Cc: kbuild-all, clang-built-linux, linux-kernel, Alex Williamson, Eric Auger
[-- Attachment #1: Type: text/plain, Size: 9110 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 0f4498cef9f5cd18d7c6639a2a902ec1edc5be4e
commit: 179209fa12709a3df8888c323b37315da2683c24 vfio: IOMMU_API should be selected
date: 11 days ago
config: powerpc64-randconfig-r031-20210328 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project d50fe9f0d6b9ee61df8830a67ea0a33c27a637e7)
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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=179209fa12709a3df8888c323b37315da2683c24
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 179209fa12709a3df8888c323b37315da2683c24
# 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 <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/vfio/pci/vfio_pci_nvlink2.c:101:10: error: implicit declaration of function 'mm_iommu_put' [-Werror,-Wimplicit-function-declaration]
ret = mm_iommu_put(data->mm, data->mem);
^
drivers/vfio/pci/vfio_pci_nvlink2.c:101:10: note: did you mean 'mm_iommu_init'?
arch/powerpc/include/asm/mmu_context.h:57:20: note: 'mm_iommu_init' declared here
static inline void mm_iommu_init(struct mm_struct *mm) { }
^
>> drivers/vfio/pci/vfio_pci_nvlink2.c:165:14: error: implicit declaration of function 'mm_iommu_newdev' [-Werror,-Wimplicit-function-declaration]
ret = (int) mm_iommu_newdev(data->mm, data->useraddr,
^
2 errors generated.
vim +/mm_iommu_put +101 drivers/vfio/pci/vfio_pci_nvlink2.c
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 91
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 92 static void vfio_pci_nvgpu_release(struct vfio_pci_device *vdev,
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 93 struct vfio_pci_region *region)
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 94 {
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 95 struct vfio_pci_nvgpu_data *data = region->data;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 96 long ret;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 97
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 98 /* If there were any mappings at all... */
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 99 if (data->mm) {
338b4e10f939a7 Alexey Kardashevskiy 2019-12-23 100 if (data->mem) {
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 @101 ret = mm_iommu_put(data->mm, data->mem);
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 102 WARN_ON(ret);
338b4e10f939a7 Alexey Kardashevskiy 2019-12-23 103 }
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 104
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 105 mmdrop(data->mm);
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 106 }
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 107
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 108 vfio_unregister_notifier(&data->gpdev->dev, VFIO_GROUP_NOTIFY,
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 109 &data->group_notifier);
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 110
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 111 pnv_npu2_unmap_lpar_dev(data->gpdev);
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 112
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 113 kfree(data);
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 114 }
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 115
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 116 static vm_fault_t vfio_pci_nvgpu_mmap_fault(struct vm_fault *vmf)
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 117 {
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 118 vm_fault_t ret;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 119 struct vm_area_struct *vma = vmf->vma;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 120 struct vfio_pci_region *region = vma->vm_private_data;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 121 struct vfio_pci_nvgpu_data *data = region->data;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 122 unsigned long vmf_off = (vmf->address - vma->vm_start) >> PAGE_SHIFT;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 123 unsigned long nv2pg = data->gpu_hpa >> PAGE_SHIFT;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 124 unsigned long vm_pgoff = vma->vm_pgoff &
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 125 ((1U << (VFIO_PCI_OFFSET_SHIFT - PAGE_SHIFT)) - 1);
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 126 unsigned long pfn = nv2pg + vm_pgoff + vmf_off;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 127
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 128 ret = vmf_insert_pfn(vma, vmf->address, pfn);
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 129 trace_vfio_pci_nvgpu_mmap_fault(data->gpdev, pfn << PAGE_SHIFT,
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 130 vmf->address, ret);
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 131
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 132 return ret;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 133 }
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 134
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 135 static const struct vm_operations_struct vfio_pci_nvgpu_mmap_vmops = {
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 136 .fault = vfio_pci_nvgpu_mmap_fault,
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 137 };
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 138
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 139 static int vfio_pci_nvgpu_mmap(struct vfio_pci_device *vdev,
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 140 struct vfio_pci_region *region, struct vm_area_struct *vma)
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 141 {
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 142 int ret;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 143 struct vfio_pci_nvgpu_data *data = region->data;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 144
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 145 if (data->useraddr)
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 146 return -EPERM;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 147
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 148 if (vma->vm_end - vma->vm_start > data->size)
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 149 return -EINVAL;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 150
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 151 vma->vm_private_data = region;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 152 vma->vm_flags |= VM_PFNMAP;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 153 vma->vm_ops = &vfio_pci_nvgpu_mmap_vmops;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 154
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 155 /*
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 156 * Calling mm_iommu_newdev() here once as the region is not
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 157 * registered yet and therefore right initialization will happen now.
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 158 * Other places will use mm_iommu_find() which returns
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 159 * registered @mem and does not go gup().
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 160 */
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 161 data->useraddr = vma->vm_start;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 162 data->mm = current->mm;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 163
bb3d3cf928d4cc Julia Lawall 2019-12-29 164 mmgrab(data->mm);
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 @165 ret = (int) mm_iommu_newdev(data->mm, data->useraddr,
e66e02c4d96d33 Peng Hao 2019-07-02 166 vma_pages(vma), data->gpu_hpa, &data->mem);
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 167
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 168 trace_vfio_pci_nvgpu_mmap(vdev->pdev, data->gpu_hpa, data->useraddr,
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 169 vma->vm_end - vma->vm_start, ret);
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 170
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 171 return ret;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 172 }
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 173
:::::: The code at line 101 was first introduced by commit
:::::: 7f92891778dff62303c070ac81de7b7d80de331a vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] subdriver
:::::: TO: Alexey Kardashevskiy <aik@ozlabs.ru>
:::::: CC: Michael Ellerman <mpe@ellerman.id.au>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 48898 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* drivers/vfio/pci/vfio_pci_nvlink2.c:101:10: error: implicit declaration of function 'mm_iommu_put'
@ 2021-03-27 19:06 ` kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-03-27 19:06 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 9243 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 0f4498cef9f5cd18d7c6639a2a902ec1edc5be4e
commit: 179209fa12709a3df8888c323b37315da2683c24 vfio: IOMMU_API should be selected
date: 11 days ago
config: powerpc64-randconfig-r031-20210328 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project d50fe9f0d6b9ee61df8830a67ea0a33c27a637e7)
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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=179209fa12709a3df8888c323b37315da2683c24
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 179209fa12709a3df8888c323b37315da2683c24
# 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 <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/vfio/pci/vfio_pci_nvlink2.c:101:10: error: implicit declaration of function 'mm_iommu_put' [-Werror,-Wimplicit-function-declaration]
ret = mm_iommu_put(data->mm, data->mem);
^
drivers/vfio/pci/vfio_pci_nvlink2.c:101:10: note: did you mean 'mm_iommu_init'?
arch/powerpc/include/asm/mmu_context.h:57:20: note: 'mm_iommu_init' declared here
static inline void mm_iommu_init(struct mm_struct *mm) { }
^
>> drivers/vfio/pci/vfio_pci_nvlink2.c:165:14: error: implicit declaration of function 'mm_iommu_newdev' [-Werror,-Wimplicit-function-declaration]
ret = (int) mm_iommu_newdev(data->mm, data->useraddr,
^
2 errors generated.
vim +/mm_iommu_put +101 drivers/vfio/pci/vfio_pci_nvlink2.c
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 91
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 92 static void vfio_pci_nvgpu_release(struct vfio_pci_device *vdev,
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 93 struct vfio_pci_region *region)
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 94 {
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 95 struct vfio_pci_nvgpu_data *data = region->data;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 96 long ret;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 97
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 98 /* If there were any mappings at all... */
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 99 if (data->mm) {
338b4e10f939a7 Alexey Kardashevskiy 2019-12-23 100 if (data->mem) {
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 @101 ret = mm_iommu_put(data->mm, data->mem);
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 102 WARN_ON(ret);
338b4e10f939a7 Alexey Kardashevskiy 2019-12-23 103 }
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 104
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 105 mmdrop(data->mm);
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 106 }
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 107
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 108 vfio_unregister_notifier(&data->gpdev->dev, VFIO_GROUP_NOTIFY,
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 109 &data->group_notifier);
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 110
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 111 pnv_npu2_unmap_lpar_dev(data->gpdev);
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 112
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 113 kfree(data);
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 114 }
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 115
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 116 static vm_fault_t vfio_pci_nvgpu_mmap_fault(struct vm_fault *vmf)
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 117 {
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 118 vm_fault_t ret;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 119 struct vm_area_struct *vma = vmf->vma;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 120 struct vfio_pci_region *region = vma->vm_private_data;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 121 struct vfio_pci_nvgpu_data *data = region->data;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 122 unsigned long vmf_off = (vmf->address - vma->vm_start) >> PAGE_SHIFT;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 123 unsigned long nv2pg = data->gpu_hpa >> PAGE_SHIFT;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 124 unsigned long vm_pgoff = vma->vm_pgoff &
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 125 ((1U << (VFIO_PCI_OFFSET_SHIFT - PAGE_SHIFT)) - 1);
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 126 unsigned long pfn = nv2pg + vm_pgoff + vmf_off;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 127
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 128 ret = vmf_insert_pfn(vma, vmf->address, pfn);
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 129 trace_vfio_pci_nvgpu_mmap_fault(data->gpdev, pfn << PAGE_SHIFT,
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 130 vmf->address, ret);
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 131
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 132 return ret;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 133 }
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 134
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 135 static const struct vm_operations_struct vfio_pci_nvgpu_mmap_vmops = {
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 136 .fault = vfio_pci_nvgpu_mmap_fault,
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 137 };
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 138
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 139 static int vfio_pci_nvgpu_mmap(struct vfio_pci_device *vdev,
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 140 struct vfio_pci_region *region, struct vm_area_struct *vma)
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 141 {
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 142 int ret;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 143 struct vfio_pci_nvgpu_data *data = region->data;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 144
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 145 if (data->useraddr)
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 146 return -EPERM;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 147
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 148 if (vma->vm_end - vma->vm_start > data->size)
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 149 return -EINVAL;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 150
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 151 vma->vm_private_data = region;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 152 vma->vm_flags |= VM_PFNMAP;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 153 vma->vm_ops = &vfio_pci_nvgpu_mmap_vmops;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 154
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 155 /*
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 156 * Calling mm_iommu_newdev() here once as the region is not
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 157 * registered yet and therefore right initialization will happen now.
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 158 * Other places will use mm_iommu_find() which returns
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 159 * registered @mem and does not go gup().
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 160 */
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 161 data->useraddr = vma->vm_start;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 162 data->mm = current->mm;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 163
bb3d3cf928d4cc Julia Lawall 2019-12-29 164 mmgrab(data->mm);
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 @165 ret = (int) mm_iommu_newdev(data->mm, data->useraddr,
e66e02c4d96d33 Peng Hao 2019-07-02 166 vma_pages(vma), data->gpu_hpa, &data->mem);
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 167
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 168 trace_vfio_pci_nvgpu_mmap(vdev->pdev, data->gpu_hpa, data->useraddr,
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 169 vma->vm_end - vma->vm_start, ret);
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 170
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 171 return ret;
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 172 }
7f92891778dff6 Alexey Kardashevskiy 2018-12-20 173
:::::: The code at line 101 was first introduced by commit
:::::: 7f92891778dff62303c070ac81de7b7d80de331a vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] subdriver
:::::: TO: Alexey Kardashevskiy <aik@ozlabs.ru>
:::::: CC: Michael Ellerman <mpe@ellerman.id.au>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 48898 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: drivers/vfio/pci/vfio_pci_nvlink2.c:101:10: error: implicit declaration of function 'mm_iommu_put'
2021-03-27 19:06 ` kernel test robot
@ 2021-03-28 19:57 ` Jason Gunthorpe
-1 siblings, 0 replies; 4+ messages in thread
From: Jason Gunthorpe @ 2021-03-28 19:57 UTC (permalink / raw)
To: kernel test robot
Cc: kbuild-all, clang-built-linux, linux-kernel, Alex Williamson, Eric Auger
On Sun, Mar 28, 2021 at 03:06:40AM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 0f4498cef9f5cd18d7c6639a2a902ec1edc5be4e
> commit: 179209fa12709a3df8888c323b37315da2683c24 vfio: IOMMU_API should be selected
> date: 11 days ago
> config: powerpc64-randconfig-r031-20210328 (attached as .config)
> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project d50fe9f0d6b9ee61df8830a67ea0a33c27a637e7)
> 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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=179209fa12709a3df8888c323b37315da2683c24
> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> git fetch --no-tags linus master
> git checkout 179209fa12709a3df8888c323b37315da2683c24
> # 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 <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> >> drivers/vfio/pci/vfio_pci_nvlink2.c:101:10: error: implicit declaration of function 'mm_iommu_put' [-Werror,-Wimplicit-function-declaration]
> ret = mm_iommu_put(data->mm, data->mem);
> ^
> drivers/vfio/pci/vfio_pci_nvlink2.c:101:10: note: did you mean 'mm_iommu_init'?
> arch/powerpc/include/asm/mmu_context.h:57:20: note: 'mm_iommu_init' declared here
> static inline void mm_iommu_init(struct mm_struct *mm) { }
> ^
> >> drivers/vfio/pci/vfio_pci_nvlink2.c:165:14: error: implicit declaration of function 'mm_iommu_newdev' [-Werror,-Wimplicit-function-declaration]
> ret = (int) mm_iommu_newdev(data->mm, data->useraddr,
> ^
> 2 errors generated.
This is because of a missing CONFIG_SPAPR_TCE_IOMMU combined
incomplete function stubbing in arch/powerpc/include/asm/mmu_context.h
I'll send a patch to 'add && SPAPR_TCE_IOMMU' to 'config VFIO_PCI_NVLINK2'
(it is interesting we are seeing these now as these patches sat on my
github which is linked to 0-day too for quite a long time)
Jason
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: drivers/vfio/pci/vfio_pci_nvlink2.c:101:10: error: implicit declaration of function 'mm_iommu_put'
@ 2021-03-28 19:57 ` Jason Gunthorpe
0 siblings, 0 replies; 4+ messages in thread
From: Jason Gunthorpe @ 2021-03-28 19:57 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2606 bytes --]
On Sun, Mar 28, 2021 at 03:06:40AM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 0f4498cef9f5cd18d7c6639a2a902ec1edc5be4e
> commit: 179209fa12709a3df8888c323b37315da2683c24 vfio: IOMMU_API should be selected
> date: 11 days ago
> config: powerpc64-randconfig-r031-20210328 (attached as .config)
> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project d50fe9f0d6b9ee61df8830a67ea0a33c27a637e7)
> 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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=179209fa12709a3df8888c323b37315da2683c24
> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> git fetch --no-tags linus master
> git checkout 179209fa12709a3df8888c323b37315da2683c24
> # 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 <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> >> drivers/vfio/pci/vfio_pci_nvlink2.c:101:10: error: implicit declaration of function 'mm_iommu_put' [-Werror,-Wimplicit-function-declaration]
> ret = mm_iommu_put(data->mm, data->mem);
> ^
> drivers/vfio/pci/vfio_pci_nvlink2.c:101:10: note: did you mean 'mm_iommu_init'?
> arch/powerpc/include/asm/mmu_context.h:57:20: note: 'mm_iommu_init' declared here
> static inline void mm_iommu_init(struct mm_struct *mm) { }
> ^
> >> drivers/vfio/pci/vfio_pci_nvlink2.c:165:14: error: implicit declaration of function 'mm_iommu_newdev' [-Werror,-Wimplicit-function-declaration]
> ret = (int) mm_iommu_newdev(data->mm, data->useraddr,
> ^
> 2 errors generated.
This is because of a missing CONFIG_SPAPR_TCE_IOMMU combined
incomplete function stubbing in arch/powerpc/include/asm/mmu_context.h
I'll send a patch to 'add && SPAPR_TCE_IOMMU' to 'config VFIO_PCI_NVLINK2'
(it is interesting we are seeing these now as these patches sat on my
github which is linked to 0-day too for quite a long time)
Jason
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-03-28 20:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-27 19:06 drivers/vfio/pci/vfio_pci_nvlink2.c:101:10: error: implicit declaration of function 'mm_iommu_put' kernel test robot
2021-03-27 19:06 ` kernel test robot
2021-03-28 19:57 ` Jason Gunthorpe
2021-03-28 19:57 ` Jason Gunthorpe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.