* [PATCH] perf: ARM_SMMU_V3_PMU should depend on ARM_SMMU_V3
@ 2023-08-15 15:36 Geert Uytterhoeven
2023-08-16 11:23 ` Robin Murphy
0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2023-08-15 15:36 UTC (permalink / raw)
To: Will Deacon, Mark Rutland, Robin Murphy
Cc: Jean-Philippe Brucker, Vincent Whitchurch, Joerg Roedel,
linux-arm-kernel, iommu, linux-kernel, Geert Uytterhoeven
There is no point in monitoring transactions passing through the SMMU
when ARM Ltd. System MMU Version 3 (SMMUv3) Support is disabled.
Hence replace the dependency on ARM64 by a dependency on ARM_SMMU_V3
(which implies the former).
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
This caught my eye after commit 7c3f204e544dfa37 ("perf/smmuv3: Remove
build dependency on ACPI") in arm64/for-next/core.
Perhaps my understanding is wrong? Is there anything to monitor when
ARM_SMMU_V3=n?
drivers/perf/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/perf/Kconfig b/drivers/perf/Kconfig
index 273d67ecf6d2530f..c33324692fbf0141 100644
--- a/drivers/perf/Kconfig
+++ b/drivers/perf/Kconfig
@@ -92,7 +92,7 @@ config ARM_PMU_ACPI
config ARM_SMMU_V3_PMU
tristate "ARM SMMUv3 Performance Monitors Extension"
- depends on ARM64 || (COMPILE_TEST && 64BIT)
+ depends on ARM_SMMU_V3 || (COMPILE_TEST && 64BIT)
depends on GENERIC_MSI_IRQ
help
Provides support for the ARM SMMUv3 Performance Monitor Counter
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] perf: ARM_SMMU_V3_PMU should depend on ARM_SMMU_V3
2023-08-15 15:36 [PATCH] perf: ARM_SMMU_V3_PMU should depend on ARM_SMMU_V3 Geert Uytterhoeven
@ 2023-08-16 11:23 ` Robin Murphy
2023-08-16 11:36 ` Geert Uytterhoeven
0 siblings, 1 reply; 3+ messages in thread
From: Robin Murphy @ 2023-08-16 11:23 UTC (permalink / raw)
To: Geert Uytterhoeven, Will Deacon, Mark Rutland
Cc: Jean-Philippe Brucker, Vincent Whitchurch, Joerg Roedel,
linux-arm-kernel, iommu, linux-kernel
On 2023-08-15 16:36, Geert Uytterhoeven wrote:
> There is no point in monitoring transactions passing through the SMMU
> when ARM Ltd. System MMU Version 3 (SMMUv3) Support is disabled.
> Hence replace the dependency on ARM64 by a dependency on ARM_SMMU_V3
> (which implies the former).
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> This caught my eye after commit 7c3f204e544dfa37 ("perf/smmuv3: Remove
> build dependency on ACPI") in arm64/for-next/core.
>
> Perhaps my understanding is wrong? Is there anything to monitor when
> ARM_SMMU_V3=n?
Yes, at least TBU event 1 still counts bypass transactions even when the
SMMU is disabled, so PMCGs can be useful as basic traffic monitors in
their own right. Plus the original design intent was that PMCGs may also
be implemented by other things that interact with the SMMU, like
ATS-capable PCIe root complexes, or devices with their own internal
TLBs, thus they could potentially count any manner of
implementation-defined events that aren't necessarily related to SMMU
translation.
Thanks,
Robin.
> drivers/perf/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/perf/Kconfig b/drivers/perf/Kconfig
> index 273d67ecf6d2530f..c33324692fbf0141 100644
> --- a/drivers/perf/Kconfig
> +++ b/drivers/perf/Kconfig
> @@ -92,7 +92,7 @@ config ARM_PMU_ACPI
>
> config ARM_SMMU_V3_PMU
> tristate "ARM SMMUv3 Performance Monitors Extension"
> - depends on ARM64 || (COMPILE_TEST && 64BIT)
> + depends on ARM_SMMU_V3 || (COMPILE_TEST && 64BIT)
> depends on GENERIC_MSI_IRQ
> help
> Provides support for the ARM SMMUv3 Performance Monitor Counter
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] perf: ARM_SMMU_V3_PMU should depend on ARM_SMMU_V3
2023-08-16 11:23 ` Robin Murphy
@ 2023-08-16 11:36 ` Geert Uytterhoeven
0 siblings, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2023-08-16 11:36 UTC (permalink / raw)
To: Robin Murphy
Cc: Will Deacon, Mark Rutland, Jean-Philippe Brucker,
Vincent Whitchurch, Joerg Roedel, linux-arm-kernel, iommu,
linux-kernel
Hi Robin,
On Wed, Aug 16, 2023 at 1:23 PM Robin Murphy <robin.murphy@arm.com> wrote:
> On 2023-08-15 16:36, Geert Uytterhoeven wrote:
> > There is no point in monitoring transactions passing through the SMMU
> > when ARM Ltd. System MMU Version 3 (SMMUv3) Support is disabled.
> > Hence replace the dependency on ARM64 by a dependency on ARM_SMMU_V3
> > (which implies the former).
> >
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > ---
> > This caught my eye after commit 7c3f204e544dfa37 ("perf/smmuv3: Remove
> > build dependency on ACPI") in arm64/for-next/core.
> >
> > Perhaps my understanding is wrong? Is there anything to monitor when
> > ARM_SMMU_V3=n?
>
> Yes, at least TBU event 1 still counts bypass transactions even when the
> SMMU is disabled, so PMCGs can be useful as basic traffic monitors in
> their own right. Plus the original design intent was that PMCGs may also
> be implemented by other things that interact with the SMMU, like
> ATS-capable PCIe root complexes, or devices with their own internal
> TLBs, thus they could potentially count any manner of
> implementation-defined events that aren't necessarily related to SMMU
> translation.
Thanks for the explanation!
Hereby I withdraw my patch.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-08-16 11:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-15 15:36 [PATCH] perf: ARM_SMMU_V3_PMU should depend on ARM_SMMU_V3 Geert Uytterhoeven
2023-08-16 11:23 ` Robin Murphy
2023-08-16 11:36 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®