From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3229C433E2 for ; Mon, 20 Jul 2020 08:17:01 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3D9D92080D for ; Mon, 20 Jul 2020 08:17:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3D9D92080D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4B9F2339RLzDqVK for ; Mon, 20 Jul 2020 18:16:59 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=linux.vnet.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=atrajeev@linux.vnet.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=fail (p=none dis=none) header.from=linux.vnet.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4B9DvJ00RrzDqQY for ; Mon, 20 Jul 2020 18:11:07 +1000 (AEST) Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 06K82vhq031028; Mon, 20 Jul 2020 04:10:55 -0400 Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0b-001b2d01.pphosted.com with ESMTP id 32cea0u2cv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 20 Jul 2020 04:10:55 -0400 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 06K853vK011110; Mon, 20 Jul 2020 08:09:56 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma03ams.nl.ibm.com with ESMTP id 32brq7jdw5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 20 Jul 2020 08:09:56 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 06K88UPg54919658 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 20 Jul 2020 08:08:30 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 40076A4059; Mon, 20 Jul 2020 08:09:54 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EA615A4051; Mon, 20 Jul 2020 08:09:49 +0000 (GMT) Received: from [9.79.219.218] (unknown [9.79.219.218]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Mon, 20 Jul 2020 08:09:49 +0000 (GMT) From: Athira Rajeev Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_A5551C5C-F653-4A8F-8DFB-D9ACF0D5F7B6" Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: [v3 12/15] powerpc/perf: Add support for outputting extended regs in perf intr_regs Date: Mon, 20 Jul 2020 13:39:47 +0530 In-Reply-To: <202007191932.4rHY8FD8%lkp@intel.com> To: kernel test robot References: <1594996707-3727-13-git-send-email-atrajeev@linux.vnet.ibm.com> <202007191932.4rHY8FD8%lkp@intel.com> X-Mailer: Apple Mail (2.3608.80.23.2.2) X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-07-20_04:2020-07-17, 2020-07-20 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 impostorscore=0 spamscore=0 malwarescore=0 mlxscore=0 phishscore=0 adultscore=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0 mlxlogscore=999 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007200060 X-Mailman-Approved-At: Mon, 20 Jul 2020 18:15:07 +1000 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ego , Michael Neuling , maddy@linux.vnet.ibm.com, kbuild-all@lists.01.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, svaidyan@in.ibm.com, clang-built-linux@googlegroups.com, acme@kernel.org, jolsa@kernel.org, linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" --Apple-Mail=_A5551C5C-F653-4A8F-8DFB-D9ACF0D5F7B6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 19-Jul-2020, at 4:47 PM, kernel test robot wrote: >=20 > Hi Athira, >=20 > Thank you for the patch! Yet something to improve: >=20 > [auto build test ERROR on powerpc/next] > [also build test ERROR on tip/perf/core v5.8-rc5 next-20200717] > [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] >=20 > url: = https://github.com/0day-ci/linux/commits/Athira-Rajeev/powerpc-perf-Add-su= pport-for-power10-PMU-Hardware/20200717-224353 > base: = https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next > config: powerpc64-randconfig-r024-20200719 (attached as .config) > compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project = ed6b578040a85977026c93bf4188f996148f3218) > reproduce (this is a W=3D1 build): > wget = https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross = -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # install powerpc64 cross compiling tool for clang build > # apt-get install binutils-powerpc64-linux-gnu > # save the attached .config to linux build tree > COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dclang make.cross = ARCH=3Dpowerpc64=20 >=20 > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot >=20 > All errors (new ones prefixed by >>): >=20 > arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer = arithmetic on a null pointer has undefined behavior = [-Wnull-pointer-arithmetic] > DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c), > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > arch/powerpc/include/asm/io.h:601:3: note: expanded from macro = 'DEF_PCI_AC_NORET' > __do_##name al; \ > ^~~~~~~~~~~~~~ > :221:1: note: expanded from here > __do_insw > ^ > arch/powerpc/include/asm/io.h:542:56: note: expanded from macro = '__do_insw' > #define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), = (b), (n)) > ~~~~~~~~~~~~~~~~~~~~~^ > In file included from arch/powerpc/perf/perf_regs.c:10: > In file included from include/linux/perf_event.h:57: > In file included from include/linux/cgroup.h:26: > In file included from include/linux/kernel_stat.h:9: > In file included from include/linux/interrupt.h:11: > In file included from include/linux/hardirq.h:10: > In file included from arch/powerpc/include/asm/hardirq.h:6: > In file included from include/linux/irq.h:20: > In file included from include/linux/io.h:13: > In file included from arch/powerpc/include/asm/io.h:604: > arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer = arithmetic on a null pointer has undefined behavior = [-Wnull-pointer-arithmetic] > DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c), > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > arch/powerpc/include/asm/io.h:601:3: note: expanded from macro = 'DEF_PCI_AC_NORET' > __do_##name al; \ > ^~~~~~~~~~~~~~ > :223:1: note: expanded from here > __do_insl > ^ > arch/powerpc/include/asm/io.h:543:56: note: expanded from macro = '__do_insl' > #define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), = (b), (n)) > ~~~~~~~~~~~~~~~~~~~~~^ > In file included from arch/powerpc/perf/perf_regs.c:10: > In file included from include/linux/perf_event.h:57: > In file included from include/linux/cgroup.h:26: > In file included from include/linux/kernel_stat.h:9: > In file included from include/linux/interrupt.h:11: > In file included from include/linux/hardirq.h:10: > In file included from arch/powerpc/include/asm/hardirq.h:6: > In file included from include/linux/irq.h:20: > In file included from include/linux/io.h:13: > In file included from arch/powerpc/include/asm/io.h:604: > arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer = arithmetic on a null pointer has undefined behavior = [-Wnull-pointer-arithmetic] > DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned = long c), > = ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= > arch/powerpc/include/asm/io.h:601:3: note: expanded from macro = 'DEF_PCI_AC_NORET' > __do_##name al; \ > ^~~~~~~~~~~~~~ > :225:1: note: expanded from here > __do_outsb > ^ > arch/powerpc/include/asm/io.h:544:58: note: expanded from macro = '__do_outsb' > #define __do_outsb(p, b, n) = writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) > ~~~~~~~~~~~~~~~~~~~~~^ > In file included from arch/powerpc/perf/perf_regs.c:10: > In file included from include/linux/perf_event.h:57: > In file included from include/linux/cgroup.h:26: > In file included from include/linux/kernel_stat.h:9: > In file included from include/linux/interrupt.h:11: > In file included from include/linux/hardirq.h:10: > In file included from arch/powerpc/include/asm/hardirq.h:6: > In file included from include/linux/irq.h:20: > In file included from include/linux/io.h:13: > In file included from arch/powerpc/include/asm/io.h:604: > arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer = arithmetic on a null pointer has undefined behavior = [-Wnull-pointer-arithmetic] > DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned = long c), > = ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= > arch/powerpc/include/asm/io.h:601:3: note: expanded from macro = 'DEF_PCI_AC_NORET' > __do_##name al; \ > ^~~~~~~~~~~~~~ > :227:1: note: expanded from here > __do_outsw > ^ > arch/powerpc/include/asm/io.h:545:58: note: expanded from macro = '__do_outsw' > #define __do_outsw(p, b, n) = writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) > ~~~~~~~~~~~~~~~~~~~~~^ > In file included from arch/powerpc/perf/perf_regs.c:10: > In file included from include/linux/perf_event.h:57: > In file included from include/linux/cgroup.h:26: > In file included from include/linux/kernel_stat.h:9: > In file included from include/linux/interrupt.h:11: > In file included from include/linux/hardirq.h:10: > In file included from arch/powerpc/include/asm/hardirq.h:6: > In file included from include/linux/irq.h:20: > In file included from include/linux/io.h:13: > In file included from arch/powerpc/include/asm/io.h:604: > arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer = arithmetic on a null pointer has undefined behavior = [-Wnull-pointer-arithmetic] > DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned = long c), > = ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= > arch/powerpc/include/asm/io.h:601:3: note: expanded from macro = 'DEF_PCI_AC_NORET' > __do_##name al; \ > ^~~~~~~~~~~~~~ > :229:1: note: expanded from here > __do_outsl > ^ > arch/powerpc/include/asm/io.h:546:58: note: expanded from macro = '__do_outsl' > #define __do_outsl(p, b, n) = writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) > ~~~~~~~~~~~~~~~~~~~~~^ >>> arch/powerpc/perf/perf_regs.c:16:5: error: expected identifier or = '(' > u64 PERF_REG_EXTENDED_MASK; > ^ > include/linux/perf_regs.h:16:32: note: expanded from macro = 'PERF_REG_EXTENDED_MASK' > #define PERF_REG_EXTENDED_MASK 0 > ^ > 12 warnings and 1 error generated. >=20 > vim +16 arch/powerpc/perf/perf_regs.c >=20 > 15=09 >> 16 u64 PERF_REG_EXTENDED_MASK; > 17=09 Hi, This patch defines PERF_REG_EXTENDED_MASK in arch/powerpc/include/asm/perf_event_server.h and this header file is = included conditionally based on CONFIG_PPC_PERF_CTRS in arch/powerpc/include/asm/perf_event.h. So build breaks happens with config having CONFIG_PERF_EVENTS set and without CONFIG_PPC_PERF_CTRS.=20 This will be fixed by defining PERF_REG_EXTENDED_MASK in perf_event.h as = below: =E2=80=94 diff --git a/arch/powerpc/include/asm/perf_event.h = b/arch/powerpc/include/asm/perf_event.h index eed3954082fa..b1c3a91aa6fa 100644 --- a/arch/powerpc/include/asm/perf_event.h +++ b/arch/powerpc/include/asm/perf_event.h @@ -38,4 +38,6 @@ =20 /* To support perf_regs sier update */ extern bool is_sier_available(void); +extern u64 PERF_REG_EXTENDED_MASK; +#define PERF_REG_EXTENDED_MASK PERF_REG_EXTENDED_MASK #endif diff --git a/arch/powerpc/include/asm/perf_event_server.h = b/arch/powerpc/include/asm/perf_event_server.h index bf85d1a0b59e..5d368e81445f 100644 --- a/arch/powerpc/include/asm/perf_event_server.h +++ b/arch/powerpc/include/asm/perf_event_server.h @@ -15,9 +15,6 @@ #define MAX_EVENT_ALTERNATIVES 8 #define MAX_LIMITED_HWCOUNTERS 2 =20 -extern u64 PERF_REG_EXTENDED_MASK; -#define PERF_REG_EXTENDED_MASK PERF_REG_EXTENDED_MASK - struct perf_event; =20 struct mmcr_regs { =E2=80=94 We also need this patch by Madhavan Sirinivasan : = https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=3D183203 to solve similar build break with `is_sier_available` Thanks Athira=20 >=20 > --- > 0-DAY CI Kernel Test Service, Intel Corporation > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org > <.config.gz> --Apple-Mail=_A5551C5C-F653-4A8F-8DFB-D9ACF0D5F7B6 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On 19-Jul-2020, at 4:47 PM, kernel test robot <lkp@intel.com> = wrote:

Hi Athira,

Thank you for the = patch! Yet something to improve:

[auto = build test ERROR on powerpc/next]
[also build test ERROR = on tip/perf/core v5.8-rc5 next-20200717]
[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/Athira-Rajeev/powerpc-= perf-Add-support-for-power10-PMU-Hardware/20200717-224353
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.g= it next
config: powerpc64-randconfig-r024-20200719 = (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project = ed6b578040a85977026c93bf4188f996148f3218)
reproduce (this = is a W=3D1 build):
=        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/m= ake.cross -O ~/bin/make.cross
=        chmod +x ~/bin/make.cross
       # install = powerpc64 cross compiling tool for clang build
=        # apt-get install = binutils-powerpc64-linux-gnu
=        # save the attached .config to = linux build tree
=        COMPILER_INSTALL_PATH=3D$HOME/0d= ay COMPILER=3Dclang make.cross ARCH=3Dpowerpc64

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

All errors (new ones prefixed by >>):

=   arch/powerpc/include/asm/io-defs.h:45:1: warning: performing = pointer arithmetic on a null pointer has undefined behavior = [-Wnull-pointer-arithmetic]
=   DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned = long c),
=   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~~
  arch/powerpc/include/asm/io.h:601:3: = note: expanded from macro 'DEF_PCI_AC_NORET'
=             &n= bsp;     __do_##name al; =             &n= bsp;           &nbs= p;       \
=             &n= bsp;     ^~~~~~~~~~~~~~
=   <scratch space>:221:1: note: expanded from here
  __do_insw
  ^
  arch/powerpc/include/asm/io.h:542:56: note: = expanded from macro '__do_insw'
  #define = __do_insw(p, b, n) =      readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), = (n))
=             &n= bsp;           &nbs= p;            =     ~~~~~~~~~~~~~~~~~~~~~^
=   In file included from arch/powerpc/perf/perf_regs.c:10:
  In file included from = include/linux/perf_event.h:57:
  In file = included from include/linux/cgroup.h:26:
  In = file included from include/linux/kernel_stat.h:9:
=   In file included from include/linux/interrupt.h:11:
  In file included from = include/linux/hardirq.h:10:
  In file included = from arch/powerpc/include/asm/hardirq.h:6:
  In = file included from include/linux/irq.h:20:
  In = file included from include/linux/io.h:13:
  In = file included from arch/powerpc/include/asm/io.h:604:
=   arch/powerpc/include/asm/io-defs.h:47:1: warning: performing = pointer arithmetic on a null pointer has undefined behavior = [-Wnull-pointer-arithmetic]
=   DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned = long c),
=   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~~
  arch/powerpc/include/asm/io.h:601:3: = note: expanded from macro 'DEF_PCI_AC_NORET'
=             &n= bsp;     __do_##name al; =             &n= bsp;           &nbs= p;       \
=             &n= bsp;     ^~~~~~~~~~~~~~
=   <scratch space>:223:1: note: expanded from here
  __do_insl
  ^
  arch/powerpc/include/asm/io.h:543:56: note: = expanded from macro '__do_insl'
  #define = __do_insl(p, b, n) =      readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), = (n))
=             &n= bsp;           &nbs= p;            =     ~~~~~~~~~~~~~~~~~~~~~^
=   In file included from arch/powerpc/perf/perf_regs.c:10:
  In file included from = include/linux/perf_event.h:57:
  In file = included from include/linux/cgroup.h:26:
  In = file included from include/linux/kernel_stat.h:9:
=   In file included from include/linux/interrupt.h:11:
  In file included from = include/linux/hardirq.h:10:
  In file included = from arch/powerpc/include/asm/hardirq.h:6:
  In = file included from include/linux/irq.h:20:
  In = file included from include/linux/io.h:13:
  In = file included from arch/powerpc/include/asm/io.h:604:
=   arch/powerpc/include/asm/io-defs.h:49:1: warning: performing = pointer arithmetic on a null pointer has undefined behavior = [-Wnull-pointer-arithmetic]
=   DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, = unsigned long c),
=   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~~~~~~~~~
=   arch/powerpc/include/asm/io.h:601:3: note: expanded from = macro 'DEF_PCI_AC_NORET'
=             &n= bsp;     __do_##name al; =             &n= bsp;           &nbs= p;       \
=             &n= bsp;     ^~~~~~~~~~~~~~
=   <scratch space>:225:1: note: expanded from here
  __do_outsb
  ^
  arch/powerpc/include/asm/io.h:544:58: note: = expanded from macro '__do_outsb'
  #define = __do_outsb(p, b, n) =     writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
=             &n= bsp;           &nbs= p;            =      ~~~~~~~~~~~~~~~~~~~~~^
=   In file included from arch/powerpc/perf/perf_regs.c:10:
  In file included from = include/linux/perf_event.h:57:
  In file = included from include/linux/cgroup.h:26:
  In = file included from include/linux/kernel_stat.h:9:
=   In file included from include/linux/interrupt.h:11:
  In file included from = include/linux/hardirq.h:10:
  In file included = from arch/powerpc/include/asm/hardirq.h:6:
  In = file included from include/linux/irq.h:20:
  In = file included from include/linux/io.h:13:
  In = file included from arch/powerpc/include/asm/io.h:604:
=   arch/powerpc/include/asm/io-defs.h:51:1: warning: performing = pointer arithmetic on a null pointer has undefined behavior = [-Wnull-pointer-arithmetic]
=   DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, = unsigned long c),
=   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~~~~~~~~~
=   arch/powerpc/include/asm/io.h:601:3: note: expanded from = macro 'DEF_PCI_AC_NORET'
=             &n= bsp;     __do_##name al; =             &n= bsp;           &nbs= p;       \
=             &n= bsp;     ^~~~~~~~~~~~~~
=   <scratch space>:227:1: note: expanded from here
  __do_outsw
  ^
  arch/powerpc/include/asm/io.h:545:58: note: = expanded from macro '__do_outsw'
  #define = __do_outsw(p, b, n) =     writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
=             &n= bsp;           &nbs= p;            =      ~~~~~~~~~~~~~~~~~~~~~^
=   In file included from arch/powerpc/perf/perf_regs.c:10:
  In file included from = include/linux/perf_event.h:57:
  In file = included from include/linux/cgroup.h:26:
  In = file included from include/linux/kernel_stat.h:9:
=   In file included from include/linux/interrupt.h:11:
  In file included from = include/linux/hardirq.h:10:
  In file included = from arch/powerpc/include/asm/hardirq.h:6:
  In = file included from include/linux/irq.h:20:
  In = file included from include/linux/io.h:13:
  In = file included from arch/powerpc/include/asm/io.h:604:
=   arch/powerpc/include/asm/io-defs.h:53:1: warning: performing = pointer arithmetic on a null pointer has undefined behavior = [-Wnull-pointer-arithmetic]
=   DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, = unsigned long c),
=   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~~~~~~~~~
=   arch/powerpc/include/asm/io.h:601:3: note: expanded from = macro 'DEF_PCI_AC_NORET'
=             &n= bsp;     __do_##name al; =             &n= bsp;           &nbs= p;       \
=             &n= bsp;     ^~~~~~~~~~~~~~
=   <scratch space>:229:1: note: expanded from here
  __do_outsl
  ^
  arch/powerpc/include/asm/io.h:546:58: note: = expanded from macro '__do_outsl'
  #define = __do_outsl(p, b, n) =     writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
=             &n= bsp;           &nbs= p;            =      ~~~~~~~~~~~~~~~~~~~~~^
arch/powerpc/perf/perf_regs.c:16:5: error: expected = identifier or '('
=   u64 PERF_REG_EXTENDED_MASK;
=       ^
=   include/linux/perf_regs.h:16:32: note: expanded from macro = 'PERF_REG_EXTENDED_MASK'
  #define = PERF_REG_EXTENDED_MASK  0
=             &n= bsp;           &nbs= p;         ^
=   12 warnings and 1 error generated.

vim +16 arch/powerpc/perf/perf_regs.c

   15
16 u64 PERF_REG_EXTENDED_MASK;
   17

Hi,

This = patch defines PERF_REG_EXTENDED_MASK
in = arch/powerpc/include/asm/perf_event_server.h and this header file is = included conditionally based on
CONFIG_PPC_PERF_CTRS in = arch/powerpc/include/asm/perf_event.h.
So build breaks = happens with config having CONFIG_PERF_EVENTS = set
and = without CONFIG_PPC_PERF_CTRS. 

This will be fixed by = defining PERF_REG_EXTENDED_MASK in perf_event.h as below:

=E2=80=94
diff --git = a/arch/powerpc/include/asm/perf_event.h = b/arch/powerpc/include/asm/perf_event.h
index eed3954082fa..b1c3a91aa6fa = 100644
--- a/arch/powerpc/include/asm/perf_event.h
+++ = b/arch/powerpc/include/asm/perf_event.h
@@ -38,4 +38,6 @@

 

 /* To support perf_regs sier update = */
 extern = bool is_sier_available(void);
+extern u64 PERF_REG_EXTENDED_MASK;
+#define = PERF_REG_EXTENDED_MASK PERF_REG_EXTENDED_MASK
 #endif
diff --git a/arch/powerpc/include/asm/perf_event_server.h = b/arch/powerpc/include/asm/perf_event_server.h
index bf85d1a0b59e..5d368e81445f = 100644
--- a/arch/powerpc/include/asm/perf_event_server.h
+++ = b/arch/powerpc/include/asm/perf_event_server.h
@@ -15,9 +15,6 @@
 #define = MAX_EVENT_ALTERNATIVES 8
 #define MAX_LIMITED_HWCOUNTERS 2

 

-extern u64 = PERF_REG_EXTENDED_MASK;
-#define PERF_REG_EXTENDED_MASK PERF_REG_EXTENDED_MASK
-
 struct = perf_event;

 

 struct mmcr_regs {
=E2=80=94

We also need this patch by Madhavan = Sirinivasan : https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=3D= 183203
to = solve similar build break with = `is_sier_available`

Thanks
Athira 


= --Apple-Mail=_A5551C5C-F653-4A8F-8DFB-D9ACF0D5F7B6--