From patchwork Wed Nov 17 14:48:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 12692927 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 A3F97C433F5 for ; Wed, 17 Nov 2021 14:57:14 +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 6568961B29 for ; Wed, 17 Nov 2021 14:57:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6568961B29 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=PQ4qUf61SMOBYVgvTKaMkAXDX4tv+CcaWf4pZNuEilk=; b=yWbsByOCKfXrT9 Q5FwXMxAb2owWzbKcLR2yexbUBXRTUbPxekHl4zXiAyHfF21V7RCEb423MBhxOkSuso5iIZmZSTSk 3XNAxeZyiQUxj7PCVkzN6EdHIn+i59HF7FjkKwCdDUq7ywz4NkW4PoD6pyQo+nV96fPSG+HXLtfxy GqHSKu/P+zUXYB/Xl4s/TXP4SsDIxX1SbAvMFM3h4Ej+zSy9aIFKLngh9BnlaA3CrwIhIxEBHGU/i wt1K/YTnAqiaYBlV+G6kYWXSRq3uvfCBKXi/xJuCvbgMa+X2V25S5bBbNB1Isq4LMW9yMgjSyV8WE idXyKYZJLeo4tToSsAag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mnMLZ-005FvC-2q; Wed, 17 Nov 2021 14:55:37 +0000 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mnMIg-005Eht-Dy for linux-arm-kernel@lists.infradead.org; Wed, 17 Nov 2021 14:52:40 +0000 Received: by mail-ed1-x52c.google.com with SMTP id g14so12415195edz.2 for ; Wed, 17 Nov 2021 06:52:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nbFF/7gtUy+99k8e1NtB2gMx+MTF8Q65aibKnryEXnE=; b=xBUaFM2qmdQljE9TB00BFnFwIarIPq6wrlAQZG0rfdHNpQ35r8lFwuxJSea9OQ1FAY 6uOwGhPHwdiIxrb2/43B2IdIBdWfGZ5iwyUm5ew6s0lV1H2As1kK6xn7AT482vJFjH8b GmcyzUZB30sJ5tnwdUvHqZzFMQ44ASQ5vFPmF43Ic/0fw2YnU7jspNxHkoEJpSd0yuk8 R5i9IjjO1VKftdJtVN3ohcqhdyJ5rLFw+Qb1rK8G6h3CosmV921I6zEPVVNRrU4//yUB AfJxC/bL6OmVhKaYE76R8vz0UYSiJ4WOt+rv1jYJmHjo0M2kwfIXVywFBHBGrFwVP9cJ p8lQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nbFF/7gtUy+99k8e1NtB2gMx+MTF8Q65aibKnryEXnE=; b=ryTspbevnfCyOvnigHoU80vbUs+eNFeAuoAosY/bre6aqcUKlYAcKUUenPmSHXt+8l xOJDB7YfKQ134ne6PdBe1zXLPwZHvxfQ86KrpC0lTkDgRybHD6ovYQaxjrX4qfiCQeIA 08x+hGQ/tfRTLKTH1XQk8o9KJGmBpjbTL1A++kYiZbV/+V91dveeXOk3WEugOQFl9Bbn kNkMNvxo0OxW7GRSCtMXRD5fcYjMemlCG6VuaMUhngz2r40HHnsJPNvecPobU+3Dcqye ffXSwJM52K16wRZhdAOajOIiJpSkJpsVjF5p3AyWYh+UqTtLEtVdRDDs9X6gYZB5kmTP oXIQ== X-Gm-Message-State: AOAM533zghq5nxO1Z6c+s8XbhObRgS2bBOfRbF87kEgQxUWilNpl4iGC yN0u4OYqXQ4TsvxBItmuOuRsAQ== X-Google-Smtp-Source: ABdhPJzaluFCdabwVapcVv+el0UpwvCLsJJrI7V1vzIb9r6w8HWWT7EJru/5Eoh/o49qPUxpbXIpUw== X-Received: by 2002:a17:906:b50:: with SMTP id v16mr22778059ejg.384.1637160756247; Wed, 17 Nov 2021 06:52:36 -0800 (PST) Received: from localhost.localdomain (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id gs15sm63917ejc.42.2021.11.17.06.52.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Nov 2021 06:52:35 -0800 (PST) From: Jean-Philippe Brucker To: robh+dt@kernel.org Cc: iommu@lists.linux-foundation.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, will@kernel.org, robin.murphy@arm.com, joro@8bytes.org, mark.rutland@arm.com, jkchen@linux.alibaba.com, leo.yan@linaro.org, uchida.jun@socionext.com, Jean-Philippe Brucker Subject: [PATCH v2 0/3] perf/smmuv3: Support devicetree Date: Wed, 17 Nov 2021 14:48:42 +0000 Message-Id: <20211117144844.241072-1-jean-philippe@linaro.org> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211117_065238_554893_DD687222 X-CRM114-Status: UNSURE ( 9.84 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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). Since v1 [1]: * Fixed warnings in the binding doc * Removed hip08 support * Merged Robin's version. I took the liberty of splitting the driver patch into 2 and 3. One fix in patch 3, and whitespace changes (the driver uses spaces instead of tabs to align #define values, which I was going to fix but actually seems more common across the tree.) [1] https://lore.kernel.org/linux-iommu/20211116113536.69758-1-jean-philippe@linaro.org/ Jean-Philippe Brucker (2): dt-bindings: Add Arm SMMUv3 PMCG binding perf/smmuv3: Add devicetree support Robin Murphy (1): perf/smmuv3: Synthesize IIDR from CoreSight ID registers .../bindings/perf/arm,smmu-v3-pmcg.yaml | 70 +++++++++++++++++++ drivers/perf/arm_smmuv3_pmu.c | 66 ++++++++++++++++- 2 files changed, 134 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/perf/arm,smmu-v3-pmcg.yaml