All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Bharat Bhushan <bbhushan2@marvell.com>,
	will@kernel.org, mark.rutland@arm.com, robh+dt@kernel.org,
	bbudiredla@marvell.com, sgoutham@marvell.com,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	Bharat Bhushan <bbhushan2@marvell.com>
Subject: Re: [PATCH v5 2/4] perf/marvell: CN10k DDR performance monitor support
Date: Tue, 26 Oct 2021 00:37:58 +0800	[thread overview]
Message-ID: <202110260025.iRmRCwpb-lkp@intel.com> (raw)
In-Reply-To: <20211018042015.25151-3-bbhushan2@marvell.com>

[-- 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 --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Bharat Bhushan <bbhushan2@marvell.com>,
	will@kernel.org, mark.rutland@arm.com, robh+dt@kernel.org,
	bbudiredla@marvell.com, sgoutham@marvell.com,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	Bharat Bhushan <bbhushan2@marvell.com>
Subject: Re: [PATCH v5 2/4] perf/marvell: CN10k DDR performance monitor support
Date: Tue, 26 Oct 2021 00:37:58 +0800	[thread overview]
Message-ID: <202110260025.iRmRCwpb-lkp@intel.com> (raw)
In-Reply-To: <20211018042015.25151-3-bbhushan2@marvell.com>

[-- 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 --]

[-- Attachment #3: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v5 2/4] perf/marvell: CN10k DDR performance monitor support
Date: Tue, 26 Oct 2021 00:37:58 +0800	[thread overview]
Message-ID: <202110260025.iRmRCwpb-lkp@intel.com> (raw)
In-Reply-To: <20211018042015.25151-3-bbhushan2@marvell.com>

[-- Attachment #1: Type: text/plain, Size: 6886 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(a)lists.01.org

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

  parent reply	other threads:[~2021-10-25 16:38 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18  4:20 [PATCH v5 0/4] cn10k DDR Performance monitor support Bharat Bhushan
2021-10-18  4:20 ` Bharat Bhushan
2021-10-18  4:20 ` [PATCH v5 1/4] dt-bindings: perf: marvell: cn10k ddr performance monitor Bharat Bhushan
2021-10-18  4:20   ` Bharat Bhushan
2021-10-18  4:20 ` [PATCH v5 2/4] perf/marvell: CN10k DDR performance monitor support Bharat Bhushan
2021-10-18  4:20   ` Bharat Bhushan
2021-10-18  4:37   ` Bhaskara Budiredla
2021-10-18  4:37     ` Bhaskara Budiredla
2021-10-25  5:20   ` kernel test robot
2021-10-25  5:20     ` kernel test robot
2021-10-25  5:20     ` kernel test robot
2021-10-25  9:40   ` kernel test robot
2021-10-25  9:40     ` kernel test robot
2021-10-25  9:40     ` kernel test robot
2021-10-25 16:37   ` kernel test robot [this message]
2021-10-25 16:37     ` kernel test robot
2021-10-25 16:37     ` kernel test robot
2021-10-18  4:20 ` [PATCH v5 3/4] perf/marvell: cn10k DDR perfmon event overflow handling Bharat Bhushan
2021-10-18  4:20   ` Bharat Bhushan
2021-10-18  4:37   ` Bhaskara Budiredla
2021-10-18  4:37     ` Bhaskara Budiredla
2021-10-18  4:20 ` [PATCH v5 4/4] perf/marvell: cn10k DDR perf event core ownership Bharat Bhushan
2021-10-18  4:20   ` Bharat Bhushan
2021-10-18  4:37   ` Bhaskara Budiredla
2021-10-18  4:37     ` 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=202110260025.iRmRCwpb-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.