linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Mike Leach <mike.leach@linaro.org>,
	coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org, mathieu.poirier@linaro.org,
	suzuki.poulose@arm.com, peterz@infradead.org, mingo@redhat.com,
	acme@kernel.org, linux-perf-users@vger.kernel.org,
	leo.yan@linaro.org, quic_jinlmao@quicinc.com,
	Mike Leach <mike.leach@linaro.org>
Subject: Re: [PATCH v3 05/13] coresight: etm3x: Update ETM3 driver to use Trace ID API
Date: Sat, 13 Aug 2022 21:48:19 +0800	[thread overview]
Message-ID: <202208132126.X6alpomk-lkp@intel.com> (raw)
In-Reply-To: <20220809223401.24599-6-mike.leach@linaro.org>

Hi Mike,

I love your patch! Yet something to improve:

[auto build test ERROR on acme/perf/core]
[also build test ERROR on tip/perf/core atorgue-stm32/stm32-next linus/master v5.19 next-20220812]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Mike-Leach/coresight-Add-new-API-to-allocate-trace-source-ID-values/20220810-063940
base:   https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git perf/core
config: arm-allyesconfig (https://download.01.org/0day-ci/archive/20220813/202208132126.X6alpomk-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/48c9bb1ba00758132c4523dba423071440723ccd
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Mike-Leach/coresight-Add-new-API-to-allocate-trace-source-ID-values/20220810-063940
        git checkout 48c9bb1ba00758132c4523dba423071440723ccd
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/

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

All errors (new ones prefixed by >>):

   drivers/hwtracing/coresight/coresight-etm3x-core.c:509:44: warning: 'struct etmv4_drvdata' declared inside parameter list will not be visible outside of this definition or declaration
     509 | static int etm_set_current_trace_id(struct etmv4_drvdata *drvdata)
         |                                            ^~~~~~~~~~~~~
   drivers/hwtracing/coresight/coresight-etm3x-core.c: In function 'etm_set_current_trace_id':
>> drivers/hwtracing/coresight/coresight-etm3x-core.c:517:58: error: invalid use of undefined type 'struct etmv4_drvdata'
     517 |         trace_id = coresight_trace_id_read_cpu_id(drvdata->cpu);
         |                                                          ^~
   drivers/hwtracing/coresight/coresight-etm3x-core.c:519:24: error: invalid use of undefined type 'struct etmv4_drvdata'
     519 |                 drvdata->traceid = (u8)trace_id;
         |                        ^~
   In file included from include/linux/device.h:15,
                    from drivers/hwtracing/coresight/coresight-etm3x-core.c:12:
   drivers/hwtracing/coresight/coresight-etm3x-core.c:523:25: error: invalid use of undefined type 'struct etmv4_drvdata'
     523 |         dev_err(&drvdata->csdev->dev, "Failed to set trace ID for %s on CPU%d\n",
         |                         ^~
   include/linux/dev_printk.h:110:25: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                         ^~~
   drivers/hwtracing/coresight/coresight-etm3x-core.c:523:9: note: in expansion of macro 'dev_err'
     523 |         dev_err(&drvdata->csdev->dev, "Failed to set trace ID for %s on CPU%d\n",
         |         ^~~~~~~
   drivers/hwtracing/coresight/coresight-etm3x-core.c:524:34: error: invalid use of undefined type 'struct etmv4_drvdata'
     524 |                 dev_name(&drvdata->csdev->dev), drvdata->cpu);
         |                                  ^~
   include/linux/dev_printk.h:110:37: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                                     ^~~~~~~~~~~
   drivers/hwtracing/coresight/coresight-etm3x-core.c:523:9: note: in expansion of macro 'dev_err'
     523 |         dev_err(&drvdata->csdev->dev, "Failed to set trace ID for %s on CPU%d\n",
         |         ^~~~~~~
   drivers/hwtracing/coresight/coresight-etm3x-core.c:524:56: error: invalid use of undefined type 'struct etmv4_drvdata'
     524 |                 dev_name(&drvdata->csdev->dev), drvdata->cpu);
         |                                                        ^~
   include/linux/dev_printk.h:110:37: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                                     ^~~~~~~~~~~
   drivers/hwtracing/coresight/coresight-etm3x-core.c:523:9: note: in expansion of macro 'dev_err'
     523 |         dev_err(&drvdata->csdev->dev, "Failed to set trace ID for %s on CPU%d\n",
         |         ^~~~~~~
   drivers/hwtracing/coresight/coresight-etm3x-core.c: In function 'etm_enable_perf':
>> drivers/hwtracing/coresight/coresight-etm3x-core.c:547:40: error: passing argument 1 of 'etm_set_current_trace_id' from incompatible pointer type [-Werror=incompatible-pointer-types]
     547 |         ret = etm_set_current_trace_id(drvdata);
         |                                        ^~~~~~~
         |                                        |
         |                                        struct etm_drvdata *
   drivers/hwtracing/coresight/coresight-etm3x-core.c:509:59: note: expected 'struct etmv4_drvdata *' but argument is of type 'struct etm_drvdata *'
     509 | static int etm_set_current_trace_id(struct etmv4_drvdata *drvdata)
         |                                     ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
   cc1: some warnings being treated as errors


vim +517 drivers/hwtracing/coresight/coresight-etm3x-core.c

   508	
   509	static int etm_set_current_trace_id(struct etmv4_drvdata *drvdata)
   510	{
   511		int trace_id;
   512	
   513		/*
   514		 * Set the currently allocated trace ID - perf allocates IDs
   515		 * as part of setup_aux for all CPUs it may use.
   516		 */
 > 517		trace_id = coresight_trace_id_read_cpu_id(drvdata->cpu);
   518		if (IS_VALID_ID(trace_id)) {
   519			drvdata->traceid = (u8)trace_id;
   520			return 0;
   521		}
   522	
   523		dev_err(&drvdata->csdev->dev, "Failed to set trace ID for %s on CPU%d\n",
   524			dev_name(&drvdata->csdev->dev), drvdata->cpu);
   525	
   526		return -EINVAL;
   527	}
   528	
   529	void etm_release_trace_id(struct etm_drvdata *drvdata)
   530	{
   531		coresight_trace_id_put_cpu_id(drvdata->cpu);
   532	}
   533	
   534	static int etm_enable_perf(struct coresight_device *csdev,
   535				   struct perf_event *event)
   536	{
   537		struct etm_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent);
   538		int ret;
   539	
   540		if (WARN_ON_ONCE(drvdata->cpu != smp_processor_id()))
   541			return -EINVAL;
   542	
   543		/* Configure the tracer based on the session's specifics */
   544		etm_parse_event_config(drvdata, event);
   545	
   546		/* perf allocates cpu IDs in setup aux - set the current on device */
 > 547		ret = etm_set_current_trace_id(drvdata);
   548		if (ret < 0)
   549			return ret;
   550	
   551		/* And enable it */
   552		ret = etm_enable_hw(drvdata);
   553	
   554		return ret;
   555	}
   556	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

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

  parent reply	other threads:[~2022-08-13 13:50 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-09 22:33 [PATCH v3 00/13] coresight: Add new API to allocate trace source ID values Mike Leach
2022-08-09 22:33 ` [PATCH v3 01/13] coresight: trace-id: Add API to dynamically assign Trace " Mike Leach
2022-10-03  8:55   ` Suzuki K Poulose
2022-10-11 10:22     ` Mike Leach
2022-08-09 22:33 ` [PATCH v3 02/13] coresight: Remove obsolete Trace ID unniqueness checks Mike Leach
2022-10-03  8:56   ` Suzuki K Poulose
2022-08-09 22:33 ` [PATCH v3 03/13] coresight: stm: Update STM driver to use Trace ID API Mike Leach
2022-10-03  9:04   ` Suzuki K Poulose
2022-10-06 13:54     ` Mike Leach
2022-10-07 17:53       ` Suzuki K Poulose
2022-10-11 11:10         ` Mike Leach
2022-10-11 15:10           ` Suzuki K Poulose
2022-08-09 22:33 ` [PATCH v3 04/13] coresight: etm4x: Update ETM4 " Mike Leach
2022-10-03  9:31   ` Suzuki K Poulose
2022-10-03  9:37     ` Suzuki K Poulose
2022-10-06 13:47       ` Mike Leach
2022-08-09 22:33 ` [PATCH v3 05/13] coresight: etm3x: Update ETM3 " Mike Leach
2022-08-13  9:53   ` kernel test robot
2022-08-13 13:48   ` kernel test robot [this message]
2022-08-09 22:33 ` [PATCH v3 06/13] coresight: etmX.X: stm: Remove trace_id() callback Mike Leach
2022-08-09 22:33 ` [PATCH v3 07/13] coresight: perf: traceid: Add perf notifiers for Trace ID Mike Leach
2022-08-09 22:33 ` [PATCH v3 08/13] perf: cs-etm: Move mapping of Trace ID and cpu into helper function Mike Leach
2022-08-09 22:33 ` [PATCH v3 09/13] perf: cs-etm: Update record event to use new Trace ID protocol Mike Leach
2022-08-09 22:33 ` [PATCH v3 10/13] kernel: events: Export perf_report_aux_output_id() Mike Leach
2022-08-09 22:33 ` [PATCH v3 11/13] perf: cs-etm: Handle PERF_RECORD_AUX_OUTPUT_HW_ID packet Mike Leach
2022-08-09 22:34 ` [PATCH v3 12/13] coresight: events: PERF_RECORD_AUX_OUTPUT_HW_ID used for Trace ID Mike Leach
2022-08-09 22:34 ` [PATCH v3 13/13] coresight: trace-id: Add debug & test macros to Trace ID allocation Mike Leach
2022-10-03 11:06   ` Suzuki K Poulose
2022-10-06 13:22     ` Mike Leach
2022-08-12 19:50 ` [PATCH v3 00/13] coresight: Add new API to allocate trace source ID values Arnaldo Carvalho de Melo
2022-08-15 19:04   ` Mike Leach

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=202208132126.X6alpomk-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=acme@kernel.org \
    --cc=coresight@lists.linaro.org \
    --cc=kbuild-all@lists.01.org \
    --cc=leo.yan@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=mike.leach@linaro.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=quic_jinlmao@quicinc.com \
    --cc=suzuki.poulose@arm.com \
    /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).