Re: [PATCH v3 2/2] drivers/perf: hisi: Add driver for HiSilicon PCIe PMU

From: kernel test robot
Date: Thu Apr 15 2021 - 11:17:45 EST


Hi Qi,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.12-rc7]
[cannot apply to next-20210415]
[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/Qi-Liu/drivers-perf-hisi-Add-support-for-PCIe-PMU/20210415-204823
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 7f75285ca572eaabc028cf78c6ab5473d0d160be
config: sh-allmodconfig (attached as .config)
compiler: sh4-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/94ad51ddfebbb5df3aa85fdb8a3781737accb159
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Qi-Liu/drivers-perf-hisi-Add-support-for-PCIe-PMU/20210415-204823
git checkout 94ad51ddfebbb5df3aa85fdb8a3781737accb159
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=sh

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

In file included from include/linux/bits.h:6,
from include/linux/bitops.h:6,
from include/linux/bitmap.h:8,
from drivers/perf/pci/hisilicon/hisi_pcie_pmu.c:11:
drivers/perf/pci/hisilicon/hisi_pcie_pmu.c: In function 'hisi_pcie_pmu_config_filter':
include/vdso/bits.h:7:26: warning: left shift count >= width of type [-Wshift-count-overflow]
7 | #define BIT(nr) (UL(1) << (nr))
| ^~
drivers/perf/pci/hisilicon/hisi_pcie_pmu.c:42:32: note: in expansion of macro 'BIT'
42 | #define HISI_PCIE_DEFAULT_SET BIT(34)
| ^~~
drivers/perf/pci/hisilicon/hisi_pcie_pmu.c:225:12: note: in expansion of macro 'HISI_PCIE_DEFAULT_SET'
225 | u64 reg = HISI_PCIE_DEFAULT_SET;
| ^~~~~~~~~~~~~~~~~~~~~
include/vdso/bits.h:7:26: warning: left shift count >= width of type [-Wshift-count-overflow]
7 | #define BIT(nr) (UL(1) << (nr))
| ^~
drivers/perf/pci/hisilicon/hisi_pcie_pmu.c:44:30: note: in expansion of macro 'BIT'
44 | #define HISI_PCIE_TARGET_EN BIT(32)
| ^~~
drivers/perf/pci/hisilicon/hisi_pcie_pmu.c:238:10: note: in expansion of macro 'HISI_PCIE_TARGET_EN'
238 | reg |= HISI_PCIE_TARGET_EN |
| ^~~~~~~~~~~~~~~~~~~
include/vdso/bits.h:7:26: warning: left shift count >= width of type [-Wshift-count-overflow]
7 | #define BIT(nr) (UL(1) << (nr))
| ^~
drivers/perf/pci/hisilicon/hisi_pcie_pmu.c:45:28: note: in expansion of macro 'BIT'
45 | #define HISI_PCIE_TRIG_EN BIT(52)
| ^~~
drivers/perf/pci/hisilicon/hisi_pcie_pmu.c:246:44: note: in expansion of macro 'HISI_PCIE_TRIG_EN'
246 | hisi_pcie_get_trig_mode(event)) | HISI_PCIE_TRIG_EN;
| ^~~~~~~~~~~~~~~~~
drivers/perf/pci/hisilicon/hisi_pcie_pmu.c: In function 'hisi_pcie_pmu_clear_filter':
include/vdso/bits.h:7:26: warning: left shift count >= width of type [-Wshift-count-overflow]
7 | #define BIT(nr) (UL(1) << (nr))
| ^~
drivers/perf/pci/hisilicon/hisi_pcie_pmu.c:42:32: note: in expansion of macro 'BIT'
42 | #define HISI_PCIE_DEFAULT_SET BIT(34)
| ^~~
drivers/perf/pci/hisilicon/hisi_pcie_pmu.c:264:9: note: in expansion of macro 'HISI_PCIE_DEFAULT_SET'
264 | HISI_PCIE_DEFAULT_SET);
| ^~~~~~~~~~~~~~~~~~~~~
drivers/perf/pci/hisilicon/hisi_pcie_pmu.c: In function 'hisi_pcie_pmu_reset_counter':
include/vdso/bits.h:7:26: warning: left shift count >= width of type [-Wshift-count-overflow]
7 | #define BIT(nr) (UL(1) << (nr))
| ^~
drivers/perf/pci/hisilicon/hisi_pcie_pmu.c:42:32: note: in expansion of macro 'BIT'
42 | #define HISI_PCIE_DEFAULT_SET BIT(34)
| ^~~
drivers/perf/pci/hisilicon/hisi_pcie_pmu.c:526:9: note: in expansion of macro 'HISI_PCIE_DEFAULT_SET'
526 | HISI_PCIE_DEFAULT_SET);
| ^~~~~~~~~~~~~~~~~~~~~
drivers/perf/pci/hisilicon/hisi_pcie_pmu.c: In function 'hisi_pcie_pmu_irq_register':
>> drivers/perf/pci/hisilicon/hisi_pcie_pmu.c:676:3: error: implicit declaration of function 'pci_free_irq_vectors'; did you mean 'pci_alloc_irq_vectors'? [-Werror=implicit-function-declaration]
676 | pci_free_irq_vectors(pdev);
| ^~~~~~~~~~~~~~~~~~~~
| pci_alloc_irq_vectors
drivers/perf/pci/hisilicon/hisi_pcie_pmu.c: In function 'hisi_pcie_init_dev':
>> drivers/perf/pci/hisilicon/hisi_pcie_pmu.c:920:8: error: implicit declaration of function 'pci_request_mem_regions'; did you mean 'pci_request_regions'? [-Werror=implicit-function-declaration]
920 | ret = pci_request_mem_regions(pdev, "hisi_pcie_pmu");
| ^~~~~~~~~~~~~~~~~~~~~~~
| pci_request_regions
drivers/perf/pci/hisilicon/hisi_pcie_pmu.c: In function 'hisi_pcie_uninit_dev':
>> drivers/perf/pci/hisilicon/hisi_pcie_pmu.c:935:2: error: implicit declaration of function 'pci_clear_master'; did you mean 'pci_set_master'? [-Werror=implicit-function-declaration]
935 | pci_clear_master(pdev);
| ^~~~~~~~~~~~~~~~
| pci_set_master
>> drivers/perf/pci/hisilicon/hisi_pcie_pmu.c:936:2: error: implicit declaration of function 'pci_release_mem_regions'; did you mean 'pci_release_regions'? [-Werror=implicit-function-declaration]
936 | pci_release_mem_regions(pdev);
| ^~~~~~~~~~~~~~~~~~~~~~~
| pci_release_regions
cc1: some warnings being treated as errors

Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for SND_ATMEL_SOC_PDC
Depends on SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && HAS_DMA
Selected by
- SND_ATMEL_SOC_SSC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC
- SND_ATMEL_SOC_SSC_PDC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && ATMEL_SSC


vim +676 drivers/perf/pci/hisilicon/hisi_pcie_pmu.c

658
659 static int hisi_pcie_pmu_irq_register(struct pci_dev *pdev,
660 struct hisi_pcie_pmu *pcie_pmu)
661 {
662 int irq, ret;
663
664 ret = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_MSI);
665 if (ret < 0) {
666 pci_err(pdev, "Failed to enable MSI vectors, ret = %d!\n", ret);
667 return ret;
668 }
669
670 irq = pci_irq_vector(pdev, 0);
671 ret = request_irq(irq, hisi_pcie_pmu_irq,
672 IRQF_NOBALANCING | IRQF_NO_THREAD, "hisi_pcie_pmu",
673 pcie_pmu);
674 if (ret) {
675 pci_err(pdev, "Failed to register irq, ret = %d!\n", ret);
> 676 pci_free_irq_vectors(pdev);
677 return ret;
678 }
679
680 pcie_pmu->irq = irq;
681
682 return 0;
683 }
684

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

Attachment: .config.gz
Description: application/gzip