Received: by 2002:a05:7412:bb8d:b0:d7:7d3a:4fe2 with SMTP id js13csp1995862rdb; Thu, 17 Aug 2023 07:58:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGqCrRGaOJN3hsV4oAHc789IeW9cK/avq6YewkMSU//WmeTClRF3gtm/OjPfXLUEjC3WoRI X-Received: by 2002:a17:90b:1183:b0:26d:1f3d:6e85 with SMTP id gk3-20020a17090b118300b0026d1f3d6e85mr1598554pjb.37.1692284311157; Thu, 17 Aug 2023 07:58:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692284311; cv=none; d=google.com; s=arc-20160816; b=C33vA06lpzMDztqlobCP7m6NbAdP2ffirK/oXDvJ6O7rrJxf8dYZTU1v0xt7ckEPYG Fk55foOGodywS1wUZ6VRlbu4UPGjWsM5GcPcIr673JdHE1o9UQSh79pxpor6uqxV2+p0 GETiu1Ukw8M1ajCC+rtlMsDAGfjj3R5C/d9n7xsOY7DtQ6KJMeINdjJHMnQnks0DfTNG Lp73HPTve6t0yzJpVokKfxDOOS7z5PjscOtgq3V6DUC+UyQv1a8889SAZRVw/xrHC4W/ D660Q2UA5dxhU2N2tVvSnx51jjtMjyJNs7tTRruzqPCVDwv3t14xnQKGFpPGygc5Mx0q sLBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=U3mZqFiC+KY+lhqMzaUV37iKh8vXscO6vFjLLr58h88=; fh=cwfBY/Zp+GzAY9h2syDUJsLvKypKR5ZCxhPVh0zgoJo=; b=XgORgqv1kmTuU9x1mvi3fjcJZf2PIyknJswDXUp33nyuPomJQTNHM6nclIe3B1cK3A zbHGtKs174jzSeK9POzqywce/PxtKO6xDdCXcXOGQlLQsqUhjYuQQz67fpmtngAz1jFC yd262FaU+FABGL/w068r6Ds4CwVlDu6pzzAi+kGg8s2XJtPMMJqAoXC4P2uYeJzkPhac v2eNUEnj9GyEVn+3MWI6zvte0SMWQaTuvK8sMUMbtrHhvyH/8Kyqh9yk/FKnjTeH/vB7 +o6w227QtOcRwOZJ6XjI9SRyc55WmXcGxLlABia/tPIz/6CEjXGjQrdngo9wxGTUU1gP P9pw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cv4-20020a17090afd0400b002680e08a877si1563844pjb.186.2023.08.17.07.58.17; Thu, 17 Aug 2023 07:58:31 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244422AbjHPLYH (ORCPT + 99 others); Wed, 16 Aug 2023 07:24:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244405AbjHPLXo (ORCPT ); Wed, 16 Aug 2023 07:23:44 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1F5822123 for ; Wed, 16 Aug 2023 04:23:43 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 123341063; Wed, 16 Aug 2023 04:24:24 -0700 (PDT) Received: from [10.57.90.114] (unknown [10.57.90.114]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 62AD13F762; Wed, 16 Aug 2023 04:23:41 -0700 (PDT) Message-ID: <2e076cb5-1e31-10b2-9f33-79a825ac9c11@arm.com> Date: Wed, 16 Aug 2023 12:23:30 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: Re: [PATCH] perf: ARM_SMMU_V3_PMU should depend on ARM_SMMU_V3 Content-Language: en-GB To: Geert Uytterhoeven , Will Deacon , Mark Rutland Cc: Jean-Philippe Brucker , Vincent Whitchurch , Joerg Roedel , linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org References: <0f8ac07472f4161c71247742acb2303f9cf91396.1692113438.git.geert+renesas@glider.be> From: Robin Murphy In-Reply-To: <0f8ac07472f4161c71247742acb2303f9cf91396.1692113438.git.geert+renesas@glider.be> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=ham 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: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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