[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250124122952.GB23438@willie-the-truck>
Date: Fri, 24 Jan 2025 12:29:53 +0000
From: Will Deacon <will@...nel.org>
To: yunhui cui <cuiyunhui@...edance.com>
Cc: Shuai Xue <xueshuai@...ux.alibaba.com>, renyu.zj@...ux.alibaba.com,
mark.rutland@....com, linux-arm-kernel@...ts.infradead.org,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [External] Re: [PATCH] perf/dwc_pcie: fix duplicate pci_dev
devices
On Fri, Jan 24, 2025 at 05:11:05PM +0800, yunhui cui wrote:
> > >>> vsec = dwc_pcie_des_cap(pdev);
> > >>> if (!vsec)
> > >>> return -ENODEV;
> > >>>
> > >>> sbdf = plat_dev->id;
> > >>> - name = devm_kasprintf(&plat_dev->dev, GFP_KERNEL, "dwc_rootport_%x", sbdf);
> > >>> + name = devm_kasprintf(&plat_dev->dev, GFP_KERNEL, "dwc_rootport_%d_pmu", sbdf);
> > >>
> > >> A new name will break previous user tools.
> > > This name isn't suitable. It can't clearly show which is the PMU
> > > device. Userspace tools don't have binding relationships, like perf.
> > > Tools must traverse PMU devices before use.
> >
> > The device is under /sys/bus/event_source/ which indates it is PMU device.
> > As far as I know, most of PMU devices do not endup with a '_pmu' prefix.
>
> The point is the name "dwc_rootport_" is misleading, suggesting an
> extra PCIE RP in the system. Best to change the name to intuitive
> "xx_pmu".
As pointed out above, changing the name will break userspace. So it's
simply not an option, sorry.
Will
Powered by blists - more mailing lists