public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* Re: [PATCH v5 2/4] perf/marvell: CN10k DDR performance monitor support
       [not found] <20211018042015.25151-3-bbhushan2@marvell.com>
@ 2021-10-25  5:20 ` kernel test robot
  2021-10-25 16:37 ` kernel test robot
  1 sibling, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-10-25  5:20 UTC (permalink / raw)
  To: Bharat Bhushan, will, mark.rutland, robh+dt, bbudiredla, sgoutham,
	linux-arm-kernel, devicetree, linux-kernel
  Cc: llvm, kbuild-all, Bharat Bhushan

[-- Attachment #1: Type: text/plain, Size: 7481 bytes --]

Hi Bharat,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on robh/for-next]
[also build test WARNING on linus/master v5.15-rc6 next-20211022]
[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/Bharat-Bhushan/cn10k-DDR-Performance-monitor-support/20211018-122220
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: hexagon-randconfig-r045-20211025 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project a461fa64bb37cffd73f683c74f6b0780379fc2ca)
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/c165c120469cac5c73b7a7e9d027c284eb09c6d1
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Bharat-Bhushan/cn10k-DDR-Performance-monitor-support/20211018-122220
        git checkout c165c120469cac5c73b7a7e9d027c284eb09c6d1
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=hexagon 

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

All warnings (new ones prefixed by >>):

   drivers/perf/marvell_cn10k_ddr_pmu.c:352:9: error: implicit declaration of function 'readq_relaxed' [-Werror,-Wimplicit-function-declaration]
                   val = readq_relaxed(pmu->base + reg);
                         ^
   drivers/perf/marvell_cn10k_ddr_pmu.c:359:3: error: implicit declaration of function 'writeq_relaxed' [-Werror,-Wimplicit-function-declaration]
                   writeq_relaxed(val, pmu->base + reg);
                   ^
   drivers/perf/marvell_cn10k_ddr_pmu.c:359:3: note: did you mean 'readq_relaxed'?
   drivers/perf/marvell_cn10k_ddr_pmu.c:352:9: note: 'readq_relaxed' declared here
                   val = readq_relaxed(pmu->base + reg);
                         ^
   drivers/perf/marvell_cn10k_ddr_pmu.c:361:9: error: implicit declaration of function 'readq_relaxed' [-Werror,-Wimplicit-function-declaration]
                   val = readq_relaxed(pmu->base + DDRC_PERF_CNT_FREERUN_EN);
                         ^
   drivers/perf/marvell_cn10k_ddr_pmu.c:373:3: error: implicit declaration of function 'writeq_relaxed' [-Werror,-Wimplicit-function-declaration]
                   writeq_relaxed(val, pmu->base + DDRC_PERF_CNT_FREERUN_EN);
                   ^
   drivers/perf/marvell_cn10k_ddr_pmu.c:382:10: error: implicit declaration of function 'readq_relaxed' [-Werror,-Wimplicit-function-declaration]
                   return readq_relaxed(pmu->base + DDRC_PERF_CNT_VALUE_RD_OP);
                          ^
   drivers/perf/marvell_cn10k_ddr_pmu.c:443:3: error: implicit declaration of function 'writeq_relaxed' [-Werror,-Wimplicit-function-declaration]
                   writeq_relaxed(val, pmu->base + reg_offset);
                   ^
   drivers/perf/marvell_cn10k_ddr_pmu.c:451:3: error: implicit declaration of function 'writeq_relaxed' [-Werror,-Wimplicit-function-declaration]
                   writeq_relaxed(val, pmu->base + DDRC_PERF_CNT_FREERUN_CTRL);
                   ^
   drivers/perf/marvell_cn10k_ddr_pmu.c:493:2: error: implicit declaration of function 'writeq_relaxed' [-Werror,-Wimplicit-function-declaration]
           writeq_relaxed(START_OP_CTRL_VAL_START, ddr_pmu->base +
           ^
   drivers/perf/marvell_cn10k_ddr_pmu.c:501:2: error: implicit declaration of function 'writeq_relaxed' [-Werror,-Wimplicit-function-declaration]
           writeq_relaxed(END_OP_CTRL_VAL_END, ddr_pmu->base +
           ^
   drivers/perf/marvell_cn10k_ddr_pmu.c:527:2: error: implicit declaration of function 'writeq_relaxed' [-Werror,-Wimplicit-function-declaration]
           writeq_relaxed(OP_MODE_CTRL_VAL_MANNUAL, ddr_pmu->base +
           ^
>> drivers/perf/marvell_cn10k_ddr_pmu.c:549:10: warning: format specifies type 'unsigned long long' but the argument has type 'resource_size_t' (aka 'unsigned int') [-Wformat]
                                 res->start);
                                 ^~~~~~~~~~
   drivers/perf/marvell_cn10k_ddr_pmu.c:557:50: warning: format specifies type 'unsigned long long' but the argument has type 'resource_size_t' (aka 'unsigned int') [-Wformat]
           pr_info("CN10K DDR PMU Driver for ddrc@%llx\n", res->start);
                                                  ~~~~     ^~~~~~~~~~
                                                  %x
   include/linux/printk.h:519:34: note: expanded from macro 'pr_info'
           printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
                                   ~~~     ^~~~~~~~~~~
   include/linux/printk.h:446:60: note: expanded from macro 'printk'
   #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
                                                       ~~~    ^~~~~~~~~~~
   include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap'
                   _p_func(_fmt, ##__VA_ARGS__);                           \
                           ~~~~    ^~~~~~~~~~~
   2 warnings and 10 errors generated.


vim +549 drivers/perf/marvell_cn10k_ddr_pmu.c

   504	
   505	static int cn10k_ddr_perf_probe(struct platform_device *pdev)
   506	{
   507		struct cn10k_ddr_pmu *ddr_pmu;
   508		struct resource *res;
   509		void __iomem *base;
   510		char *name;
   511		int ret;
   512	
   513		ddr_pmu = devm_kzalloc(&pdev->dev, sizeof(*ddr_pmu), GFP_KERNEL);
   514		if (!ddr_pmu)
   515			return -ENOMEM;
   516	
   517		ddr_pmu->dev = &pdev->dev;
   518		platform_set_drvdata(pdev, ddr_pmu);
   519	
   520		base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
   521		if (IS_ERR(base))
   522			return PTR_ERR(base);
   523	
   524		ddr_pmu->base = base;
   525	
   526		/* Setup the PMU counter to work in manual mode */
   527		writeq_relaxed(OP_MODE_CTRL_VAL_MANNUAL, ddr_pmu->base +
   528			       DDRC_PERF_CNT_OP_MODE_CTRL);
   529	
   530		ddr_pmu->pmu = (struct pmu) {
   531			.module	      = THIS_MODULE,
   532			.capabilities = PERF_PMU_CAP_NO_EXCLUDE,
   533			.task_ctx_nr = perf_invalid_context,
   534			.attr_groups = cn10k_attr_groups,
   535			.event_init  = cn10k_ddr_perf_event_init,
   536			.add	     = cn10k_ddr_perf_event_add,
   537			.del	     = cn10k_ddr_perf_event_del,
   538			.start	     = cn10k_ddr_perf_event_start,
   539			.stop	     = cn10k_ddr_perf_event_stop,
   540			.read	     = cn10k_ddr_perf_event_update,
   541			.pmu_enable  = cn10k_ddr_perf_pmu_enable,
   542			.pmu_disable = cn10k_ddr_perf_pmu_disable,
   543		};
   544	
   545		/* Choose this cpu to collect perf data */
   546		ddr_pmu->cpu = raw_smp_processor_id();
   547	
   548		name = devm_kasprintf(ddr_pmu->dev, GFP_KERNEL, "mrvl_ddr_pmu_%llx",
 > 549				      res->start);
   550		if (!name)
   551			return -ENOMEM;
   552	
   553		ret = perf_pmu_register(&ddr_pmu->pmu, name, -1);
   554		if (ret)
   555			return ret;
   556	
   557		pr_info("CN10K DDR PMU Driver for ddrc@%llx\n", res->start);
   558		return 0;
   559	}
   560	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27932 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v5 2/4] perf/marvell: CN10k DDR performance monitor support
       [not found] <20211018042015.25151-3-bbhushan2@marvell.com>
  2021-10-25  5:20 ` [PATCH v5 2/4] perf/marvell: CN10k DDR performance monitor support kernel test robot
@ 2021-10-25 16:37 ` kernel test robot
  1 sibling, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-10-25 16:37 UTC (permalink / raw)
  To: Bharat Bhushan, will, mark.rutland, robh+dt, bbudiredla, sgoutham,
	linux-arm-kernel, devicetree, linux-kernel
  Cc: llvm, kbuild-all, Bharat Bhushan

[-- Attachment #1: Type: text/plain, Size: 6757 bytes --]

Hi Bharat,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on robh/for-next]
[also build test ERROR on linus/master v5.15-rc6 next-20211025]
[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/Bharat-Bhushan/cn10k-DDR-Performance-monitor-support/20211018-122220
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: hexagon-randconfig-r045-20211025 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project a461fa64bb37cffd73f683c74f6b0780379fc2ca)
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/c165c120469cac5c73b7a7e9d027c284eb09c6d1
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Bharat-Bhushan/cn10k-DDR-Performance-monitor-support/20211018-122220
        git checkout c165c120469cac5c73b7a7e9d027c284eb09c6d1
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=hexagon 

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

All errors (new ones prefixed by >>):

>> drivers/perf/marvell_cn10k_ddr_pmu.c:352:9: error: implicit declaration of function 'readq_relaxed' [-Werror,-Wimplicit-function-declaration]
                   val = readq_relaxed(pmu->base + reg);
                         ^
>> drivers/perf/marvell_cn10k_ddr_pmu.c:359:3: error: implicit declaration of function 'writeq_relaxed' [-Werror,-Wimplicit-function-declaration]
                   writeq_relaxed(val, pmu->base + reg);
                   ^
   drivers/perf/marvell_cn10k_ddr_pmu.c:359:3: note: did you mean 'readq_relaxed'?
   drivers/perf/marvell_cn10k_ddr_pmu.c:352:9: note: 'readq_relaxed' declared here
                   val = readq_relaxed(pmu->base + reg);
                         ^
   drivers/perf/marvell_cn10k_ddr_pmu.c:361:9: error: implicit declaration of function 'readq_relaxed' [-Werror,-Wimplicit-function-declaration]
                   val = readq_relaxed(pmu->base + DDRC_PERF_CNT_FREERUN_EN);
                         ^
   drivers/perf/marvell_cn10k_ddr_pmu.c:373:3: error: implicit declaration of function 'writeq_relaxed' [-Werror,-Wimplicit-function-declaration]
                   writeq_relaxed(val, pmu->base + DDRC_PERF_CNT_FREERUN_EN);
                   ^
   drivers/perf/marvell_cn10k_ddr_pmu.c:382:10: error: implicit declaration of function 'readq_relaxed' [-Werror,-Wimplicit-function-declaration]
                   return readq_relaxed(pmu->base + DDRC_PERF_CNT_VALUE_RD_OP);
                          ^
   drivers/perf/marvell_cn10k_ddr_pmu.c:443:3: error: implicit declaration of function 'writeq_relaxed' [-Werror,-Wimplicit-function-declaration]
                   writeq_relaxed(val, pmu->base + reg_offset);
                   ^
   drivers/perf/marvell_cn10k_ddr_pmu.c:451:3: error: implicit declaration of function 'writeq_relaxed' [-Werror,-Wimplicit-function-declaration]
                   writeq_relaxed(val, pmu->base + DDRC_PERF_CNT_FREERUN_CTRL);
                   ^
   drivers/perf/marvell_cn10k_ddr_pmu.c:493:2: error: implicit declaration of function 'writeq_relaxed' [-Werror,-Wimplicit-function-declaration]
           writeq_relaxed(START_OP_CTRL_VAL_START, ddr_pmu->base +
           ^
   drivers/perf/marvell_cn10k_ddr_pmu.c:501:2: error: implicit declaration of function 'writeq_relaxed' [-Werror,-Wimplicit-function-declaration]
           writeq_relaxed(END_OP_CTRL_VAL_END, ddr_pmu->base +
           ^
   drivers/perf/marvell_cn10k_ddr_pmu.c:527:2: error: implicit declaration of function 'writeq_relaxed' [-Werror,-Wimplicit-function-declaration]
           writeq_relaxed(OP_MODE_CTRL_VAL_MANNUAL, ddr_pmu->base +
           ^
   drivers/perf/marvell_cn10k_ddr_pmu.c:549:10: warning: format specifies type 'unsigned long long' but the argument has type 'resource_size_t' (aka 'unsigned int') [-Wformat]
                                 res->start);
                                 ^~~~~~~~~~
   drivers/perf/marvell_cn10k_ddr_pmu.c:557:50: warning: format specifies type 'unsigned long long' but the argument has type 'resource_size_t' (aka 'unsigned int') [-Wformat]
           pr_info("CN10K DDR PMU Driver for ddrc@%llx\n", res->start);
                                                  ~~~~     ^~~~~~~~~~
                                                  %x
   include/linux/printk.h:519:34: note: expanded from macro 'pr_info'
           printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
                                   ~~~     ^~~~~~~~~~~
   include/linux/printk.h:446:60: note: expanded from macro 'printk'
   #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
                                                       ~~~    ^~~~~~~~~~~
   include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap'
                   _p_func(_fmt, ##__VA_ARGS__);                           \
                           ~~~~    ^~~~~~~~~~~
   2 warnings and 10 errors generated.


vim +/readq_relaxed +352 drivers/perf/marvell_cn10k_ddr_pmu.c

   338	
   339	static void cn10k_ddr_perf_counter_enable(struct cn10k_ddr_pmu *pmu,
   340						  int counter, bool enable)
   341	{
   342		u32 reg;
   343		u64 val;
   344	
   345		if (counter > DDRC_PERF_NUM_COUNTERS) {
   346			pr_err("Error: unsupported counter %d\n", counter);
   347			return;
   348		}
   349	
   350		if (counter < DDRC_PERF_NUM_GEN_COUNTERS) {
   351			reg = DDRC_PERF_CFG(counter);
 > 352			val = readq_relaxed(pmu->base + reg);
   353	
   354			if (enable)
   355				val |= EVENT_ENABLE;
   356			else
   357				val &= ~EVENT_ENABLE;
   358	
 > 359			writeq_relaxed(val, pmu->base + reg);
   360		} else {
   361			val = readq_relaxed(pmu->base + DDRC_PERF_CNT_FREERUN_EN);
   362			if (enable) {
   363				if (counter == DDRC_PERF_READ_COUNTER_IDX)
   364					val |= DDRC_PERF_FREERUN_READ_EN;
   365				else
   366					val |= DDRC_PERF_FREERUN_WRITE_EN;
   367			} else {
   368				if (counter == DDRC_PERF_READ_COUNTER_IDX)
   369					val &= ~DDRC_PERF_FREERUN_READ_EN;
   370				else
   371					val &= ~DDRC_PERF_FREERUN_WRITE_EN;
   372			}
   373			writeq_relaxed(val, pmu->base + DDRC_PERF_CNT_FREERUN_EN);
   374		}
   375	}
   376	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27932 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-25 16:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20211018042015.25151-3-bbhushan2@marvell.com>
2021-10-25  5:20 ` [PATCH v5 2/4] perf/marvell: CN10k DDR performance monitor support kernel test robot
2021-10-25 16:37 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox