All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Tuan Phan <tuanphan@os.amperecomputing.com>
Cc: kbuild-all@lists.01.org, patches@amperecomputing.com,
	mark.rutland@arm.com, robin.murphy@arm.com,
	Will Deacon <will@kernel.org>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v4] driver/perf: Add PMU driver for the ARM DMC-620 memory controller
Date: Wed, 21 Oct 2020 18:38:18 +0800	[thread overview]
Message-ID: <202010211819.oGlt3eim-lkp@intel.com> (raw)
In-Reply-To: <1603235425-29442-1-git-send-email-tuanphan@os.amperecomputing.com>

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

Hi Tuan,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.9 next-20201021]
[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/Tuan-Phan/driver-perf-Add-PMU-driver-for-the-ARM-DMC-620-memory-controller/20201021-071241
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git c4d6fe7311762f2e03b3c27ad38df7c40c80cc93
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
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/95212570823403300bcf4fa4e38de366eeeee60c
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Tuan-Phan/driver-perf-Add-PMU-driver-for-the-ARM-DMC-620-memory-controller/20201021-071241
        git checkout 95212570823403300bcf4fa4e38de366eeeee60c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm 

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 >>):

   In file included from include/linux/ioport.h:15,
                    from include/linux/acpi.h:12,
                    from drivers/perf/arm_dmc620_pmu.c:12:
   drivers/perf/arm_dmc620_pmu.c: In function 'dmc620_pmu_enable_counter':
   include/linux/bits.h:36:11: warning: right shift count is negative [-Wshift-count-negative]
      36 |   (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
         |           ^~
   include/linux/bits.h:38:31: note: in expansion of macro '__GENMASK'
      38 |  (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                               ^~~~~~~~~
   drivers/perf/arm_dmc620_pmu.c:202:27: note: in expansion of macro 'GENMASK'
     202 |  ((((attr)->cfg) >> lo) & GENMASK(hi - lo, 0))
         |                           ^~~~~~~
   drivers/perf/arm_dmc620_pmu.c:205:2: note: in expansion of macro '_ATTR_CFG_GET_FLD'
     205 |  _ATTR_CFG_GET_FLD(attr,     \
         |  ^~~~~~~~~~~~~~~~~
   drivers/perf/arm_dmc620_pmu.c:328:8: note: in expansion of macro 'ATTR_CFG_GET_FLD'
     328 |  reg = ATTR_CFG_GET_FLD(attr, mask);
         |        ^~~~~~~~~~~~~~~~
   include/linux/bits.h:36:11: warning: right shift count is negative [-Wshift-count-negative]
      36 |   (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
         |           ^~
   include/linux/bits.h:38:31: note: in expansion of macro '__GENMASK'
      38 |  (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                               ^~~~~~~~~
   drivers/perf/arm_dmc620_pmu.c:202:27: note: in expansion of macro 'GENMASK'
     202 |  ((((attr)->cfg) >> lo) & GENMASK(hi - lo, 0))
         |                           ^~~~~~~
   drivers/perf/arm_dmc620_pmu.c:205:2: note: in expansion of macro '_ATTR_CFG_GET_FLD'
     205 |  _ATTR_CFG_GET_FLD(attr,     \
         |  ^~~~~~~~~~~~~~~~~
   drivers/perf/arm_dmc620_pmu.c:334:8: note: in expansion of macro 'ATTR_CFG_GET_FLD'
     334 |  reg = ATTR_CFG_GET_FLD(attr, match);
         |        ^~~~~~~~~~~~~~~~
   drivers/perf/arm_dmc620_pmu.c: In function 'dmc620_pmu_device_probe':
>> drivers/perf/arm_dmc620_pmu.c:677:14: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 5 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=]
     677 |       "%s_%llx", DMC620_PMUNAME,
         |           ~~~^
         |              |
         |              long long unsigned int
         |           %x

vim +677 drivers/perf/arm_dmc620_pmu.c

   629	
   630	static int dmc620_pmu_device_probe(struct platform_device *pdev)
   631	{
   632		struct dmc620_pmu *dmc620_pmu;
   633		struct resource *res;
   634		char *name;
   635		int irq_num;
   636		int i, ret;
   637	
   638		dmc620_pmu = devm_kzalloc(&pdev->dev,
   639				sizeof(struct dmc620_pmu), GFP_KERNEL);
   640		if (!dmc620_pmu)
   641			return -ENOMEM;
   642	
   643		dmc620_pmu->pdev = pdev;
   644		platform_set_drvdata(pdev, dmc620_pmu);
   645	
   646		dmc620_pmu->pmu = (struct pmu) {
   647			.module = THIS_MODULE,
   648			.capabilities	= PERF_PMU_CAP_NO_EXCLUDE,
   649			.task_ctx_nr	= perf_invalid_context,
   650			.event_init	= dmc620_pmu_event_init,
   651			.add		= dmc620_pmu_add,
   652			.del		= dmc620_pmu_del,
   653			.start		= dmc620_pmu_start,
   654			.stop		= dmc620_pmu_stop,
   655			.read		= dmc620_pmu_read,
   656			.attr_groups	= dmc620_pmu_attr_groups,
   657		};
   658	
   659		res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
   660		dmc620_pmu->base = devm_ioremap_resource(&pdev->dev, res);
   661		if (IS_ERR(dmc620_pmu->base))
   662			return PTR_ERR(dmc620_pmu->base);
   663	
   664		/* Make sure device is reset before enabling interrupt */
   665		for (i = 0; i < DMC620_PMU_MAX_COUNTERS; i++)
   666			dmc620_pmu_creg_write(dmc620_pmu, i, DMC620_PMU_COUNTERn_CONTROL, 0);
   667	
   668		irq_num = platform_get_irq(pdev, 0);
   669		if (irq_num < 0)
   670			return irq_num;
   671	
   672		ret = dmc620_pmu_get_irq(dmc620_pmu, irq_num);
   673		if (ret)
   674			return ret;
   675	
   676		name = devm_kasprintf(&pdev->dev, GFP_KERNEL,
 > 677					  "%s_%llx", DMC620_PMUNAME,
   678					  (res->start) >> DMC620_PA_SHIFT);
   679		if (!name) {
   680			dev_err(&pdev->dev,
   681				  "Create name failed, PMU @%pa\n", &res->start);
   682			goto out_teardown_dev;
   683		}
   684	
   685		ret = perf_pmu_register(&dmc620_pmu->pmu, name, -1);
   686		if (ret)
   687			goto out_teardown_dev;
   688	
   689		return 0;
   690	
   691	out_teardown_dev:
   692		dmc620_pmu_put_irq(dmc620_pmu);
   693		synchronize_rcu();
   694		return ret;
   695	}
   696	

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

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v4] driver/perf: Add PMU driver for the ARM DMC-620 memory controller
Date: Wed, 21 Oct 2020 18:38:18 +0800	[thread overview]
Message-ID: <202010211819.oGlt3eim-lkp@intel.com> (raw)
In-Reply-To: <1603235425-29442-1-git-send-email-tuanphan@os.amperecomputing.com>

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

Hi Tuan,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.9 next-20201021]
[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/Tuan-Phan/driver-perf-Add-PMU-driver-for-the-ARM-DMC-620-memory-controller/20201021-071241
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git c4d6fe7311762f2e03b3c27ad38df7c40c80cc93
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
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/95212570823403300bcf4fa4e38de366eeeee60c
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Tuan-Phan/driver-perf-Add-PMU-driver-for-the-ARM-DMC-620-memory-controller/20201021-071241
        git checkout 95212570823403300bcf4fa4e38de366eeeee60c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm 

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 >>):

   In file included from include/linux/ioport.h:15,
                    from include/linux/acpi.h:12,
                    from drivers/perf/arm_dmc620_pmu.c:12:
   drivers/perf/arm_dmc620_pmu.c: In function 'dmc620_pmu_enable_counter':
   include/linux/bits.h:36:11: warning: right shift count is negative [-Wshift-count-negative]
      36 |   (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
         |           ^~
   include/linux/bits.h:38:31: note: in expansion of macro '__GENMASK'
      38 |  (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                               ^~~~~~~~~
   drivers/perf/arm_dmc620_pmu.c:202:27: note: in expansion of macro 'GENMASK'
     202 |  ((((attr)->cfg) >> lo) & GENMASK(hi - lo, 0))
         |                           ^~~~~~~
   drivers/perf/arm_dmc620_pmu.c:205:2: note: in expansion of macro '_ATTR_CFG_GET_FLD'
     205 |  _ATTR_CFG_GET_FLD(attr,     \
         |  ^~~~~~~~~~~~~~~~~
   drivers/perf/arm_dmc620_pmu.c:328:8: note: in expansion of macro 'ATTR_CFG_GET_FLD'
     328 |  reg = ATTR_CFG_GET_FLD(attr, mask);
         |        ^~~~~~~~~~~~~~~~
   include/linux/bits.h:36:11: warning: right shift count is negative [-Wshift-count-negative]
      36 |   (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
         |           ^~
   include/linux/bits.h:38:31: note: in expansion of macro '__GENMASK'
      38 |  (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                               ^~~~~~~~~
   drivers/perf/arm_dmc620_pmu.c:202:27: note: in expansion of macro 'GENMASK'
     202 |  ((((attr)->cfg) >> lo) & GENMASK(hi - lo, 0))
         |                           ^~~~~~~
   drivers/perf/arm_dmc620_pmu.c:205:2: note: in expansion of macro '_ATTR_CFG_GET_FLD'
     205 |  _ATTR_CFG_GET_FLD(attr,     \
         |  ^~~~~~~~~~~~~~~~~
   drivers/perf/arm_dmc620_pmu.c:334:8: note: in expansion of macro 'ATTR_CFG_GET_FLD'
     334 |  reg = ATTR_CFG_GET_FLD(attr, match);
         |        ^~~~~~~~~~~~~~~~
   drivers/perf/arm_dmc620_pmu.c: In function 'dmc620_pmu_device_probe':
>> drivers/perf/arm_dmc620_pmu.c:677:14: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 5 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=]
     677 |       "%s_%llx", DMC620_PMUNAME,
         |           ~~~^
         |              |
         |              long long unsigned int
         |           %x

vim +677 drivers/perf/arm_dmc620_pmu.c

   629	
   630	static int dmc620_pmu_device_probe(struct platform_device *pdev)
   631	{
   632		struct dmc620_pmu *dmc620_pmu;
   633		struct resource *res;
   634		char *name;
   635		int irq_num;
   636		int i, ret;
   637	
   638		dmc620_pmu = devm_kzalloc(&pdev->dev,
   639				sizeof(struct dmc620_pmu), GFP_KERNEL);
   640		if (!dmc620_pmu)
   641			return -ENOMEM;
   642	
   643		dmc620_pmu->pdev = pdev;
   644		platform_set_drvdata(pdev, dmc620_pmu);
   645	
   646		dmc620_pmu->pmu = (struct pmu) {
   647			.module = THIS_MODULE,
   648			.capabilities	= PERF_PMU_CAP_NO_EXCLUDE,
   649			.task_ctx_nr	= perf_invalid_context,
   650			.event_init	= dmc620_pmu_event_init,
   651			.add		= dmc620_pmu_add,
   652			.del		= dmc620_pmu_del,
   653			.start		= dmc620_pmu_start,
   654			.stop		= dmc620_pmu_stop,
   655			.read		= dmc620_pmu_read,
   656			.attr_groups	= dmc620_pmu_attr_groups,
   657		};
   658	
   659		res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
   660		dmc620_pmu->base = devm_ioremap_resource(&pdev->dev, res);
   661		if (IS_ERR(dmc620_pmu->base))
   662			return PTR_ERR(dmc620_pmu->base);
   663	
   664		/* Make sure device is reset before enabling interrupt */
   665		for (i = 0; i < DMC620_PMU_MAX_COUNTERS; i++)
   666			dmc620_pmu_creg_write(dmc620_pmu, i, DMC620_PMU_COUNTERn_CONTROL, 0);
   667	
   668		irq_num = platform_get_irq(pdev, 0);
   669		if (irq_num < 0)
   670			return irq_num;
   671	
   672		ret = dmc620_pmu_get_irq(dmc620_pmu, irq_num);
   673		if (ret)
   674			return ret;
   675	
   676		name = devm_kasprintf(&pdev->dev, GFP_KERNEL,
 > 677					  "%s_%llx", DMC620_PMUNAME,
   678					  (res->start) >> DMC620_PA_SHIFT);
   679		if (!name) {
   680			dev_err(&pdev->dev,
   681				  "Create name failed, PMU @%pa\n", &res->start);
   682			goto out_teardown_dev;
   683		}
   684	
   685		ret = perf_pmu_register(&dmc620_pmu->pmu, name, -1);
   686		if (ret)
   687			goto out_teardown_dev;
   688	
   689		return 0;
   690	
   691	out_teardown_dev:
   692		dmc620_pmu_put_irq(dmc620_pmu);
   693		synchronize_rcu();
   694		return ret;
   695	}
   696	

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

  reply	other threads:[~2020-10-21 10:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-20 23:10 [PATCH v4] driver/perf: Add PMU driver for the ARM DMC-620 memory controller Tuan Phan
2020-10-20 23:10 ` Tuan Phan
2020-10-21 10:38 ` kernel test robot [this message]
2020-10-21 10:38   ` kernel test robot
2020-10-22 17:34 ` Robin Murphy
2020-10-22 17:34   ` Robin Murphy
     [not found]   ` <1EC85DEF-8E0C-42B9-9B01-DA897147B1F7@amperemail.onmicrosoft.com>
2020-10-23 13:43     ` Robin Murphy
2020-10-23 13:43       ` Robin Murphy
2020-10-23 18:23       ` Tuan Phan
2020-10-23 18:23         ` Tuan Phan
2020-10-27 11:54         ` Robin Murphy
2020-10-27 11:54           ` Robin Murphy

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=202010211819.oGlt3eim-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=patches@amperecomputing.com \
    --cc=robin.murphy@arm.com \
    --cc=tuanphan@os.amperecomputing.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.