public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: Zaid Al-Bassam <zalbassam@google.com>,
	Marc Zyngier <maz@kernel.org>, Will Deacon <will@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Russell King <linux@armlinux.org.uk>,
	Linus Walleij <linus.walleij@linaro.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] ARM: mach-virt: fix PMUv3 dependendency
Date: Tue, 28 Mar 2023 16:43:44 +0200	[thread overview]
Message-ID: <20230328144405.1527555-1-arnd@kernel.org> (raw)

From: Arnd Bergmann <arnd@arndb.de>

Selecting a ARM_PMUV3 from a platform option breaks the build
when CONFIG_ARM_PMU is not already set:

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]

drivers/perf/arm_pmuv3.c:48:9: error: 'PERF_MAP_ALL_UNSUPPORTED' undeclared here (not in a function)
   48 |         PERF_MAP_ALL_UNSUPPORTED,
      |         ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/perf/arm_pmuv3.c:63:9: error: 'PERF_CACHE_MAP_ALL_UNSUPPORTED' undeclared here (not in a function)
   63 |         PERF_CACHE_MAP_ALL_UNSUPPORTED,
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/perf/arm_pmuv3.c:65:10: error: implicit declaration of function 'C' [-Werror=implicit-function-declaration]
   65 |         [C(L1D)][C(OP_READ)][C(RESULT_ACCESS)]  = ARMV8_PMUV3_PERFCTR_L1D_CACHE,

Fixes: 3b16f6268e66 ("ARM: mach-virt: Select PMUv3 driver by default")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index e8ccacb3653b..700458c7cace 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -397,7 +397,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 && ARM_PMU
 	select HAVE_ARM_ARCH_TIMER
 
 config ARCH_AIROHA
-- 
2.39.2


             reply	other threads:[~2023-03-28 14:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-28 14:43 Arnd Bergmann [this message]
2023-03-28 15:21 ` [PATCH] ARM: mach-virt: fix PMUv3 dependendency Will Deacon

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=20230328144405.1527555-1-arnd@kernel.org \
    --to=arnd@kernel.org \
    --cc=arnd@arndb.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=maz@kernel.org \
    --cc=will@kernel.org \
    --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