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 2585FC77B76 for ; Wed, 12 Apr 2023 11:53:15 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=t4j+D7Lgrf5yBCz3gkOygzQejwsNsoANrylFs9JgMfA=; b=kztfy/tatApItF n2XTyi9ya+DL0Ukcn6ep2Xe306tz+umb4vmyyonajDNE7JwLY/uODWxIMNcca6DyWBKYOD3NOyOOn l9Q+gO/BCil+F678N1ylfzqLlTygspKVKQBtp7kHU8/x3coFSzplpNXd5VxfWd4T/R1v5opbRy+q5 QWDY888e5zFfMab5MBUaxvU4VwBo3by6WppE/Mz81h5lWbabPkFKZhxgdtBtKXJKL9XFZvlK8PrRI peN/qpE+oAEg7jpZcAJW9Z3E8+O/YZ5+ZdsdexITC5zATOu4I9EVDmUBiCjn+Nx4HlE0iDXpzc0L9 tWH+GM+rqVQ1+StDEPkA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pmZ1c-002x7p-0a; Wed, 12 Apr 2023 11:52:32 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pmZ1Y-002x6G-2u for linux-arm-kernel@lists.infradead.org; Wed, 12 Apr 2023 11:52:30 +0000 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 A6A84D75; Wed, 12 Apr 2023 04:53:10 -0700 (PDT) Received: from [10.57.55.240] (unknown [10.57.55.240]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 072383F73F; Wed, 12 Apr 2023 04:52:18 -0700 (PDT) Message-ID: Date: Wed, 12 Apr 2023 12:52:12 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH 21/32] perf/arm-cmn: Assign parents for event_source device To: Jonathan Cameron , Mark Rutland , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Will Deacon , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, gregkh@linuxfoundation.org Cc: linuxarm@huawei.com, Dan Williams , Shaokun Zhang , Yicong Yang , Jiucheng Xu , Khuong Dinh , Robert Richter , Atish Patra , Anup Patel , Andy Gross , Bjorn Andersson , Frank Li , Shuai Xue , Vineet Gupta , Shawn Guo , Fenghua Yu , Dave Jiang , Wu Hao , Tom Rix , linux-fpga@vger.kernel.org, Suzuki K Poulose , Liang Kan References: <20230404134225.13408-1-Jonathan.Cameron@huawei.com> <20230404134225.13408-22-Jonathan.Cameron@huawei.com> Content-Language: en-GB From: Robin Murphy In-Reply-To: <20230404134225.13408-22-Jonathan.Cameron@huawei.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230412_045228_983807_38288901 X-CRM114-Status: GOOD ( 15.67 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2023-04-04 14:42, Jonathan Cameron wrote: > Currently the PMU device appears directly under /sys/devices/ > Only root busses should appear there, so instead assign the pmu->dev > parent to be the platform device. Oh, fab! Just the other week I wrote up a patch doing this after the fact with device_move() on the grounds of making the PMU instances easier to identify (and with an equivalent cleanup of Documentation/admin-guide/perf), which I was close to getting round to sending as an RFC. Thus I thoroughly approve :D Acked-by: Robin Murphy > Link: https://lore.kernel.org/linux-cxl/ZCLI9A40PJsyqAmq@kroah.com/ > Signed-off-by: Jonathan Cameron > --- > 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 c9689861be3f..7731eb0e2a4a 100644 > --- a/drivers/perf/arm-cmn.c > +++ b/drivers/perf/arm-cmn.c > @@ -2284,6 +2284,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 = &pdev->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