From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D308C433EF for ; Tue, 16 Nov 2021 12:04:32 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1F07E61A7D for ; Tue, 16 Nov 2021 12:04:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1F07E61A7D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GIpRM1MNDpQAZ5lyP8SmuepEcOYw5Zb+rLykgeZAeFQ=; b=AyDhWPOHKRZR+g zWsfXHXOkTWcort7vxJc23VwLgcO2B+R/rtF9gebjpUDuX/oRM6iBEWmow8hnS6QYe3uErdEOIH1c wu22h4OgDK4oRsk5eJPXQdzrvl/a/f402TZcMxxOaAvHSPc+mmUnF/yy1EmKFgz8BJFEcny/1lmwN zO8xRP60l6bvtsZMV+xM3sAL1T+8STnnkpAkOkGr+bjKUvGTzF4upmr8uJniRG8iEarDklpAQ0pwL rScLyDbs4GLYxHW3pTE1NuZs2wHPBA9lOjYvrMjL5totMomP2pymKxkZNrUzcr1K/inmZv/rMwjAz ni7CwBj7ULWt+Iwq/BwA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mmxB8-001dBn-Na; Tue, 16 Nov 2021 12:03:11 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mmxAx-001d8z-D6 for linux-arm-kernel@lists.infradead.org; Tue, 16 Nov 2021 12:03:01 +0000 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 6EDE11FB; Tue, 16 Nov 2021 04:02:57 -0800 (PST) Received: from [10.57.82.45] (unknown [10.57.82.45]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A58CC3F5A1; Tue, 16 Nov 2021 04:02:55 -0800 (PST) Message-ID: <3b5cb536-5a11-5096-4369-cec3d369ec52@arm.com> Date: Tue, 16 Nov 2021 12:02:47 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: [PATCH 0/2] perf/smmuv3: Support devicetree Content-Language: en-GB To: Jean-Philippe Brucker , robh+dt@kernel.org Cc: iommu@lists.linux-foundation.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, will@kernel.org, joro@8bytes.org, mark.rutland@arm.com, jkchen@linux.alibaba.com, leo.yan@linaro.org, uchida.jun@socionext.com References: <20211116113536.69758-1-jean-philippe@linaro.org> From: Robin Murphy In-Reply-To: <20211116113536.69758-1-jean-philippe@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211116_040259_552072_9A9CCFAD X-CRM114-Status: GOOD ( 16.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2021-11-16 11:35, Jean-Philippe Brucker wrote: > Add devicetree binding for the SMMUv3 PMU, called Performance Monitoring > Counter Group (PMCG) in the spec. Each SMMUv3 implementation can have > multiple independent PMCGs, for example one for the Translation Control > Unit (TCU) and one per Translation Buffer Unit (TBU). > > I previously sent the binding as reply to Jay Chen's thread implementing > device tree support [1]. This posting addresses the comments from that > thread. Ha, I'd also resurrected this and was planning to post it at some point this week[0] - you should have said :) > Patch 1 adds two compatible strings. "arm,smmu-v3-pmcg" is common to all > PMCGs. "hisilicon,smmu-v3-pmcg-hip08" allows to support the same quirk > as IORT for that implementation (see patch 2). We'll probably want to > also introduce compatible strings for each implementation that has > additional perf events. For example the MMU-600 implementation has > different events for TCU and TBU PMCGs [2], but both components have the > same device IDs. So the driver could differentiate them if they had two > distinct compatible strings such as "arm,mmu-600-pmcg-tbu" and > "arm,mmu-600-pmcg-tcu". Actually it only needs a general MMU-600 compatible, since once you know it's an Arm Ltd. implementation, you can assume the pattern for the IMP_DEF ID registers to figure out the rest. Robin. [0] https://gitlab.arm.com/linux-arm/linux-rm/-/commits/smmu-pmcg > The series doesn't deal with this because for testing I use a software > model which only implements architected events. I do not include DTS > change for that platform because enabling PMCGs requires an additional > model option. See my branch smmu/pmu-dt [3] for details. > > [1] https://lore.kernel.org/all/20200707150114.GC159413@myrica/ > [2] https://developer.arm.com/documentation/100310/0202/Functional-description/Operation/Performance-Monitoring-Unit > [3] https://jpbrucker.net/git/linux/log/?h=smmu/pmu-dt > > Jean-Philippe Brucker (2): > dt-bindings: Add Arm SMMUv3 PMCG binding > perf/smmuv3: Add devicetree support > > .../bindings/iommu/arm,smmu-v3-pmcg.yaml | 67 +++++++++++++++++++ > drivers/perf/arm_smmuv3_pmu.c | 25 ++++++- > 2 files changed, 90 insertions(+), 2 deletions(-) > create mode 100644 Documentation/devicetree/bindings/iommu/arm,smmu-v3-pmcg.yaml > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel