devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Bhaskara Budiredla <bbudiredla@marvell.com>,
	will@kernel.org, mark.rutland@arm.com, robh+dt@kernel.org,
	bbhushan2@marvell.com, sgoutham@marvell.com
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Bhaskara Budiredla <bbudiredla@marvell.com>
Subject: Re: [PATCH v6 1/2] drivers: perf: Add LLC-TAD perf counter support
Date: Tue, 26 Oct 2021 20:22:34 +0800	[thread overview]
Message-ID: <202110262004.HidA4gMX-lkp@intel.com> (raw)
In-Reply-To: <20211018153057.23217-2-bbudiredla@marvell.com>

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

Hi Bhaskara,

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-rc7 next-20211026]
[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/Bhaskara-Budiredla/drivers-perf-Add-Marvell-CN10K-LLC-TAD-pmu-driver/20211018-233301
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm-randconfig-c002-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
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://github.com/0day-ci/linux/commit/85d99064ace8ea1a9e64cbd905097e61c6bb395c
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Bhaskara-Budiredla/drivers-perf-Add-Marvell-CN10K-LLC-TAD-pmu-driver/20211018-233301
        git checkout 85d99064ace8ea1a9e64cbd905097e61c6bb395c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm 

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_tad_pmu.c:57:11: error: implicit declaration of function 'readq' [-Werror,-Wimplicit-function-declaration]
                           new += readq(tad_pmu->regions[i].base +
                                  ^
>> drivers/perf/marvell_cn10k_tad_pmu.c:76:3: error: implicit declaration of function 'writeq_relaxed' [-Werror,-Wimplicit-function-declaration]
                   writeq_relaxed(0, tad_pmu->regions[i].base +
                   ^
   drivers/perf/marvell_cn10k_tad_pmu.c:96:3: error: implicit declaration of function 'writeq_relaxed' [-Werror,-Wimplicit-function-declaration]
                   writeq_relaxed(0, tad_pmu->regions[i].base +
                   ^
>> drivers/perf/marvell_cn10k_tad_pmu.c:103:13: error: implicit declaration of function 'readq_relaxed' [-Werror,-Wimplicit-function-declaration]
                   reg_val = readq_relaxed(tad_pmu->regions[i].base +
                             ^
   drivers/perf/marvell_cn10k_tad_pmu.c:103:13: note: did you mean 'writeq_relaxed'?
   drivers/perf/marvell_cn10k_tad_pmu.c:76:3: note: 'writeq_relaxed' declared here
                   writeq_relaxed(0, tad_pmu->regions[i].base +
                   ^
   4 errors generated.


vim +/readq +57 drivers/perf/marvell_cn10k_tad_pmu.c

    45	
    46	static void tad_pmu_event_counter_read(struct perf_event *event)
    47	{
    48		struct tad_pmu *tad_pmu = to_tad_pmu(event->pmu);
    49		struct hw_perf_event *hwc = &event->hw;
    50		u32 counter_idx = hwc->idx;
    51		u64 delta, prev, new;
    52		int i;
    53	
    54		do {
    55			prev = local64_read(&hwc->prev_count);
    56			for (i = 0, new = 0; i < tad_pmu->region_cnt; i++)
  > 57				new += readq(tad_pmu->regions[i].base +
    58					     TAD_PFC(counter_idx));
    59		} while (local64_cmpxchg(&hwc->prev_count, prev, new) != prev);
    60	
    61		delta = (new - prev) & GENMASK_ULL(63, 0);
    62		local64_add(delta, &event->count);
    63	}
    64	
    65	static void tad_pmu_event_counter_stop(struct perf_event *event, int flags)
    66	{
    67		struct tad_pmu *tad_pmu = to_tad_pmu(event->pmu);
    68		struct hw_perf_event *hwc = &event->hw;
    69		u32 counter_idx = hwc->idx;
    70		int i;
    71	
    72		/* TAD()_PFC() stop counting on the write
    73		 * which sets TAD()_PRF()[CNTSEL] == 0
    74		 */
    75		for (i = 0; i < tad_pmu->region_cnt; i++)
  > 76			writeq_relaxed(0, tad_pmu->regions[i].base +
    77				       TAD_PRF(counter_idx));
    78	
    79		tad_pmu_event_counter_read(event);
    80		hwc->state |= PERF_HES_STOPPED | PERF_HES_UPTODATE;
    81	}
    82	
    83	static void tad_pmu_event_counter_start(struct perf_event *event, int flags)
    84	{
    85		struct tad_pmu *tad_pmu = to_tad_pmu(event->pmu);
    86		struct hw_perf_event *hwc = &event->hw;
    87		u32 event_idx = event->attr.config;
    88		u32 counter_idx = hwc->idx;
    89		u64 reg_val;
    90		int i;
    91	
    92		hwc->state = 0;
    93	
    94		/* Typically TAD_PFC() are zeroed to start counting */
    95		for (i = 0; i < tad_pmu->region_cnt; i++)
    96			writeq_relaxed(0, tad_pmu->regions[i].base +
    97				       TAD_PFC(counter_idx));
    98	
    99		/* TAD()_PFC() start counting on the write
   100		 * which sets TAD()_PRF()[CNTSEL] != 0
   101		 */
   102		for (i = 0; i < tad_pmu->region_cnt; i++) {
 > 103			reg_val = readq_relaxed(tad_pmu->regions[i].base +
   104						TAD_PRF(counter_idx));
   105			reg_val |= (event_idx & 0xFF);
   106			writeq_relaxed(reg_val,	tad_pmu->regions[i].base +
   107				       TAD_PRF(counter_idx));
   108		}
   109	}
   110	

---
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: 28870 bytes --]

  parent reply	other threads:[~2021-10-26 12:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18 15:30 [PATCH v6 0/2] drivers: perf: Add Marvell CN10K LLC-TAD pmu driver Bhaskara Budiredla
2021-10-18 15:30 ` [PATCH v6 1/2] drivers: perf: Add LLC-TAD perf counter support Bhaskara Budiredla
2021-10-19 10:23   ` Bharat Bhushan
2021-10-26  9:43   ` Will Deacon
2021-10-26 18:04     ` [EXT] " Bhaskara Budiredla
2021-10-26 12:22   ` kernel test robot [this message]
2021-10-27 10:57   ` kernel test robot
2021-10-18 15:30 ` [PATCH v6 2/2] dt-bindings: perf: Add YAML schemas for Marvell CN10K LLC-TAD pmu bindings Bhaskara Budiredla

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=202110262004.HidA4gMX-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=bbhushan2@marvell.com \
    --cc=bbudiredla@marvell.com \
    --cc=devicetree@vger.kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=sgoutham@marvell.com \
    --cc=will@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).