Skip to contentSkip to conversation

ARM: mach-virt: fix PMUv3 dependendency

PATCH In review Arnd Bergmann 2 participants 2 messages Mar 28, 2023 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: mach-virt: fix PMUv3 dependendency

From: Arnd Bergmann <[email protected]>

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")
---
 arch/arm/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/Kconfig +1 -1
index e8ccacb3653b..700458c7cace 100644
@@ -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
Signature · 1 line
2.39.2
#1 lore raw

Hi Arnd,

Quoted 30 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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")
---
 arch/arm/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/Kconfig +0 -0
index e8ccacb3653b..700458c7cace 100644

arch/arm/Kconfig config ARCH_VIRT · line 401

Quoted 6 lines
arch/arm/Kconfig +1 -1
@@ -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

We're discussing this one over at:

https://lore.kernel.org/r/[email protected]

I'm leaning towards dropping the 'select' altogether.

Will

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel