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 16861CD128A for ; Wed, 10 Apr 2024 18:35:28 +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=2fL7VdJzrDDI+RF5F/1KYWgLqdN6NFtz97MrFLwEKPE=; b=gJm0evo/42I3zi fmmxtNz8Ua20wLKydf4KcUx+HYrrnJ2+78ouQ9NJ9TOrXNcVR4LXGjhmf8Fmu8KO0n6DYjOuwwP4r DwCj+2v/Ft3y7NPI48Ev8NJ3T+8/asbSS8r+EzZZKcWLYvi/Y6808m0hamq9C8HJTHG9gDd/N1VDH gJq0QFsxCM/vLO3hD/5uEcHLOb2RvT5bL0baHroUFIiSgFnTnj9BIv1XJD81mYZjXk2nH7EMv204M tAYWQghLgNPB6vMF+/XIkQXinz/eLAGFleBpX7eEVauT3qNlu7LvcErRyJn28rSmEAM8mW+y5KBQ3 M/O4y2zZTaKh5/WQDchg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rucmw-00000008VeG-3Ecq; Wed, 10 Apr 2024 18:35:14 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rucmt-00000008Val-116m for linux-arm-kernel@lists.infradead.org; Wed, 10 Apr 2024 18:35:13 +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 B53DD1480; Wed, 10 Apr 2024 11:35:34 -0700 (PDT) Received: from [10.57.53.164] (unknown [10.57.53.164]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0AD933F6C4; Wed, 10 Apr 2024 11:35:03 -0700 (PDT) Message-ID: <8ca29fcd-20f1-494d-ae51-1c096d131a60@arm.com> Date: Wed, 10 Apr 2024 19:35:03 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] perf/arm-cmn: Set PMU device parent Content-Language: en-GB To: Jonathan Cameron Cc: will@kernel.org, mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <25d4428df1ddad966c74a3ed60171cd3ca6c8b66.1712682917.git.robin.murphy@arm.com> <20240410180403.00004cff@Huawei.com> From: Robin Murphy In-Reply-To: <20240410180403.00004cff@Huawei.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240410_113511_367831_2E81FF12 X-CRM114-Status: GOOD ( 16.64 ) 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 2024-04-10 6:04 pm, Jonathan Cameron wrote: > 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 :( Yeah, I hadn't realised the core change actually got merged until I stumbled across it by chance yesterday, otherwise I'd have followed up far sooner... If only your series had been a day or two later, I'd have posted the original device_move() version of this one back then, and it might even have looked reasonable for a moment :) Cheers, Robin. > 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