perf/thunderx2: Assign parents for event_source devices
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Fri, 12 Apr 2024 16:10:38 +0000 (17:10 +0100)
committerWill Deacon <will@kernel.org>
Fri, 19 Apr 2024 14:59:29 +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 device.

Link: https://lore.kernel.org/linux-cxl/ZCLI9A40PJsyqAmq@kroah.com/
Cc: Robert Richter <rric@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240412161057.14099-12-Jonathan.Cameron@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/thunderx2_pmu.c

index 33e8ff3e5265a5b7720c5b7d648bdb4e480cf556..faf763d2c95cb8935538f43d05e686285cc923e9 100644 (file)
@@ -724,6 +724,7 @@ static int tx2_uncore_pmu_register(
        /* Perf event registration */
        tx2_pmu->pmu = (struct pmu) {
                .module         = THIS_MODULE,
+               .parent         = tx2_pmu->dev,
                .attr_groups    = tx2_pmu->attr_groups,
                .task_ctx_nr    = perf_invalid_context,
                .event_init     = tx2_uncore_event_init,