[PATCH 1/2] powerpc/perf: Cleanup of PM_BR_CMPL vs. PM_BRU_CMPL in power9 event list

kbuild test robot lkp at intel.com
Sat Jan 7 08:18:30 AEDT 2017


Hi Madhavan,

[auto build test WARNING on powerpc/next]
[also build test WARNING on v4.10-rc2 next-20170106]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Madhavan-Srinivasan/Cleanup-and-fix-PM_BR_CMPL-event-code-in-power9/20170107-023212
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=powerpc 

All warnings (new ones prefixed by >>):

   In file included from arch/powerpc/perf/isa207-common.h:16:0,
                    from arch/powerpc/perf/power9-pmu.c:16:
   arch/powerpc/perf/power9-pmu.c:113:42: error: 'PM_BRU_CMPL' undeclared here (not in a function)
    GENERIC_EVENT_ATTR(branch-instructions,  PM_BRU_CMPL);
                                             ^
   include/linux/perf_event.h:1359:11: note: in definition of macro 'PMU_EVENT_ATTR'
     .id   =  _id,       \
              ^~~
>> arch/powerpc/include/asm/perf_event_server.h:152:40: note: in expansion of macro 'EVENT_ATTR'
    #define GENERIC_EVENT_ATTR(_name, _id) EVENT_ATTR(_name, _id, _g)
                                           ^~~~~~~~~~
>> arch/powerpc/perf/power9-pmu.c:113:1: note: in expansion of macro 'GENERIC_EVENT_ATTR'
    GENERIC_EVENT_ATTR(branch-instructions,  PM_BRU_CMPL);
    ^~~~~~~~~~~~~~~~~~
   arch/powerpc/perf/power9-pmu.c:347:27: error: initializer element is not constant
       [ C(RESULT_ACCESS) ] = PM_BRU_CMPL,
                              ^~~~~~~~~~~
   arch/powerpc/perf/power9-pmu.c:347:27: note: (near initialization for 'power9_cache_events[5][0][0]')

vim +/EVENT_ATTR +152 arch/powerpc/include/asm/perf_event_server.h

1c53a270 Sukadev Bhattiprolu 2013-01-22  136   * event 'cpu-cycles' can have two entries in sysfs: 'cpu-cycles' and
1c53a270 Sukadev Bhattiprolu 2013-01-22  137   * 'PM_CYC' where the latter is the name by which the event is known in
1c53a270 Sukadev Bhattiprolu 2013-01-22  138   * POWER CPU specification.
e0728b50 Sukadev Bhattiprolu 2016-01-11  139   *
e0728b50 Sukadev Bhattiprolu 2016-01-11  140   * Similarly, some hardware and cache events use the same event code. Eg.
e0728b50 Sukadev Bhattiprolu 2016-01-11  141   * on POWER8, both "cache-references" and "L1-dcache-loads" events refer
e0728b50 Sukadev Bhattiprolu 2016-01-11  142   * to the same event, PM_LD_REF_L1.  The suffix, allows us to have two
e0728b50 Sukadev Bhattiprolu 2016-01-11  143   * sysfs objects for the same event and thus two entries/aliases in sysfs.
1c53a270 Sukadev Bhattiprolu 2013-01-22  144   */
1c53a270 Sukadev Bhattiprolu 2013-01-22  145  #define	EVENT_VAR(_id, _suffix)		event_attr_##_id##_suffix
f2b4367a Sukadev Bhattiprolu 2013-02-05  146  #define	EVENT_PTR(_id, _suffix)		&EVENT_VAR(_id, _suffix).attr.attr
1c53a270 Sukadev Bhattiprolu 2013-01-22  147  
1c53a270 Sukadev Bhattiprolu 2013-01-22  148  #define	EVENT_ATTR(_name, _id, _suffix)					\
d4969e24 Sukadev Bhattiprolu 2016-01-11  149  	PMU_EVENT_ATTR(_name, EVENT_VAR(_id, _suffix), _id,		\
1c53a270 Sukadev Bhattiprolu 2013-01-22  150  			power_events_sysfs_show)
1c53a270 Sukadev Bhattiprolu 2013-01-22  151  
1c53a270 Sukadev Bhattiprolu 2013-01-22 @152  #define	GENERIC_EVENT_ATTR(_name, _id)	EVENT_ATTR(_name, _id, _g)
1c53a270 Sukadev Bhattiprolu 2013-01-22  153  #define	GENERIC_EVENT_PTR(_id)		EVENT_PTR(_id, _g)
886c3b2d Sukadev Bhattiprolu 2013-01-22  154  
e0728b50 Sukadev Bhattiprolu 2016-01-11  155  #define	CACHE_EVENT_ATTR(_name, _id)	EVENT_ATTR(_name, _id, _c)
e0728b50 Sukadev Bhattiprolu 2016-01-11  156  #define	CACHE_EVENT_PTR(_id)		EVENT_PTR(_id, _c)
e0728b50 Sukadev Bhattiprolu 2016-01-11  157  
cfe0d8ba Runzhen Wang        2013-06-28  158  #define	POWER_EVENT_ATTR(_name, _id)	EVENT_ATTR(_name, _id, _p)
886c3b2d Sukadev Bhattiprolu 2013-01-22  159  #define	POWER_EVENT_PTR(_id)		EVENT_PTR(_id, _p)

:::::: The code at line 152 was first introduced by commit
:::::: 1c53a270724df91276d28d66f8e5a302fc6a5d74 perf/POWER7: Make generic event translations available in sysfs

:::::: TO: Sukadev Bhattiprolu <sukadev at linux.vnet.ibm.com>
:::::: CC: Arnaldo Carvalho de Melo <acme at redhat.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 51012 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20170107/53fc1648/attachment-0001.gz>


More information about the Linuxppc-dev mailing list