Re: [PATCH v5 2/4] perf/marvell: CN10k DDR performance monitor support

From: kernel test robot
Date: Mon Oct 25 2021 - 12:38:17 EST


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@xxxxxxxxx>

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@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip