Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp3319268rdb; Thu, 16 Nov 2023 06:34:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IFGGJWyVUSMn90wI/qX+iIIhRvP9XyoJdZ3daI0F4TyQdeET3QorxOOEIb0ULMH+woMjUqn X-Received: by 2002:a05:6a20:8f28:b0:187:4e8c:ac5c with SMTP id b40-20020a056a208f2800b001874e8cac5cmr2935832pzk.1.1700145254291; Thu, 16 Nov 2023 06:34:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700145254; cv=none; d=google.com; s=arc-20160816; b=oG7EjcTHRmO58xy/zFdbT5LHKPozzWSqyQiVRnCRtVqeYSIMTIk5lw04H4X/fC2sf/ xpXU6aa9omBgsjusHjoKNUWPO7zFgfOJHXkW4VIFWfeeTRRptA763HsKV307ckM0YZDX RSMuPbY1ng/KD5gOuzE5urUqRJ35wYdLLrmHZUXx5kwNQqQ/d5NRmnwupNeEsHHw4tc9 NY8w26L7IJ1CDEKI3Z9YmO4c+OvVpXpOhi1dRojt0Ycgu/qB9vnvJnEyvFd2dkOOk/uX AbJ1PKKoQyfwiv4zXAvWfv30qxpXFl0xl7KHsmt6THEwFYnF7l5EAEQf8mHAO4HJjpZ6 /gVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ffo27gFlz45Yex/TXfywsbakIV8pzNAQc/X8J9IJrUI=; fh=bEieTEHd+SN/wg1xuHTOCDR/huK5fnPA0T+hJwfDAwA=; b=wZqIeUCu+fb8vAkQQRi993ZzHY7rrXcBgu1KZ2zkV6hVF2F/hSPps1x6AC3aRH0leO lrYnBE40qVhVWn3ZT5NIywik1NyrkJT+gzcLZlsqYJjo9csRZ3+evxOdU6QP6w2SBjAd 3T9yIqMJczh3vb03PyEnSOFgXQfJV8tH4nYdKEAa6rATwmQOe1Wh3rgy/dc+EmbnqJTN 7yTa69rBVOAktFOOFXjwcdlC55TYcqVqcSZtehxQhng7bkYkoyf1V9OF+G3vaQPn0HQI paPQTf4PVNXZOWj6vWlDAjr1QPq7nm+NiWmUOQPdV/Q3Mf5tI3PPc2nyTvMOArEn/U2o razg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=B+cMhHyn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id bs132-20020a63288a000000b005bdf5961588si12483085pgb.19.2023.11.16.06.34.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 06:34:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=B+cMhHyn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id DBF8E821A145; Thu, 16 Nov 2023 06:34:12 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233364AbjKPOeJ (ORCPT + 99 others); Thu, 16 Nov 2023 09:34:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233278AbjKPOeH (ORCPT ); Thu, 16 Nov 2023 09:34:07 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D773CAD for ; Thu, 16 Nov 2023 06:34:03 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5CF14C433C8; Thu, 16 Nov 2023 14:34:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700145243; bh=FiM5uoBP4dPLMB8pp4YAe7ANs6BDZ5GS+5pPKeBh66g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=B+cMhHynOBWDxN7MDjAB6t4bYMechNEoM4SnXHn3Z/93Jf0IThJwuyJ/YJ9yjP5HX 0l4CMw/zHNYifJ39j4Y//zETebY0hgdpLKxukD0dCZ0jftD3gYG2j6amc7EQBQB+zk nKkWVHB4ncjS71GvL0gte0cNnY8yESiiqTQPOzuqXwHkMfrCD40q7DEMxKLiC07S6f ulvILHl+g601D7tUNCtK3gMSfTfmF0X76uiqdrAsxkcrfJRKZtjq+Fnq0mK1sjDP8x UTHOU2jywHheXAnlZnFGdWFMUWUH+rmrS9wwVQYzY0WJQSOVtA7SvBQH8+oyFBF2mR j5OXv+qT6szkw== Date: Thu, 16 Nov 2023 14:34:00 +0000 From: Conor Dooley To: Ji Sheng Teoh Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, krzysztof.kozlowski+dt@linaro.org, leyfoon.tan@starfivetech.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, mark.rutland@arm.com, peterz@infradead.org, robh+dt@kernel.org, tglx@linutronix.de, will@kernel.org Subject: Re: [PATCH v3 2/2] dt-bindings: perf: starfive: Add StarLink PMU Message-ID: <20231116-penalize-turbojet-bf8ea2a9a2ad@squawk> References: <20231115-landing-earflap-ed11982ac610@squawk> <20231116021035.4043907-1-jisheng.teoh@starfivetech.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="vZUGkCs0d2KdwaC/" Content-Disposition: inline In-Reply-To: <20231116021035.4043907-1-jisheng.teoh@starfivetech.com> X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 16 Nov 2023 06:34:13 -0800 (PST) --vZUGkCs0d2KdwaC/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 16, 2023 at 10:10:35AM +0800, Ji Sheng Teoh wrote: > On Wed, 15 Nov 2023 20:03:53 +0000 > Conor Dooley wrote: > > On Wed, Nov 15, 2023 at 11:36:08AM +0800, Ji Sheng Teoh wrote: > > > Add device tree binding for StarFive's StarLink PMU (Performance > > > Monitor Unit). > > >=20 > > > Signed-off-by: Ji Sheng Teoh > > > --- > > > .../bindings/perf/starfive,starlink-pmu.yaml | 46 > > > +++++++++++++++++++ 1 file changed, 46 insertions(+) > > > create mode 100644 > > > Documentation/devicetree/bindings/perf/starfive,starlink-pmu.yaml > > >=20 > > > diff --git > > > a/Documentation/devicetree/bindings/perf/starfive,starlink-pmu.yaml > > > b/Documentation/devicetree/bindings/perf/starfive,starlink-pmu.yaml > > > new file mode 100644 index 000000000000..a9426a7faeae --- /dev/null > > > +++ > > > b/Documentation/devicetree/bindings/perf/starfive,starlink-pmu.yaml > > > =20 > >=20 > > btw, since you changed the compatible, the filename should have been > > changed to match it. >=20 > The intention to keep the filename generic is to allow addition of new > version of StarLink PMU in future if any, similar to what arm,cmn.yaml > is doing. Hope that makes sense. No, please keep the filename matching the compatible. Even if the filename contains "500", there's nothing stopping you from then adding other pmu variants. There are many many examples of this in the tree. > > > @@ -0,0 +1,46 @@ > > > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > > > +%YAML 1.2 > > > +--- > > > +$id: http://devicetree.org/schemas/perf/starfive,starlink-pmu.yaml# > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > > + > > > +title: StarFive StarLink PMU > > > + > > > +maintainers: > > > + - Ji Sheng Teoh > > > + > > > +description: > > > + StarFive's StarLink PMU integrates one or more CPU cores with a > > > shared L3 > > > + memory system. The PMU support overflow interrupt, up to 16 > > > programmable > > > + 64bit event counters, and an independent 64bit cycle counter. > > > + StarLink PMU is accessed via MMIO. > > > + > > > +properties: > > > + compatible: > > > + const: starfive,starlink-500-pmu =20 > >=20 > > So this is not what I had in mind by a "device". I was looking for a > > compatible representing an soc in which this IP had been integrated. > > A soc-specific compatible, rather than something generic, is > > requirement for devicetree - we don't want various integrations of > > this IP to all be using a generic compatible when there may be subtle > > (or less subtle) differences between integrations. > >=20 > > I'm trying to come up with the syntax for enforcing having two > > compatibles with your current one as the fallback, but I have yet to > > come up with the correct syntax for that that works correctly. > >=20 > > Hopefully by the time you get some feedback on the driver side of this > > submission I will have a concrete suggestion for what to do here. >=20 > Thanks Conor for the enlightenment. In the meantime, to fit the requireme= nt > I would suggest going for "starfive,jh8100-starlink-pmu", making it JH8100 > SOC specific if that makes sense. Okay, you could definitely do that! Cheers, Conor. --vZUGkCs0d2KdwaC/ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZVYoVgAKCRB4tDGHoIJi 0jrqAP9DgqOaWCgCUMw/6lyacLL6RmvNrLfL+z/IOcfGcjzDmQEA4+no0sYz9JiW dJwGk8nkps3Om/UUGm1tlKn4TdWBbgc= =BTKI -----END PGP SIGNATURE----- --vZUGkCs0d2KdwaC/--