<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 19-Jul-2020, at 4:47 PM, kernel test robot <<a href="mailto:lkp@intel.com" class="">lkp@intel.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hi Athira,<br class=""><br class="">Thank you for the patch! Yet something to improve:<br class=""><br class="">[auto build test ERROR on powerpc/next]<br class="">[also build test ERROR on tip/perf/core v5.8-rc5 next-20200717]<br class="">[If your patch is applied to the wrong git tree, kindly drop us a note.<br class="">And when submitting patch, we suggest to use '--base' as documented in<br class=""><a href="https://git-scm.com/docs/git-format-patch" class="">https://git-scm.com/docs/git-format-patch</a>]<br class=""><br class="">url:    <a href="https://github.com/0day-ci/linux/commits/Athira-Rajeev/powerpc-perf-Add-support-for-power10-PMU-Hardware/20200717-224353" class="">https://github.com/0day-ci/linux/commits/Athira-Rajeev/powerpc-perf-Add-support-for-power10-PMU-Hardware/20200717-224353</a><br class="">base:   <a href="https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git" class="">https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git</a> next<br class="">config: powerpc64-randconfig-r024-20200719 (attached as .config)<br class="">compiler: clang version 12.0.0 (<a href="https://github.com/llvm/llvm-project" class="">https://github.com/llvm/llvm-project</a> ed6b578040a85977026c93bf4188f996148f3218)<br class="">reproduce (this is a W=1 build):<br class="">        wget <a href="https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross" class="">https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross</a> -O ~/bin/make.cross<br class="">        chmod +x ~/bin/make.cross<br class="">        # install powerpc64 cross compiling tool for clang build<br class="">        # apt-get install binutils-powerpc64-linux-gnu<br class="">        # save the attached .config to linux build tree<br class="">        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64 <br class=""><br class="">If you fix the issue, kindly add following tag as appropriate<br class="">Reported-by: kernel test robot <<a href="mailto:lkp@intel.com" class="">lkp@intel.com</a>><br class=""><br class="">All errors (new ones prefixed by >>):<br class=""><br class="">   arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]<br class="">   DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),<br class="">   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br class="">   arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'<br class="">                   __do_##name al;                                 \<br class="">                   ^~~~~~~~~~~~~~<br class="">   <scratch space>:221:1: note: expanded from here<br class="">   __do_insw<br class="">   ^<br class="">   arch/powerpc/include/asm/io.h:542:56: note: expanded from macro '__do_insw'<br class="">   #define __do_insw(p, b, n)      readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))<br class="">                                          ~~~~~~~~~~~~~~~~~~~~~^<br class="">   In file included from arch/powerpc/perf/perf_regs.c:10:<br class="">   In file included from include/linux/perf_event.h:57:<br class="">   In file included from include/linux/cgroup.h:26:<br class="">   In file included from include/linux/kernel_stat.h:9:<br class="">   In file included from include/linux/interrupt.h:11:<br class="">   In file included from include/linux/hardirq.h:10:<br class="">   In file included from arch/powerpc/include/asm/hardirq.h:6:<br class="">   In file included from include/linux/irq.h:20:<br class="">   In file included from include/linux/io.h:13:<br class="">   In file included from arch/powerpc/include/asm/io.h:604:<br class="">   arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]<br class="">   DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),<br class="">   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br class="">   arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'<br class="">                   __do_##name al;                                 \<br class="">                   ^~~~~~~~~~~~~~<br class="">   <scratch space>:223:1: note: expanded from here<br class="">   __do_insl<br class="">   ^<br class="">   arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insl'<br class="">   #define __do_insl(p, b, n)      readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))<br class="">                                          ~~~~~~~~~~~~~~~~~~~~~^<br class="">   In file included from arch/powerpc/perf/perf_regs.c:10:<br class="">   In file included from include/linux/perf_event.h:57:<br class="">   In file included from include/linux/cgroup.h:26:<br class="">   In file included from include/linux/kernel_stat.h:9:<br class="">   In file included from include/linux/interrupt.h:11:<br class="">   In file included from include/linux/hardirq.h:10:<br class="">   In file included from arch/powerpc/include/asm/hardirq.h:6:<br class="">   In file included from include/linux/irq.h:20:<br class="">   In file included from include/linux/io.h:13:<br class="">   In file included from arch/powerpc/include/asm/io.h:604:<br class="">   arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]<br class="">   DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),<br class="">   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br class="">   arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'<br class="">                   __do_##name al;                                 \<br class="">                   ^~~~~~~~~~~~~~<br class="">   <scratch space>:225:1: note: expanded from here<br class="">   __do_outsb<br class="">   ^<br class="">   arch/powerpc/include/asm/io.h:544:58: note: expanded from macro '__do_outsb'<br class="">   #define __do_outsb(p, b, n)     writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))<br class="">                                           ~~~~~~~~~~~~~~~~~~~~~^<br class="">   In file included from arch/powerpc/perf/perf_regs.c:10:<br class="">   In file included from include/linux/perf_event.h:57:<br class="">   In file included from include/linux/cgroup.h:26:<br class="">   In file included from include/linux/kernel_stat.h:9:<br class="">   In file included from include/linux/interrupt.h:11:<br class="">   In file included from include/linux/hardirq.h:10:<br class="">   In file included from arch/powerpc/include/asm/hardirq.h:6:<br class="">   In file included from include/linux/irq.h:20:<br class="">   In file included from include/linux/io.h:13:<br class="">   In file included from arch/powerpc/include/asm/io.h:604:<br class="">   arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]<br class="">   DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),<br class="">   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br class="">   arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'<br class="">                   __do_##name al;                                 \<br class="">                   ^~~~~~~~~~~~~~<br class="">   <scratch space>:227:1: note: expanded from here<br class="">   __do_outsw<br class="">   ^<br class="">   arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsw'<br class="">   #define __do_outsw(p, b, n)     writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))<br class="">                                           ~~~~~~~~~~~~~~~~~~~~~^<br class="">   In file included from arch/powerpc/perf/perf_regs.c:10:<br class="">   In file included from include/linux/perf_event.h:57:<br class="">   In file included from include/linux/cgroup.h:26:<br class="">   In file included from include/linux/kernel_stat.h:9:<br class="">   In file included from include/linux/interrupt.h:11:<br class="">   In file included from include/linux/hardirq.h:10:<br class="">   In file included from arch/powerpc/include/asm/hardirq.h:6:<br class="">   In file included from include/linux/irq.h:20:<br class="">   In file included from include/linux/io.h:13:<br class="">   In file included from arch/powerpc/include/asm/io.h:604:<br class="">   arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]<br class="">   DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),<br class="">   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br class="">   arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'<br class="">                   __do_##name al;                                 \<br class="">                   ^~~~~~~~~~~~~~<br class="">   <scratch space>:229:1: note: expanded from here<br class="">   __do_outsl<br class="">   ^<br class="">   arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsl'<br class="">   #define __do_outsl(p, b, n)     writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))<br class="">                                           ~~~~~~~~~~~~~~~~~~~~~^<br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">arch/powerpc/perf/perf_regs.c:16:5: error: expected identifier or '('<br class=""></blockquote></blockquote>   u64 PERF_REG_EXTENDED_MASK;<br class="">       ^<br class="">   include/linux/perf_regs.h:16:32: note: expanded from macro 'PERF_REG_EXTENDED_MASK'<br class="">   #define PERF_REG_EXTENDED_MASK  0<br class="">                                   ^<br class="">   12 warnings and 1 error generated.<br class=""><br class="">vim +16 arch/powerpc/perf/perf_regs.c<br class=""><br class="">    15<span class="Apple-tab-span" style="white-space:pre">       </span><br class=""><blockquote type="cite" class="">16<span class="Apple-tab-span" style="white-space:pre">  </span>u64 PERF_REG_EXTENDED_MASK;<br class=""></blockquote>    17<span class="Apple-tab-span" style="white-space:pre">    </span><br class=""></div></div></blockquote><div><br class=""></div><div>Hi,</div><div><br class=""></div><div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">This patch defines </span>PERF_REG_EXTENDED_MASK</div><div>in arch/powerpc/include/asm/perf_event_server.h and this header file is included conditionally based on</div><div>CONFIG_PPC_PERF_CTRS in arch/powerpc/include/asm/perf_event.h.</div><div><div>So build breaks happens with config having <span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">CONFIG_PERF_EVENTS set</span></div><div><font color="#000000" class="">and without </font><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">CONFIG_PPC_PERF_CTRS. </span></div><div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><br class=""></span></div><div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">This will be fixed by defining </span><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">PERF_REG_EXTENDED_MASK in </span><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">perf_event.h as below:</span></div><div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><br class=""></span></div><div><font color="#000000" class=""><span style="caret-color: rgb(0, 0, 0);" class="">—</span></font></div><div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class="">diff --git a/arch/powerpc/include/asm/perf_event.h b/arch/powerpc/include/asm/perf_event.h</div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class="">index eed3954082fa..b1c3a91aa6fa 100644</div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class="">--- a/arch/powerpc/include/asm/perf_event.h</div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class="">+++ b/arch/powerpc/include/asm/perf_event.h</div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class="">@@ -38,4 +38,6 @@</div><p style="margin: 0px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue"; min-height: 14px;" class=""> <br class="webkit-block-placeholder"></p><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class=""> /* To support perf_regs sier update */</div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class=""> extern bool is_sier_available(void);</div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class="">+extern u64 PERF_REG_EXTENDED_MASK;</div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class="">+#define PERF_REG_EXTENDED_MASK<span class="Apple-tab-span" style="white-space:pre">      </span>PERF_REG_EXTENDED_MASK</div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class=""> #endif</div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class="">diff --git a/arch/powerpc/include/asm/perf_event_server.h b/arch/powerpc/include/asm/perf_event_server.h</div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class="">index bf85d1a0b59e..5d368e81445f 100644</div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class="">--- a/arch/powerpc/include/asm/perf_event_server.h</div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class="">+++ b/arch/powerpc/include/asm/perf_event_server.h</div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class="">@@ -15,9 +15,6 @@</div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class=""> #define MAX_EVENT_ALTERNATIVES<span class="Apple-tab-span" style="white-space:pre">       </span>8</div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class=""> #define MAX_LIMITED_HWCOUNTERS<span class="Apple-tab-span" style="white-space:pre">  </span>2</div><p style="margin: 0px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue"; min-height: 14px;" class=""> <br class="webkit-block-placeholder"></p><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class="">-extern u64 PERF_REG_EXTENDED_MASK;</div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class="">-#define PERF_REG_EXTENDED_MASK<span class="Apple-tab-span" style="white-space:pre"> </span>PERF_REG_EXTENDED_MASK</div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class="">-</div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class=""> struct perf_event;</div><p style="margin: 0px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue"; min-height: 14px;" class=""> <br class="webkit-block-placeholder"></p><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class=""> struct mmcr_regs {</div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class="">—</div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class=""><br class=""></div></div><div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">We also need this patch by Madhavan Sirinivasan : </span><font color="#000000" class=""><span style="caret-color: rgb(0, 0, 0);" class=""><a href="https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=183203" class="">https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=183203</a></span></font></div><div><font color="#000000" class="">to solve similar build break with `is_sier_available`</font></div></div><div><br class=""></div><div>Thanks</div><div>Athira </div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><br class="">---<br class="">0-DAY CI Kernel Test Service, Intel Corporation<br class=""><a href="https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org" class="">https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org</a><br class=""><span id="cid:61136650-2C38-4F4C-81B9-B38529B45A87"><.config.gz></span></div></div></blockquote></div><br class=""></body></html>