On Tue, May 19, 2020 at 8:56 PM Joakim Zhang <qiangqing.zh...@nxp.com> wrote: > > > > -----Original Message----- > > From: Rob Herring <r...@kernel.org> > > Sent: 2020年5月20日 2:51 > > To: Joakim Zhang <qiangqing.zh...@nxp.com> > > Cc: john.ga...@huawei.com; w...@kernel.org; mark.rutl...@arm.com; > > shawn...@kernel.org; dl-linux-imx <linux-...@nxp.com>; > > linux-arm-ker...@lists.infradead.org; devicet...@vger.kernel.org; > > linux-kernel@vger.kernel.org > > Subject: Re: [PATCH V1 RESEND 1/3] perf/imx_ddr: Add system PMU identifier > > for userspace > > > > On Tue, May 12, 2020 at 03:31:13PM +0800, Joakim Zhang wrote: > > > The DDR Perf for i.MX8 is a system PMU whose axi id would different > > > from SoC to SoC. Need expose system PMU identifier for userspace which > > > refer to /sys/bus/event_source/devices/<PMU DEVICE>/identifier. > > > > Why not just expose the AXI ID if that's what's different? > > Hi Rob, > > Each master has their own AXI ID, such as USB, GPU, VPU etc, it is various > from different SoCs. We want to add system PMU support in perf tool, so we > want to expose something from perf driver to identify each SoC. > When we know which SoC it is, we can get each master AXI ID. If this patch > can be accepted, /sys/bus/event_source/devices/<PMU DEVICE>/identifier could > be a common interface for all system PMUs. > > I will change to add a property to identify SoC, to see if it is better. > Thanks.
Isn't that what you have already with this patch? My point is you can already read /proc/device-tree/compatible, read the PMU compatible, or have an SoC device which exposes SoC info. Rob