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 X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BE72C433DF for ; Mon, 13 Jul 2020 23:26:34 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 3910E20DD4 for ; Mon, 13 Jul 2020 23:26:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="zve6ny/0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3910E20DD4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=NTJheyqvVgc0t+o4uvVKTGniAi+gXU2V68sSNGdpTq0=; b=zve6ny/0+S+NXgj194GgyNeyL ByL0TTh4lvSSkK1R8FgopcOKy+c/RC4gOECsNy0Om2id12SNsQMUmopbWx8vPKWB8vfthB9j79eGU Bd36LGINhc2HhfxeMPm8um+D9jVCXQcJGfHdfpCGwPuEpeaWKrGdHQxNjhkz+5mzfHKDrf2D1gjq2 niEb3f+eBF8Io4XawNJxsPcfpgCn0sbJBpwbiv1fJl1OSG+a3KWUHuYrNmKeuzVXjhOr5B1OKcbl+ GynHsKUjNUmgJmIasdf1L2sn+ZupoEhBaz6yhbwU/utLIwupLKVPjVaxa08KipYhjvNFDpi0dW+W8 F4ZBvgPlw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jv7or-0006f0-6z; Mon, 13 Jul 2020 23:25:09 +0000 Received: from mail-io1-f68.google.com ([209.85.166.68]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jv7on-0006ea-Ly for linux-arm-kernel@lists.infradead.org; Mon, 13 Jul 2020 23:25:06 +0000 Received: by mail-io1-f68.google.com with SMTP id i4so15353321iov.11 for ; Mon, 13 Jul 2020 16:25:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=285Eu3cQsPJJtnEaug3zhVLZ/kVLZdrDEO+/XflF/Ro=; b=hsW31q0sPlHdFBDx4occVxRSa7UH/rOndO6hWI068hME/4a+5p5W8b2zcTmUFMs7nv RxKj4/SCwXsDfSjZr13sgnBHR9PTR2CB46wbGRSy1inHx9AQIFC0PRec0Ldu4+6hKC0o 09G9wasUQ4xCFrXp/m7VO+N1+x0ZeCQPNO+sQxvw5mC8fqMoBsEL0rNx7c0RVrcEVdRI MHB9+6JtkCuknvzAFiZ8VqKxqovzP9orL4iMwH2KOro6V6oM4R2UykMfdx4gbCHcY0Y5 g8zuKKkyQwdYu0FcC4QofZ0phIp/aQ+JVk9lJK+kWj5PYFMmOrhh2cr8MlZRAo2OA7SX ReRw== X-Gm-Message-State: AOAM530rcWyDe0q9jMVt0Rr7F+Xed4gxccdGwdSlko6zeeze/i5PO5W/ fN5phlm1hyyjDRedizVINFuBy351Rw== X-Google-Smtp-Source: ABdhPJz+6PdFWejzxhDg5PKKQn4oV1Ti7BEAoYqD2t1nKjZCNnqBdwHeoEa/I30JXT7wx6VkiSOyOQ== X-Received: by 2002:a05:6638:dcf:: with SMTP id m15mr2889378jaj.86.1594682705228; Mon, 13 Jul 2020 16:25:05 -0700 (PDT) Received: from xps15 ([64.188.179.252]) by smtp.gmail.com with ESMTPSA id i9sm9363466ile.48.2020.07.13.16.25.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2020 16:25:04 -0700 (PDT) Received: (nullmailer pid 915136 invoked by uid 1000); Mon, 13 Jul 2020 23:25:03 -0000 Date: Mon, 13 Jul 2020 17:25:03 -0600 From: Rob Herring To: Jean-Philippe Brucker Subject: Re: [RFC PATCH v1 2/2] perf/smmuv3: To support the dts to get options Message-ID: <20200713232503.GB899100@bogus> References: <20200706112246.92220-1-jkchen@linux.alibaba.com> <20200706112246.92220-3-jkchen@linux.alibaba.com> <024231fc-cf6e-6785-5153-2e7f45496911@arm.com> <20200707150114.GC159413@myrica> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200707150114.GC159413@myrica> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200713_192505_790254_D3409482 X-CRM114-Status: GOOD ( 29.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, will@kernel.org, Robin Murphy , linux-arm-kernel@lists.infradead.org, Jay Chen Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jul 07, 2020 at 05:01:14PM +0200, Jean-Philippe Brucker wrote: > Hi, > > On Mon, Jul 06, 2020 at 04:03:34PM +0100, Robin Murphy wrote: > > On 2020-07-06 12:22, Jay Chen wrote: > > > For the smmuv3 pmu for support the dts to get the > > > options > > > > > > Signed-off-by: Jay Chen > [...] > > > +static const struct of_device_id smmu_pmu_of_match[] = { > > > + { .compatible = "arm-smmu-v3-pmcg", }, > > > > Please define the DT binding first. IIRC Jean-Philippe wrote some patches a > > while back that never got posted, but I suppose it should be YAML now... > > Yes, I've never followed through with that because it only supported the > RevC FastModel with non-default model parameters. I attached the binding I > currently have, converted to YAML. > > Thanks, > Jean > > >From b117e5b4ce96a5a8327333ab408cf61200850d4f Mon Sep 17 00:00:00 2001 > From: Jean-Philippe Brucker > Date: Tue, 7 Jul 2020 16:55:16 +0200 > Subject: [PATCH] dt-bindings: Add SMMUv3 PMCG binding > > Add binding for the SMMUv3 PMU. Each node represents a PMCG, and is placed > as a sibling node of the SMMU. As PMCGs are mainly implementation > defined there is no 1-1 relation between SMMU and PMCG. The SMMU could > have PMU counters for the TCU and each TBU, or a single PMCG. > > TODO: although the Linux implementation doesn't need them, it'd be nice > to have links from the PMCG node to its associated SMMU. IORT does offer > this (Node reference) and perhaps it could later help users figure out > which PMCG is which on systems with dozens of SMMU. Is the PMCG really a separate block or a new node is just convenient to instantiate a driver? > > Signed-off-by: Jean-Philippe Brucker > --- > .../bindings/iommu/arm,smmu-v3-pmcg.yaml | 58 +++++++++++++++++++ > 1 file changed, 58 insertions(+) > create mode 100644 Documentation/devicetree/bindings/iommu/arm,smmu-v3-pmcg.yaml > > diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu-v3-pmcg.yaml b/Documentation/devicetree/bindings/iommu/arm,smmu-v3-pmcg.yaml > new file mode 100644 > index 000000000000..23190a617e7e > --- /dev/null > +++ b/Documentation/devicetree/bindings/iommu/arm,smmu-v3-pmcg.yaml > @@ -0,0 +1,58 @@ > +# SPDX-License-Identifier: GPL-2.0-only Dual license new bindings. > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/iommu/arm,smmu-v3-pmcg.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: ARM SMMUv3 Performance Monitor Counter Group > + > +maintainers: > + - Will Deacon > + - Robin Murphy > + > +description: |+ > + An SMMUv3 may have several Performance Monitor Counter Group (PMCG). > + They are standalone performance monitoring units that support both > + architected and IMPLEMENTATION DEFINED event counters. > + > +properties: > + $nodename: > + pattern: "^smmu-pmcg@[0-9a-f]*" Should be generic: pmu@... (or whatever we've used for PMUs). > + compatible: > + const: arm,smmu-v3-pmcg This is correct, but doesn't match the driver. > + > + reg: > + minItems: 1 > + maxItems: 2 More than 1 entry needs a description of what each one is. A variable number of 'reg' entries generally implies more than 1 compatible unless the 2nd entry is optional. > + > + interrupts: > + maxItems: 1 > + > + msi-parent: true > + > +required: > + - compatible > + - reg > + > +additionalProperties: false > + > +examples: > + - |+ > + #include > + #include > + > + tcu: smmu-pmcg@2b420000 { Drop unused labels. > + compatible = "arm,smmu-v3-pmcg"; > + reg = <0 0x2b420000 0 0x1000>, > + <0 0x2b430000 0 0x1000>; > + interrupts = ; > + msi-parent = <&its 0xff0000>; > + }; > + > + tbu0: smmu-pmcg@2b440000 { > + compatible = "arm,smmu-v3-pmcg"; > + reg = <0 0x2b440000 0 0x1000>, > + <0 0x2b450000 0 0x1000>; > + interrupts = ; > + msi-parent = <&its 0xff0000>; > + }; > -- > 2.27.0 > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel