tree:
https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/slave-dma.git next
head: 1886761f031b93936149c8fde71a90ab76bf2a2a
commit: 1886761f031b93936149c8fde71a90ab76bf2a2a [6/6] dmaengine: dw-edma: use
PCI_IRQ_MSI_TYPES where appropriate
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
git checkout 1886761f031b93936149c8fde71a90ab76bf2a2a
# 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 <lkp(a)intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
drivers/dma/dw-edma/dw-edma-pcie.c: In function 'dw_edma_pcie_probe':
> drivers/dma/dw-edma/dw-edma-pcie.c:129:6: error:
'PCI_IRQ_MSI_TYPES' undeclared (first use in this function); did you mean
'PCI_IRQ_ALL_TYPES'?
129 | PCI_IRQ_MSI_TYPES);
| ^~~~~~~~~~~~~~~~~
| PCI_IRQ_ALL_TYPES
drivers/dma/dw-edma/dw-edma-pcie.c:129:6: note: each undeclared identifier is reported
only once for each function it appears in
vim +129 drivers/dma/dw-edma/dw-edma-pcie.c
65
66 static int dw_edma_pcie_probe(struct pci_dev *pdev,
67 const struct pci_device_id *pid)
68 {
69 const struct dw_edma_pcie_data *pdata = (void *)pid->driver_data;
70 struct device *dev = &pdev->dev;
71 struct dw_edma_chip *chip;
72 int err, nr_irqs;
73 struct dw_edma *dw;
74
75 /* Enable PCI device */
76 err = pcim_enable_device(pdev);
77 if (err) {
78 pci_err(pdev, "enabling device failed\n");
79 return err;
80 }
81
82 /* Mapping PCI BAR regions */
83 err = pcim_iomap_regions(pdev, BIT(pdata->rg_bar) |
84 BIT(pdata->ll_bar) |
85 BIT(pdata->dt_bar),
86 pci_name(pdev));
87 if (err) {
88 pci_err(pdev, "eDMA BAR I/O remapping failed\n");
89 return err;
90 }
91
92 pci_set_master(pdev);
93
94 /* DMA configuration */
95 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
96 if (!err) {
97 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
98 if (err) {
99 pci_err(pdev, "consistent DMA mask 64 set failed\n");
100 return err;
101 }
102 } else {
103 pci_err(pdev, "DMA mask 64 set failed\n");
104
105 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
106 if (err) {
107 pci_err(pdev, "DMA mask 32 set failed\n");
108 return err;
109 }
110
111 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
112 if (err) {
113 pci_err(pdev, "consistent DMA mask 32 set failed\n");
114 return err;
115 }
116 }
117
118 /* Data structure allocation */
119 chip = devm_kzalloc(dev, sizeof(*chip), GFP_KERNEL);
120 if (!chip)
121 return -ENOMEM;
122
123 dw = devm_kzalloc(dev, sizeof(*dw), GFP_KERNEL);
124 if (!dw)
125 return -ENOMEM;
126
127 /* IRQs allocation */
128 nr_irqs = pci_alloc_irq_vectors(pdev, 1, pdata->irqs,
129 PCI_IRQ_MSI_TYPES);
130 if (nr_irqs < 1) {
131 pci_err(pdev, "fail to alloc IRQ vector (number of IRQs=%u)\n",
132 nr_irqs);
133 return -EPERM;
134 }
135
136 /* Data structure initialization */
137 chip->dw = dw;
138 chip->dev = dev;
139 chip->id = pdev->devfn;
140 chip->irq = pdev->irq;
141
142 dw->rg_region.vaddr = pcim_iomap_table(pdev)[pdata->rg_bar];
143 dw->rg_region.vaddr += pdata->rg_off;
144 dw->rg_region.paddr = pdev->resource[pdata->rg_bar].start;
145 dw->rg_region.paddr += pdata->rg_off;
146 dw->rg_region.sz = pdata->rg_sz;
147
148 dw->ll_region.vaddr = pcim_iomap_table(pdev)[pdata->ll_bar];
149 dw->ll_region.vaddr += pdata->ll_off;
150 dw->ll_region.paddr = pdev->resource[pdata->ll_bar].start;
151 dw->ll_region.paddr += pdata->ll_off;
152 dw->ll_region.sz = pdata->ll_sz;
153
154 dw->dt_region.vaddr = pcim_iomap_table(pdev)[pdata->dt_bar];
155 dw->dt_region.vaddr += pdata->dt_off;
156 dw->dt_region.paddr = pdev->resource[pdata->dt_bar].start;
157 dw->dt_region.paddr += pdata->dt_off;
158 dw->dt_region.sz = pdata->dt_sz;
159
160 dw->version = pdata->version;
161 dw->mode = pdata->mode;
162 dw->nr_irqs = nr_irqs;
163 dw->ops = &dw_edma_pcie_core_ops;
164
165 /* Debug info */
166 pci_dbg(pdev, "Version:\t%u\n", dw->version);
167
168 pci_dbg(pdev, "Mode:\t%s\n",
169 dw->mode == EDMA_MODE_LEGACY ? "Legacy" : "Unroll");
170
171 pci_dbg(pdev, "Registers:\tBAR=%u, off=0x%.8lx, sz=0x%zx bytes, addr(v=%p,
p=%pa)\n",
172 pdata->rg_bar, pdata->rg_off, pdata->rg_sz,
173 dw->rg_region.vaddr, &dw->rg_region.paddr);
174
175 pci_dbg(pdev, "L. List:\tBAR=%u, off=0x%.8lx, sz=0x%zx bytes, addr(v=%p,
p=%pa)\n",
176 pdata->ll_bar, pdata->ll_off, pdata->ll_sz,
177 dw->ll_region.vaddr, &dw->ll_region.paddr);
178
179 pci_dbg(pdev, "Data:\tBAR=%u, off=0x%.8lx, sz=0x%zx bytes, addr(v=%p,
p=%pa)\n",
180 pdata->dt_bar, pdata->dt_off, pdata->dt_sz,
181 dw->dt_region.vaddr, &dw->dt_region.paddr);
182
183 pci_dbg(pdev, "Nr. IRQs:\t%u\n", dw->nr_irqs);
184
185 /* Validating if PCI interrupts were enabled */
186 if (!pci_dev_msi_enabled(pdev)) {
187 pci_err(pdev, "enable interrupt failed\n");
188 return -EPERM;
189 }
190
191 dw->irq = devm_kcalloc(dev, nr_irqs, sizeof(*dw->irq), GFP_KERNEL);
192 if (!dw->irq)
193 return -ENOMEM;
194
195 /* Starting eDMA driver */
196 err = dw_edma_probe(chip);
197 if (err) {
198 pci_err(pdev, "eDMA probe failed\n");
199 return err;
200 }
201
202 /* Saving data structure reference */
203 pci_set_drvdata(pdev, chip);
204
205 return 0;
206 }
207
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org