perf/qcom: Assign parents for event_source devices
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Fri, 12 Apr 2024 16:10:41 +0000 (17:10 +0100)
committerWill Deacon <will@kernel.org>
Fri, 19 Apr 2024 14:59:30 +0000 (15:59 +0100)
Currently all these devices appear directly under /sys/devices/
Only root busses should appear there, so instead assign the pmu->dev
parents to be the platform devices.

Link: https://lore.kernel.org/linux-cxl/ZCLI9A40PJsyqAmq@kroah.com/
Cc: Andy Gross <agross@kernel.org>
Cc: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240412161057.14099-15-Jonathan.Cameron@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/qcom_l2_pmu.c
drivers/perf/qcom_l3_pmu.c

index b5a44dc1dc3a56f8895043779dcd405f9432836b..980e3051edd72522cd6b494f4ce1e17d5fc7ec05 100644 (file)
@@ -902,6 +902,7 @@ static int l2_cache_pmu_probe(struct platform_device *pdev)
        l2cache_pmu->pmu = (struct pmu) {
                /* suffix is instance id for future use with multiple sockets */
                .name           = "l2cache_0",
+               .parent         = &pdev->dev,
                .task_ctx_nr    = perf_invalid_context,
                .pmu_enable     = l2_cache_pmu_enable,
                .pmu_disable    = l2_cache_pmu_disable,
index f16783d03db7b6be3bead4d8e331d1b9f7cec936..37786e88514e8cd8136b3f9b267109d4e00735c3 100644 (file)
@@ -748,6 +748,7 @@ static int qcom_l3_cache_pmu_probe(struct platform_device *pdev)
                return -ENOMEM;
 
        l3pmu->pmu = (struct pmu) {
+               .parent         = &pdev->dev,
                .task_ctx_nr    = perf_invalid_context,
 
                .pmu_enable     = qcom_l3_cache__pmu_enable,