Message ID | 20240412161057.14099-27-Jonathan.Cameron@huawei.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Add parents to struct pmu -> dev | expand |
On 4/12/24 9:10 AM, Jonathan Cameron wrote: > 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@kroah.com/ > Cc: Fenghua Yu <fenghua.yu@intel.com> > Cc: Dave Jiang <dave.jiang@intel.com> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> > --- > 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 fdda6d604262..fbb586eed0b3 100644 > --- a/drivers/dma/idxd/perfmon.c > +++ b/drivers/dma/idxd/perfmon.c > @@ -477,6 +477,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;
Hi, Jonathan, On 4/12/24 09:10, Jonathan Cameron wrote: > Currently the PMU device appears directly under /sys/devices/ > Only root busses should appear there, so instead assign the pmu->dev s/busses/buses/ > parent to be the iDXD PCI Device. s/iDXD/IDXD/ > > Link: https://lore.kernel.org/linux-cxl/ZCLI9A40PJsyqAmq@kroah.com/ > Cc: Fenghua Yu <fenghua.yu@intel.com> > Cc: Dave Jiang <dave.jiang@intel.com> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Other than the typos, Reviewed-by: Fenghua Yu <fenghua.yu@intel.com> > --- > 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 fdda6d604262..fbb586eed0b3 100644 > --- a/drivers/dma/idxd/perfmon.c > +++ b/drivers/dma/idxd/perfmon.c > @@ -477,6 +477,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; Thanks. -Fenghua
diff --git a/drivers/dma/idxd/perfmon.c b/drivers/dma/idxd/perfmon.c index fdda6d604262..fbb586eed0b3 100644 --- a/drivers/dma/idxd/perfmon.c +++ b/drivers/dma/idxd/perfmon.c @@ -477,6 +477,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;
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@kroah.com/ Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> --- drivers/dma/idxd/perfmon.c | 1 + 1 file changed, 1 insertion(+)