Re: [linux-next:master 6577/7309] drivers/perf/arm_pmuv3.c:44:2: error: use of undeclared identifier 'PERF_MAP_ALL_UNSUPPORTED'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Will,

First, Sorry I haven't noticed that missing dependency case. Your
change looks good to me, but to keep the driver/perf/Kconfig clean, I
was thinking of rather expanding the check at the arch level, i.e.:

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 6f0a2576d17f..a82765929f67 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -401,7 +401,7 @@ config ARCH_VIRT
        select ARM_GIC_V3
        select ARM_GIC_V3_ITS if PCI
        select ARM_PSCI
-       select ARM_PMUV3 if PERF_EVENTS
+       select ARM_PMUV3 if PERF_EVENTS && HW_PERF_EVENTS
        select HAVE_ARM_ARCH_TIMER

 config ARCH_AIROHA

What do you think? Marc, Any input? please!

Thank you,
Zaid

On Tue, Mar 28, 2023 at 8:21 AM Will Deacon <will@xxxxxxxxxx> wrote:
>
> 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@xxxxxxxxx/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@xxxxxxxxx>
> > | Link: https://lore.kernel.org/oe-kbuild-all/202303281539.zzI4vpw1-lkp@xxxxxxxxx/
> >
> > 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
>





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux