public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Robin Murphy <robin.murphy@arm.com>
Cc: <will@kernel.org>, <mark.rutland@arm.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] perf/arm-cmn: Set PMU device parent
Date: Wed, 10 Apr 2024 18:04:03 +0100	[thread overview]
Message-ID: <20240410180403.00004cff@Huawei.com> (raw)
In-Reply-To: <25d4428df1ddad966c74a3ed60171cd3ca6c8b66.1712682917.git.robin.murphy@arm.com>

On Tue,  9 Apr 2024 18:15:17 +0100
Robin Murphy <robin.murphy@arm.com> 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 <robin.murphy@arm.com>
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,


  parent reply	other threads:[~2024-04-10 17:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-09 17:15 [PATCH] perf/arm-cmn: Set PMU device parent Robin Murphy
2024-04-10 15:58 ` Will Deacon
2024-04-10 17:04 ` Jonathan Cameron [this message]
2024-04-10 17:12   ` Jonathan Cameron
2024-04-11 10:31     ` Will Deacon
2024-04-10 18:35   ` Robin Murphy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240410180403.00004cff@Huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robin.murphy@arm.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox