Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp831998rwl; Wed, 12 Apr 2023 04:54:24 -0700 (PDT) X-Google-Smtp-Source: AKy350Zhh4QVIQQc2/Q29sJQIh20aW4WnQ+ByLHHNWDLfRnE5MD/Ws08uGMcpk3Xi5YoOtyIpvj6 X-Received: by 2002:a05:6402:199:b0:504:aeb5:89c3 with SMTP id r25-20020a056402019900b00504aeb589c3mr1805602edv.5.1681300464350; Wed, 12 Apr 2023 04:54:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681300464; cv=none; d=google.com; s=arc-20160816; b=KeKVXScTR6kpNTy50g1zs6+V5oCxLDf4nVjx7ccEu6nN/kIgMWg8+24kex+vUlxJV1 UVzus8ka/esW1Vn2WXsvRLcV80q2aXR8kOJTosBrzvHvcQ49y7fKilXRyTYmf+sJc/sD ZUE3uHgbe/q0VFvId/l6C4XJNyg5M8bpCygMdgnudOm7bQ2dd4iZdSIe0KeUISCw5JcH 0u1bzfHqhth2FOyS7eServkHzee7Do3RtPFRcZqbFEw6PqdLYj025GpdnL4AfYgLZnMK 2x5AxCL80dod3fQS6DFniaRiM19xFEgwPSpM8zBA/Zfm3yUU3GLZrE2bHLz7XyKruojb vg7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id; bh=Jmq8iYObxlsH55+3wO6LGArvdJoCCq2AO8bNupoMo8k=; b=xavnfl8RoLRQ+jt++u8FBC7lNcXhIicSisEa6nTcSBf+Hm1mK316OOoEqwxT6x3tAg oKNb3jRToiH/VZgoymgarnkM57il7z6w5gqvnThXaxgJRZNdGSMOKS08LM7X4BraVsiv oQiz1oY6kTSq7oJym6kxoEwKTaB5+ymJHzYfhbl+/R+FHuYVM1hNOzchKCwOZ8q4DNvG /Rnd14MfJUfT4jGkKHzahigecKMpcBgUUaQtCYAwzM4RVRQIoUxngGKqL1EuCW2EYGl9 AoCx2UwO7q1KiqsCuz4+H+0GI+LeYLBhOBehHivrg8kbR2xo8ia/YkjmWVtBfbzh6Upr 3RWA== 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=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y3-20020aa7d503000000b00504a29c39a0si4694585edq.256.2023.04.12.04.53.58; Wed, 12 Apr 2023 04:54:24 -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=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230181AbjDLLwi (ORCPT + 99 others); Wed, 12 Apr 2023 07:52:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229840AbjDLLwh (ORCPT ); Wed, 12 Apr 2023 07:52:37 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 88F7F40F2; Wed, 12 Apr 2023 04:52:26 -0700 (PDT) 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> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE 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 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,