tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/powerpc/linux.git next-test head: 4fead715c62a5196fa57218a1992e5eb8437dd8a commit: b4d37a7b6934c0c16930c73f43c08e9a6af22f1a [188/234] powerpc/powernv: Remove unused pnv_npu_try_dma_set_bypass() function config: powerpc-skiroot_defconfig (attached as .config) compiler: powerpc64le-linux-gcc (GCC) 7.4.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout b4d37a7b6934c0c16930c73f43c08e9a6af22f1a # save the attached .config to linux build tree GCC_VERSION=7.4.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag Reported-by: kbuild test robot <l...@intel.com> All errors (new ones prefixed by >>): >> arch/powerpc/platforms/powernv/npu-dma.c:126:13: error: 'pnv_npu_set_window' >> defined but not used [-Werror=unused-function] static long pnv_npu_set_window(struct iommu_table_group *table_group, int num, ^~~~~~~~~~~~~~~~~~ >> arch/powerpc/platforms/powernv/npu-dma.c:96:28: error: >> 'get_gpu_pci_dev_and_pe' defined but not used [-Werror=unused-function] static struct pnv_ioda_pe *get_gpu_pci_dev_and_pe(struct pnv_ioda_pe *npe, ^~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors vim +/pnv_npu_set_window +126 arch/powerpc/platforms/powernv/npu-dma.c 5d2aa710e69724 Alistair Popple 2015-12-17 91 5d2aa710e69724 Alistair Popple 2015-12-17 92 /* 5d2aa710e69724 Alistair Popple 2015-12-17 93 * Returns the PE assoicated with the PCI device of the given 5d2aa710e69724 Alistair Popple 2015-12-17 94 * NPU. Returns the linked pci device if pci_dev != NULL. 5d2aa710e69724 Alistair Popple 2015-12-17 95 */ 5d2aa710e69724 Alistair Popple 2015-12-17 @96 static struct pnv_ioda_pe *get_gpu_pci_dev_and_pe(struct pnv_ioda_pe *npe, 5d2aa710e69724 Alistair Popple 2015-12-17 97 struct pci_dev **gpdev) 5d2aa710e69724 Alistair Popple 2015-12-17 98 { 5d2aa710e69724 Alistair Popple 2015-12-17 99 struct pnv_phb *phb; 5d2aa710e69724 Alistair Popple 2015-12-17 100 struct pci_controller *hose; 5d2aa710e69724 Alistair Popple 2015-12-17 101 struct pci_dev *pdev; 5d2aa710e69724 Alistair Popple 2015-12-17 102 struct pnv_ioda_pe *pe; 5d2aa710e69724 Alistair Popple 2015-12-17 103 struct pci_dn *pdn; 5d2aa710e69724 Alistair Popple 2015-12-17 104 5d2aa710e69724 Alistair Popple 2015-12-17 105 pdev = pnv_pci_get_gpu_dev(npe->pdev); 5d2aa710e69724 Alistair Popple 2015-12-17 106 if (!pdev) 5d2aa710e69724 Alistair Popple 2015-12-17 107 return NULL; 5d2aa710e69724 Alistair Popple 2015-12-17 108 5d2aa710e69724 Alistair Popple 2015-12-17 109 pdn = pci_get_pdn(pdev); 5d2aa710e69724 Alistair Popple 2015-12-17 110 if (WARN_ON(!pdn || pdn->pe_number == IODA_INVALID_PE)) 5d2aa710e69724 Alistair Popple 2015-12-17 111 return NULL; 5d2aa710e69724 Alistair Popple 2015-12-17 112 5d2aa710e69724 Alistair Popple 2015-12-17 113 hose = pci_bus_to_host(pdev->bus); 5d2aa710e69724 Alistair Popple 2015-12-17 114 phb = hose->private_data; 5d2aa710e69724 Alistair Popple 2015-12-17 115 pe = &phb->ioda.pe_array[pdn->pe_number]; 5d2aa710e69724 Alistair Popple 2015-12-17 116 5d2aa710e69724 Alistair Popple 2015-12-17 117 if (gpdev) 5d2aa710e69724 Alistair Popple 2015-12-17 118 *gpdev = pdev; 5d2aa710e69724 Alistair Popple 2015-12-17 119 5d2aa710e69724 Alistair Popple 2015-12-17 120 return pe; 5d2aa710e69724 Alistair Popple 2015-12-17 121 } 5d2aa710e69724 Alistair Popple 2015-12-17 122 83fb8ccf975138 Alexey Kardashevskiy 2018-12-19 123 static long pnv_npu_unset_window(struct iommu_table_group *table_group, 83fb8ccf975138 Alexey Kardashevskiy 2018-12-19 124 int num); 83fb8ccf975138 Alexey Kardashevskiy 2018-12-19 125 83fb8ccf975138 Alexey Kardashevskiy 2018-12-19 @126 static long pnv_npu_set_window(struct iommu_table_group *table_group, int num, b575c731fe58c1 Alexey Kardashevskiy 2016-04-29 127 struct iommu_table *tbl) b575c731fe58c1 Alexey Kardashevskiy 2016-04-29 128 { 83fb8ccf975138 Alexey Kardashevskiy 2018-12-19 129 struct pnv_ioda_pe *npe = container_of(table_group, struct pnv_ioda_pe, 83fb8ccf975138 Alexey Kardashevskiy 2018-12-19 130 table_group); b575c731fe58c1 Alexey Kardashevskiy 2016-04-29 131 struct pnv_phb *phb = npe->phb; b575c731fe58c1 Alexey Kardashevskiy 2016-04-29 132 int64_t rc; b575c731fe58c1 Alexey Kardashevskiy 2016-04-29 133 const unsigned long size = tbl->it_indirect_levels ? b575c731fe58c1 Alexey Kardashevskiy 2016-04-29 134 tbl->it_level_size : tbl->it_size; b575c731fe58c1 Alexey Kardashevskiy 2016-04-29 135 const __u64 start_addr = tbl->it_offset << tbl->it_page_shift; b575c731fe58c1 Alexey Kardashevskiy 2016-04-29 136 const __u64 win_size = tbl->it_size << tbl->it_page_shift; b04149c2dd85ac Alexey Kardashevskiy 2018-12-19 137 int num2 = (num == 0) ? 1 : 0; b04149c2dd85ac Alexey Kardashevskiy 2018-12-19 138 b04149c2dd85ac Alexey Kardashevskiy 2018-12-19 139 /* NPU has just one TVE so if there is another table, remove it first */ b04149c2dd85ac Alexey Kardashevskiy 2018-12-19 140 if (npe->table_group.tables[num2]) 83fb8ccf975138 Alexey Kardashevskiy 2018-12-19 141 pnv_npu_unset_window(&npe->table_group, num2); b575c731fe58c1 Alexey Kardashevskiy 2016-04-29 142 b575c731fe58c1 Alexey Kardashevskiy 2016-04-29 143 pe_info(npe, "Setting up window %llx..%llx pg=%lx\n", b575c731fe58c1 Alexey Kardashevskiy 2016-04-29 144 start_addr, start_addr + win_size - 1, b575c731fe58c1 Alexey Kardashevskiy 2016-04-29 145 IOMMU_PAGE_SIZE(tbl)); b575c731fe58c1 Alexey Kardashevskiy 2016-04-29 146 b575c731fe58c1 Alexey Kardashevskiy 2016-04-29 147 rc = opal_pci_map_pe_dma_window(phb->opal_id, b575c731fe58c1 Alexey Kardashevskiy 2016-04-29 148 npe->pe_number, b575c731fe58c1 Alexey Kardashevskiy 2016-04-29 149 npe->pe_number, b575c731fe58c1 Alexey Kardashevskiy 2016-04-29 150 tbl->it_indirect_levels + 1, b575c731fe58c1 Alexey Kardashevskiy 2016-04-29 151 __pa(tbl->it_base), b575c731fe58c1 Alexey Kardashevskiy 2016-04-29 152 size << 3, b575c731fe58c1 Alexey Kardashevskiy 2016-04-29 153 IOMMU_PAGE_SIZE(tbl)); b575c731fe58c1 Alexey Kardashevskiy 2016-04-29 154 if (rc) { b575c731fe58c1 Alexey Kardashevskiy 2016-04-29 155 pe_err(npe, "Failed to configure TCE table, err %lld\n", rc); b575c731fe58c1 Alexey Kardashevskiy 2016-04-29 156 return rc; b575c731fe58c1 Alexey Kardashevskiy 2016-04-29 157 } 6b3d12a948d279 Alistair Popple 2017-05-03 158 pnv_pci_ioda2_tce_invalidate_entire(phb, false); b575c731fe58c1 Alexey Kardashevskiy 2016-04-29 159 85674868cecebd Alexey Kardashevskiy 2016-04-29 160 /* Add the table to the list so its TCE cache will get invalidated */ b5cb9ab1a00b11 Alexey Kardashevskiy 2016-04-29 161 pnv_pci_link_table_and_group(phb->hose->node, num, 85674868cecebd Alexey Kardashevskiy 2016-04-29 162 tbl, &npe->table_group); 85674868cecebd Alexey Kardashevskiy 2016-04-29 163 b575c731fe58c1 Alexey Kardashevskiy 2016-04-29 164 return 0; b575c731fe58c1 Alexey Kardashevskiy 2016-04-29 165 } b575c731fe58c1 Alexey Kardashevskiy 2016-04-29 166 :::::: The code at line 126 was first introduced by commit :::::: 83fb8ccf975138283c7f6d3685d9c5e2292381dd powerpc/powernv/npu: Convert NPU IOMMU helpers to iommu_table_group_ops :::::: TO: Alexey Kardashevskiy <a...@ozlabs.ru> :::::: CC: Michael Ellerman <m...@ellerman.id.au> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
.config.gz
Description: application/gzip