Message ID | 0f8ac07472f4161c71247742acb2303f9cf91396.1692113438.git.geert+renesas@glider.be |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:3f2:4152:657d with SMTP id x8csp1023970vqo; Wed, 16 Aug 2023 04:01:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHa/KcLMTOYiUjUdLnG83qdwSD/8QFwW3AhBlmuRSct03DVw2bF/nKMcnAVwYJZPzcjAu7m X-Received: by 2002:a05:6a00:188e:b0:680:98c:c593 with SMTP id x14-20020a056a00188e00b00680098cc593mr1943531pfh.7.1692183701750; Wed, 16 Aug 2023 04:01:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692183701; cv=none; d=google.com; s=arc-20160816; b=BoUjnTUaFjpL6Qdf3H1oKc3PTKZzz+Xf0BonXZgCW0QWvoTJbu8n9hA8Pp4XF5VPEI KB2Uah9zKlITgMpm1t8tS8+98t8sR5Nna6slltdblSIBq0eqhmH1nGa6nR/eCJeLBmBO l2cIZurI4B3gGaW5ls20h3l6HbyWDRB92ahp+q6EBbrrT2OGU3BAT5W4ShU8eyp7CruF 8FVkt7wc4SlXrX+kiT6O5Hvw+fc/XDPAgNbiUwGbViWtS2HIUoR2bhAPsE281gzW3Ukc Ode+fw0Szk4nQdKc2pZ1kzQ2YQ3d5uGWYBjuSaftD3b56muvwFD0h2HA/XmPHZlOWX0Q xxUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=EMzF6Bi2HRZf9K8ttTRHE9jMbRoQoOm6yPgD+dJh3bE=; fh=ynTzLAk+v9CzFUr7FGJanjUb/SrFaUBakUgC2loHyTU=; b=sN76rYpLvqHQ8UGa0/XSDldpLRggzj/mSPmpWk3dzArAR78Fa9yRe4lzTi4hLV+2vL gznGVd/1E/w5NcN+i2nJ441zrsYHlvVljuCqUGHHiZwN2fRNU4a3cAlPGVgPo2uKyVdj 9tzXIC6D2ilw9u2EJSPDlRMY9gH7+OifJ34SCyYtcZeDAA+kvcxJQVWn9bOkN92qYK8a eor/HGM6gKwaDmOQq1FAS2NuIZpLK7Sl6oexdgGXS7zM2IWVXQZg+0vKBcYWxWAEWB8k 6kAAQDocbC+1mxSmeWDT0BoU0Q/CfqAxs/b1DTrWxFPJ9Bpa4QuqxiVNSo7pOaMlcYQN WLSw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z11-20020a6552cb000000b00565db28129csi2571156pgp.201.2023.08.16.04.01.18; Wed, 16 Aug 2023 04:01:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238130AbjHOPhP (ORCPT <rfc822;274620705z@gmail.com> + 99 others); Tue, 15 Aug 2023 11:37:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238195AbjHOPhK (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 15 Aug 2023 11:37:10 -0400 Received: from andre.telenet-ops.be (andre.telenet-ops.be [IPv6:2a02:1800:120:4::f00:15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45A211BC5 for <linux-kernel@vger.kernel.org>; Tue, 15 Aug 2023 08:36:55 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:5d0c:f209:12a7:4ce5]) by andre.telenet-ops.be with bizsmtp id Zrcs2A00345ualL01rcstv; Tue, 15 Aug 2023 17:36:53 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from <geert@linux-m68k.org>) id 1qVw69-000j8S-IT; Tue, 15 Aug 2023 17:36:52 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from <geert@linux-m68k.org>) id 1qVw6F-005cq2-RQ; Tue, 15 Aug 2023 17:36:51 +0200 From: Geert Uytterhoeven <geert+renesas@glider.be> To: Will Deacon <will@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Robin Murphy <robin.murphy@arm.com> Cc: Jean-Philippe Brucker <jean-philippe@linaro.org>, Vincent Whitchurch <vincent.whitchurch@axis.com>, Joerg Roedel <joro@8bytes.org>, linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org, Geert Uytterhoeven <geert+renesas@glider.be> Subject: [PATCH] perf: ARM_SMMU_V3_PMU should depend on ARM_SMMU_V3 Date: Tue, 15 Aug 2023 17:36:50 +0200 Message-Id: <0f8ac07472f4161c71247742acb2303f9cf91396.1692113438.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1774383217291364724 X-GMAIL-MSGID: 1774383217291364724 |
Series |
perf: ARM_SMMU_V3_PMU should depend on ARM_SMMU_V3
|
|
Commit Message
Geert Uytterhoeven
Aug. 15, 2023, 3:36 p.m. UTC
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(-)
Comments
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
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
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