Skip to content

Commit 8f9f504

Browse files
rmurphy-armwilldeacon
authored andcommitted
perf/arm-cmn: Set PMU device parent
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> Link: https://lore.kernel.org/r/25d4428df1ddad966c74a3ed60171cd3ca6c8b66.1712682917.git.robin.murphy@arm.com Signed-off-by: Will Deacon <will@kernel.org>
1 parent 595275c commit 8f9f504

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/perf/arm-cmn.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2482,6 +2482,7 @@ static int arm_cmn_probe(struct platform_device *pdev)
24822482
cmn->cpu = cpumask_local_spread(0, dev_to_node(cmn->dev));
24832483
cmn->pmu = (struct pmu) {
24842484
.module = THIS_MODULE,
2485+
.parent = cmn->dev,
24852486
.attr_groups = arm_cmn_attr_groups,
24862487
.capabilities = PERF_PMU_CAP_NO_EXCLUDE,
24872488
.task_ctx_nr = perf_invalid_context,

0 commit comments

Comments
 (0)