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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 7DEF0CD11C2 for ; Wed, 10 Apr 2024 17:04:32 +0000 (UTC) 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:References:In-Reply-To: Message-ID:Subject:CC: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=+9X072XsIXeE4pHJh7NfOFpWmENt7zIOglZq/JVnRSQ=; b=zCgq5EB+Sbu+yU ID0mUSBGLIxtvXeI3vNjdNXHcQgvdZyGi/8V364Bg+73dVRdwlNGdSYdRWYWpjNyU0iunpdnGEHAu 3xbkrshEt22rlt9BT6BuULEoC4cwrdw5e53MiR+LDMwmRPBGXXZ/QZjGce2yijxyUduSl8jrjg1fl Q1MtgMFj2QaPLM88x/mTJ/A8o780SuToLKJR0JXFC4ZSKjSA79HM/GjKiDVWiesUOjvey+5Z/fatI aS2M8i4fOgI/1eqLFJmfR4k8sJaqSp/1il5p/A0xtklWGeUGrKzBF4eva5usxV8FpovxF92WFwxaX VqMx5aNq+pd/8WqkY+Hw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rubMx-000000089Ff-0Fq7; Wed, 10 Apr 2024 17:04:19 +0000 Received: from frasgout.his.huawei.com ([185.176.79.56]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rubMs-0000000899v-1WtP for linux-arm-kernel@lists.infradead.org; Wed, 10 Apr 2024 17:04:17 +0000 Received: from mail.maildlp.com (unknown [172.18.186.216]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4VF8Jc2Hbqz6JBTr; Thu, 11 Apr 2024 01:02:24 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id AA6751404FC; Thu, 11 Apr 2024 01:04:04 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 10 Apr 2024 18:04:04 +0100 Date: Wed, 10 Apr 2024 18:04:03 +0100 From: Jonathan Cameron To: Robin Murphy CC: , , , Subject: Re: [PATCH] perf/arm-cmn: Set PMU device parent Message-ID: <20240410180403.00004cff@Huawei.com> In-Reply-To: <25d4428df1ddad966c74a3ed60171cd3ca6c8b66.1712682917.git.robin.murphy@arm.com> References: <25d4428df1ddad966c74a3ed60171cd3ca6c8b66.1712682917.git.robin.murphy@arm.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 X-Originating-IP: [10.202.227.76] X-ClientProxiedBy: lhrpeml500006.china.huawei.com (7.191.161.198) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240410_100414_644805_D343C6B9 X-CRM114-Status: GOOD ( 14.60 ) 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-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, 9 Apr 2024 18:15:17 +0100 Robin Murphy wrote: > Now that perf supports giving the PMU device a parent, we can use our > platform device to make the relationship between CMN instances and PMU > IDs trivially discoverable, from either nominal direction: > > root@crazy-taxi:~# ls /sys/devices/platform/ARMHC600:00 | grep cmn > arm_cmn_0 > root@crazy-taxi:~# realpath /sys/bus/event_source/devices/arm_cmn_0/.. > /sys/devices/platform/ARMHC600:00 > > Signed-off-by: Robin Murphy Nice. I'd forgotten all about this :( https://lore.kernel.org/all/20230404134225.13408-1-Jonathan.Cameron@huawei.com/ still has a bunch of these + there were many I never looked into. Guess I should respin that series though probably 50% at least still apply. J > --- > drivers/perf/arm-cmn.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c > index 7ef9c7e4836b..b2c607cf3ad7 100644 > --- a/drivers/perf/arm-cmn.c > +++ b/drivers/perf/arm-cmn.c > @@ -2482,6 +2482,7 @@ static int arm_cmn_probe(struct platform_device *pdev) > cmn->cpu = cpumask_local_spread(0, dev_to_node(cmn->dev)); > cmn->pmu = (struct pmu) { > .module = THIS_MODULE, > + .parent = cmn->dev, > .attr_groups = arm_cmn_attr_groups, > .capabilities = PERF_PMU_CAP_NO_EXCLUDE, > .task_ctx_nr = perf_invalid_context, _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D79C817BB01 for ; Wed, 10 Apr 2024 17:04:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712768656; cv=none; b=n76ZLih+Ael1JqAHseRt9+uDxTZtjxicMI9h1LYmx28EvcrlMpTpxtHuUC+u4Irq+kRzjP93LfmXUlPeprLYJuaLNLPXNa0lmrKxEfO2zEjcA7Klx5Pt8QsA1o74E4aRVI5HjBDmsXeNapfVZv/l/1XaTBwGM0jqbRfOiecnGbc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712768656; c=relaxed/simple; bh=SQ4K/v5QQTv+vk6IVu/x6ynSF4jikLHPm3kjTu9TLvw=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=CuG90RgBlEIpxJg2gXf8T5Z48sEmKrPft2yR5fuianVbT9otLFtnXk2a/LJHV6GrkA8eOKHwuH5lc+NW4y+o9WAmrDAP5wPv3cglZpA6TM9L7Y5yAktKRx38uwOAOXOJUC62OvcoFq21QhQ/bC0dDRRiXsQ6o2Yg4L1D95WAJqc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=185.176.79.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.216]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4VF8Jc2Hbqz6JBTr; Thu, 11 Apr 2024 01:02:24 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id AA6751404FC; Thu, 11 Apr 2024 01:04:04 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 10 Apr 2024 18:04:04 +0100 Date: Wed, 10 Apr 2024 18:04:03 +0100 From: Jonathan Cameron To: Robin Murphy CC: , , , Subject: Re: [PATCH] perf/arm-cmn: Set PMU device parent Message-ID: <20240410180403.00004cff@Huawei.com> In-Reply-To: <25d4428df1ddad966c74a3ed60171cd3ca6c8b66.1712682917.git.robin.murphy@arm.com> References: <25d4428df1ddad966c74a3ed60171cd3ca6c8b66.1712682917.git.robin.murphy@arm.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: lhrpeml500006.china.huawei.com (7.191.161.198) To lhrpeml500005.china.huawei.com (7.191.163.240) On Tue, 9 Apr 2024 18:15:17 +0100 Robin Murphy wrote: > Now that perf supports giving the PMU device a parent, we can use our > platform device to make the relationship between CMN instances and PMU > IDs trivially discoverable, from either nominal direction: > > root@crazy-taxi:~# ls /sys/devices/platform/ARMHC600:00 | grep cmn > arm_cmn_0 > root@crazy-taxi:~# realpath /sys/bus/event_source/devices/arm_cmn_0/.. > /sys/devices/platform/ARMHC600:00 > > Signed-off-by: Robin Murphy Nice. I'd forgotten all about this :( https://lore.kernel.org/all/20230404134225.13408-1-Jonathan.Cameron@huawei.com/ still has a bunch of these + there were many I never looked into. Guess I should respin that series though probably 50% at least still apply. J > --- > drivers/perf/arm-cmn.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c > index 7ef9c7e4836b..b2c607cf3ad7 100644 > --- a/drivers/perf/arm-cmn.c > +++ b/drivers/perf/arm-cmn.c > @@ -2482,6 +2482,7 @@ static int arm_cmn_probe(struct platform_device *pdev) > cmn->cpu = cpumask_local_spread(0, dev_to_node(cmn->dev)); > cmn->pmu = (struct pmu) { > .module = THIS_MODULE, > + .parent = cmn->dev, > .attr_groups = arm_cmn_attr_groups, > .capabilities = PERF_PMU_CAP_NO_EXCLUDE, > .task_ctx_nr = perf_invalid_context,