lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202208132126.X6alpomk-lkp@intel.com>
Date:   Sat, 13 Aug 2022 21:48:19 +0800
From:   kernel test robot <lkp@...el.com>
To:     Mike Leach <mike.leach@...aro.org>, coresight@...ts.linaro.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Cc:     kbuild-all@...ts.01.org, mathieu.poirier@...aro.org,
        suzuki.poulose@....com, peterz@...radead.org, mingo@...hat.com,
        acme@...nel.org, linux-perf-users@...r.kernel.org,
        leo.yan@...aro.org, quic_jinlmao@...cinc.com,
        Mike Leach <mike.leach@...aro.org>
Subject: Re: [PATCH v3 05/13] coresight: etm3x: Update ETM3 driver to use
 Trace ID API

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@...el.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ