Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1417137ybk; Thu, 21 May 2020 06:28:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcYc1077K3pPBWnbK7zdPZx9L/Nq4Ia2gjQJlpvuoPOb2yCc5SxJYOiQD/Aq5NONfop2wi X-Received: by 2002:a50:f40d:: with SMTP id r13mr7414183edm.93.1590067732713; Thu, 21 May 2020 06:28:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590067732; cv=none; d=google.com; s=arc-20160816; b=aAOJz2zFKiyyCiBJnDwbIb2fPtgQOZ4fa1x5DNCq7L2KMjmNLrvN8aLhjRUVY0RiYR 2VSkKUhUaNOFp5gx7AB2HlLG47B4bHJVY4gBaREx0t7scGdqdgwYtDZWHV0WPwcmXjMB yjlFJNprIQYBg6UVMlox/ayN5eyKKj06F9xbwZHOWWTyh4fIfxz4XaTYnq/PfeNd8/hW HEtI5gc1wB5iyyxo+uUgPFcven41YIQ9AKBDA1mToNHdMkyY6igHSFce2efg1QmjjMeR Q5mZVDfnnP+3xt+KAJtWMLhez7j12ln3fXDJUx1DdiJ0sGaG5fDTOnii0biCDL0h/TIh GLxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=rhmdtyYcqk5Qpl/LyFbE7RQZTW2DG1DDwlwjgHc7GpU=; b=R9/+KyC6Ux0buiINP8hPhXcmqRkPONyrnOLlVLraMuZY81eAXLkBAU5nQihN3sjd6l 1+jMkR7hMr0mb7l/m/hrAWnDbcC7bCjy4JZ2EVynAtxAZlDjbKnhMXPlHaHBc+DruVJj 2Nf+OTSG6GSB8OIE4m0M+PCQrGvB/y49WmUBHVWXJ8hadeq4y1K/Ss3CU+Blo4RJb2Ck eOVMhEJcYNtLQD2DrVVBihkFCYJEpbJJVi6NvCwjXRS+x2RPQdckLi0OBu/Qn1Q3X1sZ uEB7QalrbVkwGkdD8Lw0gS69cxCcGTBBQLp/bjUyN9/JL5zFPKYQqG79GiPCo32EmUqz Lx8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id re2si3310329ejb.644.2020.05.21.06.28.29; Thu, 21 May 2020 06:28:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729413AbgEUN0q (ORCPT + 99 others); Thu, 21 May 2020 09:26:46 -0400 Received: from foss.arm.com ([217.140.110.172]:46778 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729197AbgEUN0q (ORCPT ); Thu, 21 May 2020 09:26:46 -0400 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 A3B24D6E; Thu, 21 May 2020 06:26:45 -0700 (PDT) Received: from C02TD0UTHF1T.local (unknown [10.57.2.89]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 169BB3F305; Thu, 21 May 2020 06:26:43 -0700 (PDT) Date: Thu, 21 May 2020 14:26:41 +0100 From: Mark Rutland To: Will Deacon Cc: Rob Herring , Joakim Zhang , john.garry@huawei.com, shawnguo@kernel.org, linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V1 RESEND 1/3] perf/imx_ddr: Add system PMU identifier for userspace Message-ID: <20200521132641.GB47848@C02TD0UTHF1T.local> References: <20200512073115.14177-1-qiangqing.zhang@nxp.com> <20200512073115.14177-2-qiangqing.zhang@nxp.com> <20200519185125.GB453195@bogus> <20200520073304.GA23534@willie-the-truck> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200520073304.GA23534@willie-the-truck> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 20, 2020 at 08:33:04AM +0100, Will Deacon wrote: > On Tue, May 19, 2020 at 12:51:25PM -0600, Rob Herring wrote: > > On Tue, May 12, 2020 at 03:31:13PM +0800, Joakim Zhang wrote: > > > +static ssize_t ddr_perf_identifier_show(struct device *dev, > > > + struct device_attribute *attr, > > > + char *page) > > > +{ > > > + struct ddr_pmu *pmu = dev_get_drvdata(dev); > > > + > > > + return sprintf(page, "%s\n", pmu->devtype_data->identifier); > > > > Why do we need yet another way to identify the SoC from userspace? > > I also really dislike this. What's the preferred way to identify the SoC > from userspace? It's needed so that the perf userspace tool can describe > perf events that are supported for the PMU, as this isn't probe-able > directly from the hardware. We have the same issue with the SMMUv3 PMCG [1], > and so we need to solve the problem for both DT and ACPI. Worth noting that while in this case it happens to identify the SoC, in general you can have distinct instances of system IP in a single system, so I do think that we need *something* instance-specific, even if that's combined with SoC info. Where IP gets reused across SoCs, it makes sense for that to not depend on top-level SoC info. Thanks, Mark. > > Will > > [1] https://lore.kernel.org/r/1587120634-19666-1-git-send-email-john.garry@huawei.com