tree:
https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: eeb611e5394c56d45c5cc8f7dc484c9f19e93143
commit: 792c8003efc4d75b5f52db70e7380b6a425bdba8 [414/1142] xlink-pcie: XLink PCIe Remote
and Local Host driver
config: parisc-allyesconfig (attached as .config)
compiler: hppa-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 792c8003efc4d75b5f52db70e7380b6a425bdba8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc
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 >>):
In file included from arch/parisc/include/asm/io.h:6,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from arch/parisc/include/asm/hardirq.h:13,
from include/linux/hardirq.h:9,
from include/linux/interrupt.h:11,
from include/linux/pci.h:38,
from drivers/misc/xlink-pcie/local_host/../common/mxlk.h:18,
from drivers/misc/xlink-pcie/local_host/mxlk_epf.c:20:
include/asm-generic/pgtable.h: In function 'pte_clear_not_present_full':
> arch/parisc/include/asm/pgtable.h:91:9: error: variable
'old_pte' set but not used [-Werror=unused-but-set-variable]
91 |
pte_t old_pte; \
| ^~~~~~~
arch/parisc/include/asm/pgtable.h:316:34: note: in expansion of macro
'set_pte_at'
316 | #define pte_clear(mm, addr, xp) set_pte_at(mm, addr, xp, __pte(0))
| ^~~~~~~~~~
include/asm-generic/pgtable.h:201:2: note: in expansion of macro 'pte_clear'
201 | pte_clear(mm, address, ptep);
| ^~~~~~~~~
include/asm-generic/pgtable.h: In function '__ptep_modify_prot_commit':
> arch/parisc/include/asm/pgtable.h:91:9: error: variable
'old_pte' set but not used [-Werror=unused-but-set-variable]
91 |
pte_t old_pte; \
| ^~~~~~~
include/asm-generic/pgtable.h:629:2: note: in expansion of macro 'set_pte_at'
629 | set_pte_at(vma->vm_mm, addr, ptep, pte);
| ^~~~~~~~~~
drivers/misc/xlink-pcie/local_host/mxlk_epf.c: At top level:
drivers/misc/xlink-pcie/local_host/mxlk_epf.c:104:6: error: no previous prototype for
'mxlk_register_host_irq' [-Werror=missing-prototypes]
104 | void mxlk_register_host_irq(struct mxlk *mxlk, irq_handler_t func)
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/misc/xlink-pcie/local_host/mxlk_epf.c:111:5: error: no previous prototype for
'mxlk_raise_irq' [-Werror=missing-prototypes]
111 | int mxlk_raise_irq(struct mxlk *mxlk, enum mxlk_doorbell_type type)
| ^~~~~~~~~~~~~~
drivers/misc/xlink-pcie/local_host/mxlk_epf.c:144:5: error: no previous prototype for
'mxlk_copy_from_host_ll' [-Werror=missing-prototypes]
144 | int mxlk_copy_from_host_ll(struct mxlk *mxlk, int chan, int descs_num)
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/misc/xlink-pcie/local_host/mxlk_epf.c:152:5: error: no previous prototype for
'mxlk_copy_to_host_ll' [-Werror=missing-prototypes]
152 | int mxlk_copy_to_host_ll(struct mxlk *mxlk, int chan, int descs_num)
| ^~~~~~~~~~~~~~~~~~~~
drivers/misc/xlink-pcie/local_host/mxlk_epf.c: In function 'epf_bind':
drivers/misc/xlink-pcie/local_host/mxlk_epf.c:306:7: error: variable
'msi_capable' set but not used [-Werror=unused-but-set-variable]
306 | bool msi_capable = true;
| ^~~~~~~~~~~
> drivers/misc/xlink-pcie/local_host/mxlk_epf.c:392:2: error:
'strncpy' output truncated before terminating nul copying 8 bytes from a string of
the same length [-Werror=stringop-truncation]
392 |
strncpy(mxlk_epf->mxlk.io_comm->magic, MXLK_BOOT_MAGIC_YOCTO,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
393 | strlen(MXLK_BOOT_MAGIC_YOCTO));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/misc/xlink-pcie/local_host/mxlk_epf.c:399:2: error: 'strncpy' output
truncated before terminating nul copying 8 bytes from a string of the same length
[-Werror=stringop-truncation]
399 | strncpy(mxlk_epf->mxlk.io_comm->magic, MXLK_BOOT_MAGIC_YOCTO,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
400 | strlen(MXLK_BOOT_MAGIC_YOCTO));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
--
In file included from arch/parisc/include/asm/io.h:6,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from arch/parisc/include/asm/hardirq.h:13,
from include/linux/hardirq.h:9,
from include/linux/interrupt.h:11,
from drivers/misc/xlink-pcie/local_host/mxlk_core.c:12:
include/asm-generic/pgtable.h: In function 'pte_clear_not_present_full':
> arch/parisc/include/asm/pgtable.h:91:9: error: variable
'old_pte' set but not used [-Werror=unused-but-set-variable]
91 |
pte_t old_pte; \
| ^~~~~~~
arch/parisc/include/asm/pgtable.h:316:34: note: in expansion of macro
'set_pte_at'
316 | #define pte_clear(mm, addr, xp) set_pte_at(mm, addr, xp, __pte(0))
| ^~~~~~~~~~
include/asm-generic/pgtable.h:201:2: note: in expansion of macro 'pte_clear'
201 | pte_clear(mm, address, ptep);
| ^~~~~~~~~
include/asm-generic/pgtable.h: In function '__ptep_modify_prot_commit':
> arch/parisc/include/asm/pgtable.h:91:9: error: variable
'old_pte' set but not used [-Werror=unused-but-set-variable]
91 |
pte_t old_pte; \
| ^~~~~~~
include/asm-generic/pgtable.h:629:2: note: in expansion of macro 'set_pte_at'
629 | set_pte_at(vma->vm_mm, addr, ptep, pte);
| ^~~~~~~~~~
cc1: all warnings being treated as errors
--
In file included from arch/parisc/include/asm/io.h:6,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from arch/parisc/include/asm/hardirq.h:13,
from include/linux/hardirq.h:9,
from include/linux/interrupt.h:11,
from include/linux/pci.h:38,
from drivers/misc/xlink-pcie/local_host/../common/mxlk.h:18,
from drivers/misc/xlink-pcie/local_host/../common/mxlk_core.h:13,
from drivers/misc/xlink-pcie/local_host/mxlk_inf.c:13:
include/asm-generic/pgtable.h: In function 'pte_clear_not_present_full':
> arch/parisc/include/asm/pgtable.h:91:9: error: variable
'old_pte' set but not used [-Werror=unused-but-set-variable]
91 |
pte_t old_pte; \
| ^~~~~~~
arch/parisc/include/asm/pgtable.h:316:34: note: in expansion of macro
'set_pte_at'
316 | #define pte_clear(mm, addr, xp) set_pte_at(mm, addr, xp, __pte(0))
| ^~~~~~~~~~
include/asm-generic/pgtable.h:201:2: note: in expansion of macro 'pte_clear'
201 | pte_clear(mm, address, ptep);
| ^~~~~~~~~
include/asm-generic/pgtable.h: In function '__ptep_modify_prot_commit':
> arch/parisc/include/asm/pgtable.h:91:9: error: variable
'old_pte' set but not used [-Werror=unused-but-set-variable]
91 |
pte_t old_pte; \
| ^~~~~~~
include/asm-generic/pgtable.h:629:2: note: in expansion of macro 'set_pte_at'
629 | set_pte_at(vma->vm_mm, addr, ptep, pte);
| ^~~~~~~~~~
drivers/misc/xlink-pcie/local_host/mxlk_inf.c: In function
'xlink_pcie_get_device_name':
> drivers/misc/xlink-pcie/local_host/mxlk_inf.c:41:2: error:
'strncpy' output truncated copying between 0 and 13 bytes from a string of length
13 [-Werror=stringop-truncation]
41 | strncpy(device_name, MXLK_DRIVER_NAME,
name_size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
#
https://github.com/intel/linux-intel-lts/commit/792c8003efc4d75b5f52db70e...
git remote add intel-linux-intel-lts
https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-linux-intel-lts 5.4/yocto
git checkout 792c8003efc4d75b5f52db70e7380b6a425bdba8
vim +/strncpy +392 drivers/misc/xlink-pcie/local_host/mxlk_epf.c
297
298 static int epf_bind(struct pci_epf *epf)
299 {
300 struct pci_epc *epc = epf->epc;
301 struct mxlk_epf *mxlk_epf = epf_get_drvdata(epf);
302 struct dw_pcie_ep *ep = epc_get_drvdata(epc);
303 struct dw_pcie *pci = to_dw_pcie_from_ep(ep);
304 struct keembay_pcie *keembay = to_keembay_pcie(pci);
305 const struct pci_epc_features *features;
306 bool msi_capable = true;
307 size_t align = 0;
308 int ret;
309 u32 bus_num = 0;
310 u32 dev_num = 0;
311
312 if (WARN_ON_ONCE(!epc))
313 return -EINVAL;
314
315 features = pci_epc_get_features(epc, epf->func_no);
316 mxlk_epf->epc_features = features;
317 if (features) {
318 msi_capable = features->msi_capable;
319 align = features->align;
320 ret = mxlk_configure_bar(epf, features);
321 if (ret)
322 return ret;
323 }
324
325 ret = mxlk_setup_bars(epf, align);
326 if (ret) {
327 dev_err(&epf->dev, "BAR initialization failed\n");
328 return ret;
329 }
330
331 mxlk_epf->irq = keembay->ev_irq;
332 mxlk_epf->irq_dma = keembay->irq;
333 mxlk_epf->irq_err = keembay->err_irq;
334 mxlk_epf->apb_base = keembay->apb_base;
335 if (!strcmp(keembay->stepping, "A0")) {
336 mxlk_epf->mxlk.legacy_a0 = true;
337 mxlk_epf->mxlk.mmio->legacy_a0 = 1;
338 } else {
339 mxlk_epf->mxlk.legacy_a0 = false;
340 mxlk_epf->mxlk.mmio->legacy_a0 = 0;
341 }
342
343 ret = mxlk_ep_dma_init(epf);
344 if (ret) {
345 dev_err(&epf->dev, "DMA initialization failed\n");
346 goto bind_error;
347 }
348
349 mxlk_set_device_status(&mxlk_epf->mxlk, MXLK_STATUS_READY);
350
351 ret = ioread32(mxlk_epf->apb_base + PCIE_REGS_PCIE_SYS_CFG_CORE);
352 bus_num = (ret >> PCIE_CFG_PBUS_NUM_OFFSET) & PCIE_CFG_PBUS_NUM_MASK;
353 dev_num = (ret >> PCIE_CFG_PBUS_DEV_NUM_OFFSET) &
354 PCIE_CFG_PBUS_DEV_NUM_MASK;
355
356 xlink_sw_id = (XLINK_DEV_INF_PCIE << XLINK_DEV_INF_TYPE_SHIFT) |
357 ((bus_num << 8 | dev_num) << XLINK_DEV_PHYS_ID_SHIFT) |
358 (XLINK_DEV_TYPE_KMB << XLINK_DEV_TYPE_SHIFT) |
359 (XLINK_DEV_SLICE_0 << XLINK_DEV_SLICE_ID_SHIFT) |
360 (XLINK_DEV_FUNC_VPU << XLINK_DEV_FUNC_SHIFT);
361
362 ret = mxlk_core_init(&mxlk_epf->mxlk);
363 if (ret) {
364 dev_err(&epf->dev, "Core component configuration failed\n");
365 goto bind_error;
366 }
367
368 /* Enable interrupt */
369 writel(LBC_CII_EVENT_FLAG,
370 mxlk_epf->apb_base + PCIE_REGS_PCIE_INTR_ENABLE);
371 ret = request_irq(mxlk_epf->irq, &mxlk_host_interrupt,
372 0, MXLK_DRIVER_NAME, &mxlk_epf->mxlk);
373 if (ret) {
374 dev_err(&epf->dev, "failed to request irq\n");
375 goto bind_error;
376 }
377
378 ret = request_irq(mxlk_epf->irq_err, &mxlk_err_interrupt, 0,
379 MXLK_DRIVER_NAME, &mxlk_epf->mxlk);
380 if (ret) {
381 dev_err(&epf->dev, "failed to request error irq\n");
382 free_irq(mxlk_epf->irq, &mxlk_epf->mxlk);
383 goto bind_error;
384 }
385
386 if (!mxlk_ep_dma_enabled(mxlk_epf->epf))
387 mxlk_ep_dma_reset(mxlk_epf->epf);
388
389 mxlk_epf->mxlk.mmio->host_status = MXLK_STATUS_UNINIT;
390 mxlk_set_device_status(&mxlk_epf->mxlk, MXLK_STATUS_RUN);
391 mxlk_set_doorbell(&mxlk_epf->mxlk, FROM_DEVICE, DEV_EVENT, NO_OP);
392 strncpy(mxlk_epf->mxlk.io_comm->magic,
MXLK_BOOT_MAGIC_YOCTO,
393 strlen(MXLK_BOOT_MAGIC_YOCTO));
394
395 return 0;
396
397 bind_error:
398 mxlk_set_device_status(&mxlk_epf->mxlk, MXLK_STATUS_ERROR);
399 strncpy(mxlk_epf->mxlk.io_comm->magic, MXLK_BOOT_MAGIC_YOCTO,
400 strlen(MXLK_BOOT_MAGIC_YOCTO));
401
402 return ret;
403 }
404
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org