perf/arm-spe: Assign parents for event_source device
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Fri, 12 Apr 2024 16:10:50 +0000 (17:10 +0100)
committerWill Deacon <will@kernel.org>
Fri, 19 Apr 2024 14:59:31 +0000 (15:59 +0100)
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/
Acked-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240412161057.14099-24-Jonathan.Cameron@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/arm_spe_pmu.c

index 35f0de03416fc052c79e0f3dfe2fa869a6964fe3..9100d82bfabc0d5f99216f05befd713d9b67f483 100644 (file)
@@ -932,6 +932,7 @@ static int arm_spe_pmu_perf_init(struct arm_spe_pmu *spe_pmu)
 
        spe_pmu->pmu = (struct pmu) {
                .module = THIS_MODULE,
+               .parent         = &spe_pmu->pdev->dev,
                .capabilities   = PERF_PMU_CAP_EXCLUSIVE | PERF_PMU_CAP_ITRACE,
                .attr_groups    = arm_spe_pmu_attr_groups,
                /*