linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Will Deacon <will@kernel.org>
To: kernel test robot <lkp@intel.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>,
	llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Linux Memory Management List <linux-mm@kvack.org>,
	Zaid Al-Bassam <zalbassam@google.com>
Subject: Re: [linux-next:master 6577/7309] drivers/perf/arm_pmuv3.c:44:2: error: use of undeclared identifier 'PERF_MAP_ALL_UNSUPPORTED'
Date: Tue, 28 Mar 2023 13:21:38 +0100	[thread overview]
Message-ID: <20230328122138.GA1275@willie-the-truck> (raw)
In-Reply-To: <202303281539.zzI4vpw1-lkp@intel.com>

On Tue, Mar 28, 2023 at 04:01:49PM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   a6faf7ea9fcb7267d06116d4188947f26e00e57e
> commit: 3b16f6268e660f15aed0bb97aefe87e893eb8882 [6577/7309] ARM: mach-virt: Select PMUv3 driver by default
> config: arm-randconfig-r024-20230326 (https://download.01.org/0day-ci/archive/20230328/202303281539.zzI4vpw1-lkp@intel.com/config)
> compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 67409911353323ca5edf2049ef0df54132fa1ca7)
> 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
>         # install arm cross compiling tool for clang build
>         # apt-get install binutils-arm-linux-gnueabi
>         # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=3b16f6268e660f15aed0bb97aefe87e893eb8882
>         git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
>         git fetch --no-tags linux-next master
>         git checkout 3b16f6268e660f15aed0bb97aefe87e893eb8882
>         # save the config file
>         mkdir build_dir && cp config build_dir/.config
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm olddefconfig
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/perf/
> 
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@intel.com>
> | Link: https://lore.kernel.org/oe-kbuild-all/202303281539.zzI4vpw1-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
> >> drivers/perf/arm_pmuv3.c:44:2: error: use of undeclared identifier 'PERF_MAP_ALL_UNSUPPORTED'
>            PERF_MAP_ALL_UNSUPPORTED,
>            ^
> >> drivers/perf/arm_pmuv3.c:59:2: error: use of undeclared identifier 'PERF_CACHE_MAP_ALL_UNSUPPORTED'
>            PERF_CACHE_MAP_ALL_UNSUPPORTED,
>            ^

I think the Kconfig warning is relevant here:

> Kconfig warnings: (for reference only)
>    WARNING: unmet direct dependencies detected for ARM_PMUV3
>    Depends on [n]: PERF_EVENTS [=y] && HW_PERF_EVENTS [=n] && (ARM [=y] && CPU_V7 [=y] || ARM64)
>    Selected by [y]:
>    - ARCH_VIRT [=y] && ARCH_MULTI_V7 [=y] && PERF_EVENTS [=y]

Since we're selecting an option which has its own dependencies. I think
the easiest bet is to invert the linkage so that PMUV3 has a dependency
on ARCH_VIRT for 32-bit Arm (diff below).

Marc, Zaid -- what do you think?

Cheers,

Will

--->8

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index a5e5c0b09ff2..e24a9820e12f 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -401,7 +401,6 @@ config ARCH_VIRT
        select ARM_GIC_V3
        select ARM_GIC_V3_ITS if PCI
        select ARM_PSCI
-       select ARM_PMUV3 if PERF_EVENTS
        select HAVE_ARM_ARCH_TIMER
 
 config ARCH_AIROHA
diff --git a/drivers/perf/Kconfig b/drivers/perf/Kconfig
index 711f82400086..cf1559581fbc 100644
--- a/drivers/perf/Kconfig
+++ b/drivers/perf/Kconfig
@@ -103,7 +103,7 @@ config ARM_SMMU_V3_PMU
 config ARM_PMUV3
        depends on HW_PERF_EVENTS && ((ARM && CPU_V7) || ARM64)
        bool "ARM PMUv3 support" if !ARM64
-       default ARM64
+       default ARM64 || (ARM && ARCH_VIRT)
          help
          Say y if you want to use the ARM performance monitor unit (PMU)
          version 3. The PMUv3 is the CPU performance monitors on ARMv8



  reply	other threads:[~2023-03-28 12:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-28  8:01 kernel test robot
2023-03-28 12:21 ` Will Deacon [this message]
2023-03-28 15:14   ` Zaid Al-Bassam
2023-03-28 15:29   ` Arnd Bergmann
2023-03-28 15:35     ` Marc Zyngier
2023-03-28 16:37       ` Zaid Al-Bassam
2023-03-28 17:51         ` Will Deacon
2023-03-28 15:42   ` Marc Zyngier

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=20230328122138.GA1275@willie-the-truck \
    --to=will@kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=marc.zyngier@arm.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=zalbassam@google.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