From: Shuai Xue <xueshuai@linux.alibaba.com>
To: kernel test robot <lkp@intel.com>,
helgaas@kernel.org, yangyicong@huawei.com, will@kernel.org,
Jonathan.Cameron@huawei.com, baolin.wang@linux.alibaba.com,
robin.murphy@arm.com
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org,
rdunlap@infradead.org, mark.rutland@arm.com,
zhuo.song@linux.alibaba.com
Subject: Re: [PATCH v4 3/4] drivers/perf: add DesignWare PCIe PMU driver
Date: Wed, 17 May 2023 11:37:50 +0800 [thread overview]
Message-ID: <10fa299e-f742-4c5c-e252-6bb7db772850@linux.alibaba.com> (raw)
In-Reply-To: <202305170639.XU3djFZX-lkp@intel.com>
On 2023/5/17 07:21, kernel test robot wrote:
> Hi Shuai,
>
> kernel test robot noticed the following build errors:
>
> [auto build test ERROR on pci/next]
> [also build test ERROR on pci/for-linus soc/for-next linus/master v6.4-rc2 next-20230516]
> [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#_base_tree_information]
>
> url: https://github.com/intel-lab-lkp/linux/commits/Shuai-Xue/PCI-move-Alibaba-Vendor-ID-linux-pci_ids-h/20230517-013326
> base: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next
> patch link: https://lore.kernel.org/r/20230516130110.59632-4-xueshuai%40linux.alibaba.com
> patch subject: [PATCH v4 3/4] drivers/perf: add DesignWare PCIe PMU driver
> config: sh-allmodconfig
> compiler: sh4-linux-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/f576345a26fff4584ed49f0f42e03c65d8a7f2bf
> git remote add linux-review https://github.com/intel-lab-lkp/linux
> git fetch --no-tags linux-review Shuai-Xue/PCI-move-Alibaba-Vendor-ID-linux-pci_ids-h/20230517-013326
> git checkout f576345a26fff4584ed49f0f42e03c65d8a7f2bf
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh olddefconfig
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh SHELL=/bin/bash drivers/perf/
>
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@intel.com>
> | Link: https://lore.kernel.org/oe-kbuild-all/202305170639.XU3djFZX-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
> drivers/perf/dwc_pcie_pmu.c: In function '__dwc_pcie_pmu_probe':
>>> drivers/perf/dwc_pcie_pmu.c:507:24: error: implicit declaration of function 'pci_find_vsec_capability'; did you mean 'pci_find_ext_capability'? [-Werror=implicit-function-declaration]
> 507 | vsec = pci_find_vsec_capability(pdev, PCI_VENDOR_ID_ALIBABA,
> | ^~~~~~~~~~~~~~~~~~~~~~~~
> | pci_find_ext_capability
> cc1: some warnings being treated as errors
This will be fixed by:
- remove COMPILE_TEST and add depend on PCI in kconfig
Thank you.
Shuai
>
> vim +507 drivers/perf/dwc_pcie_pmu.c
>
> 487
> 488 static int __dwc_pcie_pmu_probe(struct dwc_pcie_pmu_priv *priv)
> 489 {
> 490 struct pci_dev *pdev = NULL;
> 491 struct dwc_pcie_pmu *pcie_pmu;
> 492 char *name;
> 493 u32 bdf;
> 494 int ret;
> 495
> 496 INIT_LIST_HEAD(&priv->pmu_nodes);
> 497
> 498 /* Match the rootport with VSEC_RAS_DES_ID, and register a PMU for it */
> 499 for_each_pci_dev(pdev) {
> 500 u16 vsec;
> 501 u32 val;
> 502
> 503 if (!(pci_is_pcie(pdev) &&
> 504 pci_pcie_type(pdev) == PCI_EXP_TYPE_ROOT_PORT))
> 505 continue;
> 506
> > 507 vsec = pci_find_vsec_capability(pdev, PCI_VENDOR_ID_ALIBABA,
> 508 DWC_PCIE_VSEC_RAS_DES_ID);
> 509 if (!vsec)
> 510 continue;
> 511
> 512 pci_read_config_dword(pdev, vsec + PCI_VNDR_HEADER, &val);
> 513 if (PCI_VNDR_HEADER_REV(val) != 0x04 ||
> 514 PCI_VNDR_HEADER_LEN(val) != 0x100)
> 515 continue;
> 516 pci_dbg(pdev,
> 517 "Detected PCIe Vendor-Specific Extended Capability RAS DES\n");
> 518
> 519 bdf = PCI_DEVID(pdev->bus->number, pdev->devfn);
> 520 name = devm_kasprintf(priv->dev, GFP_KERNEL, "dwc_rootport_%x",
> 521 bdf);
> 522 if (!name)
> 523 return -ENOMEM;
> 524
> 525 /* All checks passed, go go go */
> 526 pcie_pmu = devm_kzalloc(&pdev->dev, sizeof(*pcie_pmu), GFP_KERNEL);
> 527 if (!pcie_pmu) {
> 528 pci_dev_put(pdev);
> 529 return -ENOMEM;
> 530 }
> 531
> 532 pcie_pmu->pdev = pdev;
> 533 pcie_pmu->ras_des = vsec;
> 534 pcie_pmu->nr_lanes = pcie_get_width_cap(pdev);
> 535 pcie_pmu->pmu = (struct pmu){
> 536 .module = THIS_MODULE,
> 537 .attr_groups = dwc_pcie_attr_groups,
> 538 .capabilities = PERF_PMU_CAP_NO_EXCLUDE,
> 539 .task_ctx_nr = perf_invalid_context,
> 540 .event_init = dwc_pcie_pmu_event_init,
> 541 .add = dwc_pcie_pmu_event_add,
> 542 .del = dwc_pcie_pmu_event_del,
> 543 .start = dwc_pcie_pmu_event_start,
> 544 .stop = dwc_pcie_pmu_event_stop,
> 545 .read = dwc_pcie_pmu_event_update,
> 546 };
> 547
> 548 /* Add this instance to the list used by the offline callback */
> 549 ret = cpuhp_state_add_instance(dwc_pcie_pmu_hp_state,
> 550 &pcie_pmu->cpuhp_node);
> 551 if (ret) {
> 552 pci_err(pcie_pmu->pdev,
> 553 "Error %d registering hotplug @%x\n", ret, bdf);
> 554 return ret;
> 555 }
> 556 ret = perf_pmu_register(&pcie_pmu->pmu, name, -1);
> 557 if (ret) {
> 558 pci_err(pcie_pmu->pdev,
> 559 "Error %d registering PMU @%x\n", ret, bdf);
> 560 cpuhp_state_remove_instance_nocalls(
> 561 dwc_pcie_pmu_hp_state, &pcie_pmu->cpuhp_node);
> 562 return ret;
> 563 }
> 564
> 565 /* Add registered PMUs and unregister them when this driver remove */
> 566 list_add(&pcie_pmu->pmu_node, &priv->pmu_nodes);
> 567 }
> 568
> 569 return 0;
> 570 }
> 571
>
next prev parent reply other threads:[~2023-05-17 3:38 UTC|newest]
Thread overview: 80+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-17 12:10 [PATCH v1 0/3] drivers/perf: add Synopsys DesignWare PCIe PMU driver support Shuai Xue
2022-09-17 12:10 ` [PATCH v1 1/3] docs: perf: Add description for Synopsys DesignWare PCIe PMU driver Shuai Xue
2022-09-22 13:25 ` Will Deacon
2022-09-23 13:51 ` Shuai Xue
2022-11-07 15:28 ` Will Deacon
2022-09-23 1:27 ` Yicong Yang
2022-09-23 14:47 ` Shuai Xue
2022-09-17 12:10 ` [PATCH v1 2/3] drivers/perf: add " Shuai Xue
2022-09-22 15:58 ` Jonathan Cameron
2022-09-22 17:32 ` Bjorn Helgaas
2022-09-23 3:35 ` Yicong Yang
2022-09-23 10:56 ` Jonathan Cameron
2022-09-23 13:45 ` Shuai Xue
2022-09-23 15:54 ` Jonathan Cameron
2022-09-26 13:31 ` Shuai Xue
2022-09-26 14:32 ` Robin Murphy
2022-09-26 17:18 ` Bjorn Helgaas
2022-09-27 5:13 ` Shuai Xue
2022-09-27 10:04 ` Jonathan Cameron
2022-09-27 10:14 ` Robin Murphy
2022-09-27 12:49 ` Shuai Xue
2022-09-27 13:39 ` Jonathan Cameron
2022-09-27 12:29 ` Shuai Xue
2022-09-27 10:03 ` Jonathan Cameron
2022-09-22 17:36 ` Bjorn Helgaas
2022-09-23 14:46 ` Shuai Xue
2022-09-23 18:51 ` Bjorn Helgaas
2022-09-27 6:01 ` Shuai Xue
2022-09-23 3:30 ` Yicong Yang
2022-09-23 15:43 ` Shuai Xue
2022-09-24 8:00 ` Yicong Yang
2022-09-26 11:39 ` Shuai Xue
2022-09-17 12:10 ` [PATCH v1 3/3] MAINTAINERS: add maintainers for " Shuai Xue
2023-04-10 3:16 ` [PATCH v2 0/3] drivers/perf: add Synopsys DesignWare PCIe PMU driver support Shuai Xue
2023-04-10 3:17 ` [PATCH v2 1/3] docs: perf: Add description for Synopsys DesignWare PCIe PMU driver Shuai Xue
2023-04-10 3:17 ` [PATCH v2 2/3] drivers/perf: add " Shuai Xue
2023-04-10 7:25 ` kernel test robot
2023-04-11 3:17 ` Baolin Wang
2023-04-17 1:16 ` Shuai Xue
2023-04-18 1:51 ` Baolin Wang
2023-04-19 1:39 ` Shuai Xue
2023-04-10 3:17 ` [PATCH v2 3/3] MAINTAINERS: add maintainers for " Shuai Xue
2023-04-17 6:17 ` [PATCH v3 0/3] drivers/perf: add Synopsys DesignWare PCIe PMU driver support Shuai Xue
2023-04-17 6:17 ` [PATCH v3 1/3] docs: perf: Add description for Synopsys DesignWare PCIe PMU driver Shuai Xue
2023-05-16 14:32 ` Jonathan Cameron
2023-05-17 1:27 ` Shuai Xue
2023-04-17 6:17 ` [PATCH v3 2/3] drivers/perf: add " Shuai Xue
2023-04-18 23:30 ` Robin Murphy
2023-04-27 6:33 ` Shuai Xue
2023-05-09 2:02 ` Shuai Xue
2023-05-16 15:03 ` Jonathan Cameron
2023-05-16 19:17 ` Bjorn Helgaas
2023-05-17 9:54 ` Jonathan Cameron
2023-05-17 16:27 ` Bjorn Helgaas
2023-05-19 10:08 ` Shuai Xue
2023-04-17 6:17 ` [PATCH v3 3/3] MAINTAINERS: add maintainers for " Shuai Xue
2023-05-16 13:01 ` [PATCH v4 0/4] drivers/perf: add Synopsys DesignWare PCIe PMU driver support Shuai Xue
2023-05-16 13:01 ` [PATCH v4 1/4] docs: perf: Add description for Synopsys DesignWare PCIe PMU driver Shuai Xue
2023-05-16 13:01 ` [PATCH v4 2/4] PCI: move Alibaba Vendor ID linux/pci_ids.h Shuai Xue
2023-05-16 13:01 ` [PATCH v4 3/4] drivers/perf: add DesignWare PCIe PMU driver Shuai Xue
2023-05-16 19:19 ` Bjorn Helgaas
2023-05-17 2:35 ` Shuai Xue
2023-05-16 23:21 ` kernel test robot
2023-05-17 3:37 ` Shuai Xue [this message]
2023-05-16 13:01 ` [PATCH v4 4/4] MAINTAINERS: add maintainers for " Shuai Xue
2023-05-22 3:54 ` [PATCH v5 0/4] drivers/perf: add Synopsys DesignWare PCIe PMU driver support Shuai Xue
2023-05-22 14:28 ` Jonathan Cameron
2023-05-23 2:57 ` Shuai Xue
2023-05-22 3:54 ` [PATCH v5 1/4] docs: perf: Add description for Synopsys DesignWare PCIe PMU driver Shuai Xue
2023-05-29 3:45 ` Baolin Wang
2023-05-29 6:31 ` Shuai Xue
2023-05-22 3:54 ` [PATCH v5 2/4] PCI: move Alibaba Vendor ID linux/pci_ids.h Shuai Xue
2023-05-22 16:04 ` Bjorn Helgaas
2023-05-23 3:22 ` Shuai Xue
2023-05-23 11:54 ` Bjorn Helgaas
2023-05-23 12:49 ` Shuai Xue
2023-05-22 3:54 ` [PATCH v5 3/4] drivers/perf: add DesignWare PCIe PMU driver Shuai Xue
2023-05-29 6:13 ` Baolin Wang
2023-05-29 6:33 ` Shuai Xue
2023-05-22 3:54 ` [PATCH v5 4/4] MAINTAINERS: add maintainers for " Shuai Xue
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=10fa299e-f742-4c5c-e252-6bb7db772850@linux.alibaba.com \
--to=xueshuai@linux.alibaba.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=baolin.wang@linux.alibaba.com \
--cc=helgaas@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lkp@intel.com \
--cc=mark.rutland@arm.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=rdunlap@infradead.org \
--cc=robin.murphy@arm.com \
--cc=will@kernel.org \
--cc=yangyicong@huawei.com \
--cc=zhuo.song@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome