Message ID | 20230404134225.13408-22-Jonathan.Cameron@huawei.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp3057478vqo; Tue, 4 Apr 2023 07:07:06 -0700 (PDT) X-Google-Smtp-Source: AKy350aub3RfsTRbgu2uYLhF4l0C9/i8Tn0OgKJ4TsOJuxaUEDwU9f9Wj3fGh55QgUEgEtxFJNbd X-Received: by 2002:a62:3847:0:b0:626:a9b:94b8 with SMTP id f68-20020a623847000000b006260a9b94b8mr2319808pfa.20.1680617225974; Tue, 04 Apr 2023 07:07:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680617225; cv=none; d=google.com; s=arc-20160816; b=oOx7FNNV5ZeVAlxCoj5eeHbQ7C/nkj5lEOjzbXXvkevthsMQSjGzOmC2IxWwHbvw+7 tv9lRnSBq+lVXAvU+RhMlH+zXjMvro42p185MqrUHBAaCcISDghNS0RprRQ6iFvEeSFi Gng5/2t55S4P5Iqtb1+/y2Tz6XdRCFPA0lcd00HmNXGpS5fbnWyRuTNngsVRfOcTkEjW 9No+3+RE0KVZHRk6/Q9aZPdN926v8aclvNGcPO/3doil3phFpd3Ez1zemI1cpQJtGFQf JC6spbgX9gCvRclrkXcFfIGuSLdh3mMnUqP8HqgREB6pTalq+0W93JhapUIAu58sbdh2 wcUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=kx6X1nXF56/73NDdhtCA8mYFIpVL5WhZYOYSXJMyuqY=; b=EbW43AWvti2bKqHf51WDSHEh2ChTgpKHRv3gVndiA93rEaSbJ7CV9mofnpiEqVrfQK PhQCh3HolWZJyrL54PgoGa+7mJ2zPfQvXEvHaQLSPBg9KqjE3SqVGTGltqgIoO31KO8R iJ48QHZYdDtZF9A9HqJ2F2UHfsjUYasjEyjnhUIUKdRoLthsLLORUMyijyXGdlnpACHy nVVEJWJj07mpB5MOVKul5gqV5FAqsyhNGdKKqBFJ2Y7XbZOECbj0f88x4DwdwaUDwZCg wwsqPSV15RV5IOcaKR1yIaOX3zW2jx2QZwoCfWkwJ2YiT9PdN/ObCInY4kw+CfZnUn+X MPcA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z2-20020aa79582000000b0062804ba6fb4si10748458pfj.58.2023.04.04.07.06.49; Tue, 04 Apr 2023 07:07:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235729AbjDDNyu (ORCPT <rfc822;lkml4gm@gmail.com> + 99 others); Tue, 4 Apr 2023 09:54:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235693AbjDDNxQ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 4 Apr 2023 09:53:16 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95BAE4C2B; Tue, 4 Apr 2023 06:53:07 -0700 (PDT) Received: from lhrpeml500005.china.huawei.com (unknown [172.18.147.226]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4PrThy6qHhz67RhJ; Tue, 4 Apr 2023 21:52:18 +0800 (CST) Received: from SecurePC-101-06.china.huawei.com (10.122.247.231) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 4 Apr 2023 14:53:04 +0100 From: Jonathan Cameron <Jonathan.Cameron@huawei.com> To: Mark Rutland <mark.rutland@arm.com>, Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>, Arnaldo Carvalho de Melo <acme@kernel.org>, Will Deacon <will@kernel.org>, <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <gregkh@linuxfoundation.org> CC: <linuxarm@huawei.com>, Dan Williams <dan.j.williams@intel.com>, Shaokun Zhang <zhangshaokun@hisilicon.com>, Yicong Yang <yangyicong@hisilicon.com>, Jiucheng Xu <jiucheng.xu@amlogic.com>, Khuong Dinh <khuong@os.amperecomputing.com>, Robert Richter <rric@kernel.org>, Atish Patra <atishp@atishpatra.org>, Anup Patel <anup@brainfault.org>, Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Frank Li <Frank.li@nxp.com>, Shuai Xue <xueshuai@linux.alibaba.com>, Vineet Gupta <vgupta@kernel.org>, Shawn Guo <shawnguo@kernel.org>, Fenghua Yu <fenghua.yu@intel.com>, Dave Jiang <dave.jiang@intel.com>, Wu Hao <hao.wu@intel.com>, Tom Rix <trix@redhat.com>, <linux-fpga@vger.kernel.org>, Suzuki K Poulose <suzuki.poulose@arm.com>, Liang Kan <kan.liang@linux.intel.com> Subject: [PATCH 21/32] perf/arm-cmn: Assign parents for event_source device Date: Tue, 4 Apr 2023 14:42:14 +0100 Message-ID: <20230404134225.13408-22-Jonathan.Cameron@huawei.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230404134225.13408-1-Jonathan.Cameron@huawei.com> References: <20230404134225.13408-1-Jonathan.Cameron@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.122.247.231] X-ClientProxiedBy: lhrpeml500004.china.huawei.com (7.191.163.9) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762254888353646841?= X-GMAIL-MSGID: =?utf-8?q?1762254888353646841?= |
Series |
Add parents to struct pmu -> dev
|
|
Commit Message
Jonathan Cameron
April 4, 2023, 1:42 p.m. UTC
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.
Link: https://lore.kernel.org/linux-cxl/ZCLI9A40PJsyqAmq@kroah.com/
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
drivers/perf/arm-cmn.c | 1 +
1 file changed, 1 insertion(+)
Comments
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 <robin.murphy@arm.com> > Link: https://lore.kernel.org/linux-cxl/ZCLI9A40PJsyqAmq@kroah.com/ > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > --- > 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,
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,