[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202305271400.NNv7F7x7-lkp@intel.com>
Date: Sat, 27 May 2023 15:03:17 +0800
From: kernel test robot <lkp@...el.com>
To: Mao Jinlong <quic_jinlmao@...cinc.com>,
Andy Gross <agross@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>,
Suzuki K Poulose <suzuki.poulose@....com>,
Mike Leach <mike.leach@...aro.org>,
Leo Yan <leo.yan@...aro.org>, Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzk@...nel.org>
Cc: oe-kbuild-all@...ts.linux.dev,
Mao Jinlong <quic_jinlmao@...cinc.com>,
coresight@...ts.linaro.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
devicetree@...r.kernel.org,
Tingwei Zhang <quic_tingweiz@...cinc.com>,
Yuanfang Zhang <quic_yuanfang@...cinc.com>,
Tao Zhang <quic_taozha@...cinc.com>,
Hao Zhang <quic_hazha@...cinc.com>
Subject: Re: [PATCH v1 2/3] coresight-tmc: byte-cntr: Add support for
streaming interface for ETR
Hi Mao,
kernel test robot noticed the following build errors:
[auto build test ERROR on robh/for-next]
[also build test ERROR on linus/master v6.4-rc3 next-20230525]
[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/Mao-Jinlong/Coresight-Add-driver-to-support-for-CSR/20230526-233705
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
patch link: https://lore.kernel.org/r/20230526153508.6208-3-quic_jinlmao%40quicinc.com
patch subject: [PATCH v1 2/3] coresight-tmc: byte-cntr: Add support for streaming interface for ETR
config: arm-randconfig-r013-20230526 (https://download.01.org/0day-ci/archive/20230527/202305271400.NNv7F7x7-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
mkdir -p ~/bin
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/3c44cc3f9a93e12d206b9428b5ed959c46cf08b5
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Mao-Jinlong/Coresight-Add-driver-to-support-for-CSR/20230526-233705
git checkout 3c44cc3f9a93e12d206b9428b5ed959c46cf08b5
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 ~/bin/make.cross W=1 O=build_dir ARCH=arm olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 ~/bin/make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/hwtracing/coresight/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202305271400.NNv7F7x7-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
drivers/hwtracing/coresight/coresight-tmc-core.c: In function 'tmc_probe':
>> drivers/hwtracing/coresight/coresight-tmc-core.c:527:23: error: implicit declaration of function 'of_get_coresight_csr_name' [-Werror=implicit-function-declaration]
527 | ret = of_get_coresight_csr_name(adev->dev.of_node, &drvdata->csr_name);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
drivers/hwtracing/coresight/coresight-byte-cntr.c: In function 'tmc_etr_byte_cntr_stop':
>> drivers/hwtracing/coresight/coresight-byte-cntr.c:139:9: error: too few arguments to function 'coresight_csr_set_byte_cntr'
139 | coresight_csr_set_byte_cntr(tmcdrvdata->csr, 0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/hwtracing/coresight/coresight-byte-cntr.c:15:
drivers/hwtracing/coresight/coresight-csr.h:53:20: note: declared here
53 | static inline void coresight_csr_set_byte_cntr(struct coresight_csr *csr, int irqctrl_offset,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hwtracing/coresight/coresight-byte-cntr.c: In function 'tmc_etr_byte_cntr_release':
drivers/hwtracing/coresight/coresight-byte-cntr.c:154:17: error: too few arguments to function 'coresight_csr_set_byte_cntr'
154 | coresight_csr_set_byte_cntr(tmcdrvdata->csr, 0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hwtracing/coresight/coresight-csr.h:53:20: note: declared here
53 | static inline void coresight_csr_set_byte_cntr(struct coresight_csr *csr, int irqctrl_offset,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hwtracing/coresight/coresight-byte-cntr.c: In function 'tmc_etr_byte_cntr_open':
drivers/hwtracing/coresight/coresight-byte-cntr.c:187:9: error: too few arguments to function 'coresight_csr_set_byte_cntr'
187 | coresight_csr_set_byte_cntr(tmcdrvdata->csr, (byte_cntr_data->block_size) / 8);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hwtracing/coresight/coresight-csr.h:53:20: note: declared here
53 | static inline void coresight_csr_set_byte_cntr(struct coresight_csr *csr, int irqctrl_offset,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hwtracing/coresight/coresight-byte-cntr.c: At top level:
>> drivers/hwtracing/coresight/coresight-byte-cntr.c:297:6: warning: no previous prototype for 'byte_cntr_remove' [-Wmissing-prototypes]
297 | void byte_cntr_remove(struct byte_cntr *byte_cntr_data)
| ^~~~~~~~~~~~~~~~
vim +/of_get_coresight_csr_name +527 drivers/hwtracing/coresight/coresight-tmc-core.c
481
482 static int tmc_probe(struct amba_device *adev, const struct amba_id *id)
483 {
484 int ret = 0;
485 u32 devid;
486 void __iomem *base;
487 struct device *dev = &adev->dev;
488 struct coresight_platform_data *pdata = NULL;
489 struct tmc_drvdata *drvdata;
490 struct resource *res = &adev->res;
491 struct coresight_desc desc = { 0 };
492 struct coresight_dev_list *dev_list = NULL;
493
494 ret = -ENOMEM;
495 drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL);
496 if (!drvdata)
497 goto out;
498
499 dev_set_drvdata(dev, drvdata);
500
501 /* Validity for the resource is already checked by the AMBA core */
502 base = devm_ioremap_resource(dev, res);
503 if (IS_ERR(base)) {
504 ret = PTR_ERR(base);
505 goto out;
506 }
507
508 drvdata->base = base;
509 desc.access = CSDEV_ACCESS_IOMEM(base);
510
511 spin_lock_init(&drvdata->spinlock);
512
513 devid = readl_relaxed(drvdata->base + CORESIGHT_DEVID);
514 drvdata->config_type = BMVAL(devid, 6, 7);
515 drvdata->memwidth = tmc_get_memwidth(devid);
516 /* This device is not associated with a session */
517 drvdata->pid = -1;
518
519 if (drvdata->config_type == TMC_CONFIG_TYPE_ETR) {
520 drvdata->size = tmc_etr_get_default_buffer_size(dev);
521 drvdata->max_burst_size = tmc_etr_get_max_burst_size(dev);
522 } else {
523 drvdata->size = readl_relaxed(drvdata->base + TMC_RSZ) * 4;
524 }
525
526 if (drvdata->config_type == TMC_CONFIG_TYPE_ETR) {
> 527 ret = of_get_coresight_csr_name(adev->dev.of_node, &drvdata->csr_name);
528 if (ret)
529 dev_dbg(dev, "No csr data\n");
530 else {
531 drvdata->csr = coresight_csr_get(drvdata->csr_name);
532 if (IS_ERR(drvdata->csr)) {
533 dev_dbg(dev, "failed to get csr, defer probe\n");
534 return -EPROBE_DEFER;
535 }
536
537 }
538
539 }
540
541 desc.dev = dev;
542 desc.groups = coresight_tmc_groups;
543
544 switch (drvdata->config_type) {
545 case TMC_CONFIG_TYPE_ETB:
546 desc.type = CORESIGHT_DEV_TYPE_SINK;
547 desc.subtype.sink_subtype = CORESIGHT_DEV_SUBTYPE_SINK_BUFFER;
548 desc.ops = &tmc_etb_cs_ops;
549 dev_list = &etb_devs;
550 break;
551 case TMC_CONFIG_TYPE_ETR:
552 desc.type = CORESIGHT_DEV_TYPE_SINK;
553 desc.subtype.sink_subtype = CORESIGHT_DEV_SUBTYPE_SINK_SYSMEM;
554 desc.ops = &tmc_etr_cs_ops;
555 ret = tmc_etr_setup_caps(dev, devid,
556 coresight_get_uci_data(id));
557 if (ret)
558 goto out;
559 idr_init(&drvdata->idr);
560 drvdata->byte_cntr = byte_cntr_init(adev, drvdata);
561 mutex_init(&drvdata->idr_mutex);
562 dev_list = &etr_devs;
563 break;
564 case TMC_CONFIG_TYPE_ETF:
565 desc.type = CORESIGHT_DEV_TYPE_LINKSINK;
566 desc.subtype.sink_subtype = CORESIGHT_DEV_SUBTYPE_SINK_BUFFER;
567 desc.subtype.link_subtype = CORESIGHT_DEV_SUBTYPE_LINK_FIFO;
568 desc.ops = &tmc_etf_cs_ops;
569 dev_list = &etf_devs;
570 break;
571 default:
572 pr_err("%s: Unsupported TMC config\n", desc.name);
573 ret = -EINVAL;
574 goto out;
575 }
576
577 desc.name = coresight_alloc_device_name(dev_list, dev);
578 if (!desc.name) {
579 ret = -ENOMEM;
580 goto out;
581 }
582
583 pdata = coresight_get_platform_data(dev);
584 if (IS_ERR(pdata)) {
585 ret = PTR_ERR(pdata);
586 goto out;
587 }
588 adev->dev.platform_data = pdata;
589 desc.pdata = pdata;
590
591 drvdata->csdev = coresight_register(&desc);
592 if (IS_ERR(drvdata->csdev)) {
593 ret = PTR_ERR(drvdata->csdev);
594 goto out;
595 }
596
597 drvdata->miscdev.name = desc.name;
598 drvdata->miscdev.minor = MISC_DYNAMIC_MINOR;
599 drvdata->miscdev.fops = &tmc_fops;
600 ret = misc_register(&drvdata->miscdev);
601 if (ret)
602 coresight_unregister(drvdata->csdev);
603 else
604 pm_runtime_put(&adev->dev);
605 out:
606 return ret;
607 }
608
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists