[PATCH 28/32] dmaengine: idxd: Assign parent for event_source device
From: Jonathan Cameron
Date: Tue Apr 04 2023 - 10:17:10 EST
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 iDXD PCI Device.
Link: https://lore.kernel.org/linux-cxl/ZCLI9A40PJsyqAmq@xxxxxxxxx/
Cc: Fenghua Yu <fenghua.yu@xxxxxxxxx>
Cc: Dave Jiang <dave.jiang@xxxxxxxxx>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
---
drivers/dma/idxd/perfmon.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/dma/idxd/perfmon.c b/drivers/dma/idxd/perfmon.c
index d73004f47cf4..4d61334a814a 100644
--- a/drivers/dma/idxd/perfmon.c
+++ b/drivers/dma/idxd/perfmon.c
@@ -478,6 +478,7 @@ static void idxd_pmu_init(struct idxd_pmu *idxd_pmu)
}
idxd_pmu->pmu.name = idxd_pmu->name;
+ idxd_pmu->pmu.parent = &idxd_pmu->idxd->pdev->dev;
idxd_pmu->pmu.attr_groups = perfmon_attr_groups;
idxd_pmu->pmu.task_ctx_nr = perf_invalid_context;
idxd_pmu->pmu.event_init = perfmon_pmu_event_init;
--
2.37.2