Message ID | 1602149181-237415-1-git-send-email-john.garry@huawei.com (mailing list archive) |
---|---|
Headers | show |
Series | perf drivers: Add sysfs identifier file | expand |
On 08/10/2020 10:26, John Garry wrote: Hi Will, Mark, Can you have a look at this series please? You were cc'ed on the v5 rebase of the userspace part which I sent out a little while ago. Cheers, John > To allow perf tool to identify a specific implementation of a PMU for > event alias matching and metric support, expose a per-PMU identifier file. > > There is no standard format for the identifier string. It just should be > unique per HW implementation. > > Typical methods to retrieve the information for the identifier string > can include: > - Hardcoding in the driver, matched via DT bindings compat string, > ACPI HID, or similar > - Directly from DT bindings property > - Read from some HW identification register > > In this series, for the SMMUv3 PMU and HiSi uncore drivers, a HW ID > register is read for the identifier. For the imx8 ddr driver, the > identifier is hardcoded, matched via DT compat string. > > Joakim Zhang (2): > bindings/perf/imx-ddr: update compatible string > perf/imx_ddr: Add system PMU identifier for userspace > > John Garry (2): > drivers/perf: hisi: Add identifier sysfs file > perf/smmuv3: Support sysfs identifier file > > .../devicetree/bindings/perf/fsl-imx-ddr.txt | 3 ++ > drivers/perf/arm_smmuv3_pmu.c | 39 ++++++++++++++++ > drivers/perf/fsl_imx8_ddr_perf.c | 45 +++++++++++++++++-- > drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c | 16 +++++++ > drivers/perf/hisilicon/hisi_uncore_hha_pmu.c | 16 +++++++ > drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c | 16 +++++++ > drivers/perf/hisilicon/hisi_uncore_pmu.c | 10 +++++ > drivers/perf/hisilicon/hisi_uncore_pmu.h | 7 +++ > 8 files changed, 149 insertions(+), 3 deletions(-) >
On Thu, 8 Oct 2020 17:26:17 +0800, John Garry wrote: > To allow perf tool to identify a specific implementation of a PMU for > event alias matching and metric support, expose a per-PMU identifier file. > > There is no standard format for the identifier string. It just should be > unique per HW implementation. > > Typical methods to retrieve the information for the identifier string > can include: > - Hardcoding in the driver, matched via DT bindings compat string, > ACPI HID, or similar > - Directly from DT bindings property > - Read from some HW identification register > > [...] Applied the hisi and smmu parts to will (for-next/perf), thanks! [1/4] drivers/perf: hisi: Add identifier sysfs file https://git.kernel.org/will/c/ac4511c9364c [...] [4/4] perf/smmuv3: Support sysfs identifier file https://git.kernel.org/will/c/2c255223362e I've completely lost track of the imx ddr PMU, so I dropped those parts (patch 3/4 seemed to remove a compatible string from the driver?). Cheers,
On 25/11/2020 15:44, Will Deacon wrote: > Applied the hisi and smmu parts to will (for-next/perf), thanks! > > [1/4] drivers/perf: hisi: Add identifier sysfs file > https://git.kernel.org/will/c/ac4511c9364c > [...] > [4/4] perf/smmuv3: Support sysfs identifier file > https://git.kernel.org/will/c/2c255223362e > Thanks. > I've completely lost track of the imx ddr PMU, so I dropped those parts > (patch 3/4 seemed to remove a compatible string from the driver?). > 2/4 needed to be dropped anyway. @Joakim, can you resend 3/4? And I think that we should keep the explicit support for "fsl,imx8m-ddr-pmu" as a good practice in imx_ddr_pmu_dt_ids[], while also adding the soc-specific sub compat string support John
> -----Original Message----- > From: John Garry <john.garry@huawei.com> > Sent: 2020年11月26日 0:00 > To: Will Deacon <will@kernel.org>; Joakim Zhang > <qiangqing.zhang@nxp.com>; zhangshaokun@hisilicon.com; > mark.rutland@arm.com; Frank Li <frank.li@nxp.com>; robh+dt@kernel.org > Cc: catalin.marinas@arm.com; kernel-team@android.com; acme@kernel.org; > linux-kernel@vger.kernel.org; linux-arm-kernel@lists.infradead.org; > irogers@google.com; jolsa@redhat.com; devicetree@vger.kernel.org; > linuxarm@huawei.com > Subject: Re: [PATCH v2 0/4] perf drivers: Add sysfs identifier file > > On 25/11/2020 15:44, Will Deacon wrote: > > Applied the hisi and smmu parts to will (for-next/perf), thanks! > > > > [1/4] drivers/perf: hisi: Add identifier sysfs file > > > > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit. > > > kernel.org%2Fwill%2Fc%2Fac4511c9364c&data=04%7C01%7Cqiangqing.z > han > > > g%40nxp.com%7Cbc2c0da5b8c04caccd1708d8915b44fd%7C686ea1d3bc2b4c6 > fa92cd > > > 99c5c301635%7C0%7C0%7C637419168472681071%7CUnknown%7CTWFpbGZ > sb3d8eyJWI > > > joiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1 > 000&a > > > mp;sdata=W2ZFzaMWJgpQncG4HF2x8EaWc0FkYJ69E8rVaFikJEQ%3D&re > served=0 > > [...] > > [4/4] perf/smmuv3: Support sysfs identifier file > > > > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit. > > > kernel.org%2Fwill%2Fc%2F2c255223362e&data=04%7C01%7Cqiangqing. > zhan > > > g%40nxp.com%7Cbc2c0da5b8c04caccd1708d8915b44fd%7C686ea1d3bc2b4c6 > fa92cd > > > 99c5c301635%7C0%7C0%7C637419168472681071%7CUnknown%7CTWFpbGZ > sb3d8eyJWI > > > joiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1 > 000&a > > > mp;sdata=lfmEr2GO9iySRp24zWTObHkWAXEo3an6TxA%2BzXpDlvk%3D& > reserved > > =0 > > > > Thanks. > > > I've completely lost track of the imx ddr PMU, so I dropped those > > parts (patch 3/4 seemed to remove a compatible string from the driver?). > > > > 2/4 needed to be dropped anyway. > > @Joakim, can you resend 3/4? And I think that we should keep the explicit > support for "fsl,imx8m-ddr-pmu" as a good practice in imx_ddr_pmu_dt_ids[], > while also adding the soc-specific sub compat string support Yes, thanks John. I will follow up. Best Regards, Joakim Zhang > John
On 26/11/2020 01:35, Joakim Zhang wrote: >> @Joakim, can you resend 3/4? And I think that we should keep the explicit >> support for "fsl,imx8m-ddr-pmu" as a good practice in imx_ddr_pmu_dt_ids[], >> while also adding the soc-specific sub compat string support > Yes, thanks John. I will follow up. > OK, and I can look to advance the perf tool part now. thanks, John